equal
deleted
inserted
replaced
280 procedure doStepBomb(Gear: PGear); |
280 procedure doStepBomb(Gear: PGear); |
281 var |
281 var |
282 i, x, y: LongInt; |
282 i, x, y: LongInt; |
283 dX, dY: hwFloat; |
283 dX, dY: hwFloat; |
284 Fire: PGear; |
284 Fire: PGear; |
|
285 vg: PVisualGear; |
285 begin |
286 begin |
286 AllInactive := false; |
287 AllInactive := false; |
287 |
288 |
288 doStepFallingGear(Gear); |
289 doStepFallingGear(Gear); |
289 |
290 |
300 if (Gear^.Kind = gtBall) and ((Gear^.State and gstTmpFlag) <> 0) then |
301 if (Gear^.Kind = gtBall) and ((Gear^.State and gstTmpFlag) <> 0) then |
301 begin |
302 begin |
302 CheckCollision(Gear); |
303 CheckCollision(Gear); |
303 if (Gear^.State and gstCollision) <> 0 then |
304 if (Gear^.State and gstCollision) <> 0 then |
304 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLDontDraw or EXPLNoGfx); |
305 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLDontDraw or EXPLNoGfx); |
|
306 end; |
|
307 |
|
308 if (Gear^.Kind = gtGasBomb) and ((GameTicks mod 200) = 0) then |
|
309 begin |
|
310 vg:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeWhite); |
|
311 if vg <> nil then |
|
312 vg^.Tint:= $FFC0C000; |
305 end; |
313 end; |
306 |
314 |
307 if Gear^.Timer = 0 then |
315 if Gear^.Timer = 0 then |
308 begin |
316 begin |
309 case Gear^.Kind of |
317 case Gear^.Kind of |
347 if i mod 2 = 0 then Fire^.State := Fire^.State or gsttmpFlag; |
355 if i mod 2 = 0 then Fire^.State := Fire^.State or gsttmpFlag; |
348 Fire := AddGear(x, y, gtFlame, 0, dX, -dY, 0); |
356 Fire := AddGear(x, y, gtFlame, 0, dX, -dY, 0); |
349 if i mod 2 <> 0 then Fire^.State := Fire^.State or gsttmpFlag; |
357 if i mod 2 <> 0 then Fire^.State := Fire^.State or gsttmpFlag; |
350 end |
358 end |
351 end; |
359 end; |
352 gtGasBomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound or EXPLPoisoned); |
360 gtGasBomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound or EXPLPoisoned, $FFFFC000); |
353 end; |
361 end; |
354 DeleteGear(Gear); |
362 DeleteGear(Gear); |
355 exit |
363 exit |
356 end; |
364 end; |
357 |
365 |
3103 // CheckGearDrowning(Gear); // already checked for in doStepFallingGear |
3111 // CheckGearDrowning(Gear); // already checked for in doStepFallingGear |
3104 CalcRotationDirAngle(Gear); |
3112 CalcRotationDirAngle(Gear); |
3105 |
3113 |
3106 if (Gear^.State and gstCollision) <> 0 then |
3114 if (Gear^.State and gstCollision) <> 0 then |
3107 begin |
3115 begin |
3108 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLPoisoned or EXPLNoGfx); |
3116 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 11, EXPLPoisoned, $C000FFC0); |
3109 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 10, EXPLPoisoned or EXPLNoGfx); |
|
3110 PlaySound(sndEggBreak); |
3117 PlaySound(sndEggBreak); |
3111 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); |
3118 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); |
3112 vg := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); |
3119 vg := AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtEgg); |
3113 if vg <> nil then vg^.Frame := 2; |
3120 if vg <> nil then vg^.Frame := 2; |
3114 |
3121 |