164 {
165
167 {
168
170 {
171
174
175
176 int randPos;
177 Param1<vector> pos;
178 array<ref Param> params;
179
181 {
182
183 randPos = Math.RandomIntInclusive(0,
m_FiringPos.Count() - 1);
185 params = new array<ref Param>;
186 params.Insert(pos);
187 g_Game.RPC(null,
ERPCs.RPC_SOUND_ARTILLERY, params,
true);
188 }
189 else
190 {
191
192
193
194
195
196 array<int> usedIndices = new array<int>;
197
198
200 for (int i = 0; i < randFireNb; i++)
201 {
202 randPos = Math.RandomIntInclusive(0,
m_FiringPos.Count() - 1);
203
204 if (usedIndices.Count() <= 0 || usedIndices.Find(randPos) < 0)
205 {
206
208 params = new array<ref Param>;
209
210
211 params.Insert(pos);
212 g_Game.RPC(null,
ERPCs.RPC_SOUND_ARTILLERY, params,
true);
213
214
215 usedIndices.Insert(randPos);
216 }
217 }
218 }
219
220
222 }
223
225 }
226 }
ref array< vector > m_FiringPos
int m_MaxSimultaneousStrikes
int m_MinSimultaneousStrikes