171 {
172
174 {
175
177 {
178
181
182
183 int randPos;
184 Param1<vector> pos;
185 array<ref Param> params;
186
188 {
189
190 randPos = Math.RandomIntInclusive(0,
m_FiringPos.Count() - 1);
192 params = new array<ref Param>;
193 params.Insert(pos);
194 g_Game.RPC(null,
ERPCs.RPC_SOUND_ARTILLERY, params,
true);
195 }
196 else
197 {
198
199
200
201
202
203 array<int> usedIndices = new array<int>;
204
205
207 for (int i = 0; i < randFireNb; i++)
208 {
209 randPos = Math.RandomIntInclusive(0,
m_FiringPos.Count() - 1);
210
211 if (usedIndices.Count() <= 0 || usedIndices.Find(randPos) < 0)
212 {
213
215 params = new array<ref Param>;
216
217
218 params.Insert(pos);
219 g_Game.RPC(null,
ERPCs.RPC_SOUND_ARTILLERY, params,
true);
220
221
222 usedIndices.Insert(randPos);
223 }
224 }
225 }
226
227
229 }
230
232 }
233 }
ref array< vector > m_FiringPos
int m_MaxSimultaneousStrikes
int m_MinSimultaneousStrikes