30 {
31 super.Update(timeslice,p_total,setting_defaults,order);
32
33 int active_request_count = 0;
34
35 PPERequestParamDataInt req_data;
36
37 bool setting_value_zero = false;
38
39 bool int_value_temp = false;
41
42 if (p_total == null)
43 {
44 p_total = new Param1<int>(0);
45 }
46
48 {
50 }
51 else
52 {
53
56 return;
57 }
58
60 {
61 req_data = PPERequestParamDataInt.Cast(
m_RequestMap.GetElement(i));
62
63 if (req_data == null)
64 {
66 continue;
67 }
68
69 setting_value_zero = req_data.IsSettingDefaultValues();
70
71 if (setting_value_zero && !req_data.GetUpdatingDataValues() && !req_data.IsDataActive())
72 {
73
74 continue;
75 }
76
77 if (setting_value_zero)
78 {
79 req_data.m_IntTarget = false;
80
81 }
82 else
83 {
84 active_request_count++;
85 }
86
87
88
89 req_data.m_IntLast = req_data.m_IntCurrent;
90
91 if (!req_data.GetUpdatingDataValues() && req_data.IsDataActive())
92 {
93 int_value_temp = req_data.m_IntCurrent;
94 PrepareLayerInfo(req_data.GetPriorityLayer(),int_value_temp,req_data.GetInteractionMask());
95
96 continue;
97 }
98
99 int_value_temp = req_data.m_IntTarget;
100
101
102 req_data.SetUpdatingDataValues(false);
103 if (setting_value_zero)
104 {
105 req_data.SetDataActive(false);
106
107 }
108 else
109 {
110 int_value_temp = req_data.m_IntTarget;
111 PrepareLayerInfo(req_data.GetPriorityLayer(),int_value_temp,req_data.GetInteractionMask());
112 }
113
114 req_data.m_IntCurrent = int_value_temp;
115 }
116
117 if (active_request_count == 0)
118 {
120 }
121 else
122 {
123
124
125 int value;
126 int operator;
127 bool override_active = false;
128
130 {
131 if ( override_active )
132 break;
133
136
137 switch (operator)
138 {
140 int_value_total = Math.Min(int_value_total,value);
141 break;
142
144 int_value_total = Math.Max(int_value_total,value);
145 break;
146
148 int_value_total = value;
149 break;
150
152 int_value_total = value;
153 break;
154
155 default:
157 break;
158 }
159
161 {
162
163 override_active = true;
164 }
165 }
166
168
169 Param1<int>.Cast(p_total).param1 = int_value_total;
170 }
171
172
174
176 }
PPOperators
PP operators, specify operation between subsequent layers.
ref Param m_CurrentValues
const int LAYER_INFO_VALUE
const int LAYER_INFO_OPERATOR
void PrepareLayerInfo(int layer, bool value, int operator)
ref ActiveParameterRequestsMap m_RequestMap
ref map< int, ref array< bool, int > > m_LayerInfo
override void SetParameterValueDefault(inout Param p_total)
No active requests for the mat. parameter value change, sets the value to DEFAULT.
ref array< int > m_CommandLayersArray
void Error(string err)
Messagebox with error message.