211 |
211 |
212 if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then |
212 if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then |
213 if (hwAbs(Gear^.dX) > _0_1) or |
213 if (hwAbs(Gear^.dX) > _0_1) or |
214 (hwAbs(Gear^.dY) > _0_1) then |
214 (hwAbs(Gear^.dY) > _0_1) then |
215 PlaySound(sndGrenadeImpact, false, nil) |
215 PlaySound(sndGrenadeImpact, false, nil) |
|
216 end; |
|
217 //////////////////////////////////////////////////////////////////////////////// |
|
218 procedure doStepMolotov(Gear: PGear); |
|
219 var i: LongInt; |
|
220 dX, dY: hwFloat; |
|
221 Fire: PGear; |
|
222 begin |
|
223 AllInactive:= false; |
|
224 |
|
225 doStepFallingGear(Gear); |
|
226 CalcRotationDirAngle(Gear); |
|
227 |
|
228 if (Gear^.State and gstCollision) <> 0 then begin |
|
229 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 5, EXPLAutoSound); |
|
230 for i:= 0 to 40 do begin |
|
231 dX:= AngleCos(i * 16) * _0_5 * (GetRandom + _1); |
|
232 dY:= AngleSin(i * 16) * _0_5 * (GetRandom + _1); |
|
233 Fire:= AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtFlame, 0, dX, dY, 0); |
|
234 Fire^.State:= Fire^.State or gsttmpFlag; |
|
235 end; |
|
236 DeleteGear(Gear); |
|
237 exit |
|
238 end; |
216 end; |
239 end; |
217 |
240 |
218 procedure doStepWatermelon(Gear: PGear); |
241 procedure doStepWatermelon(Gear: PGear); |
219 begin |
242 begin |
220 AllInactive:= false; |
243 AllInactive:= false; |