hedgewars/GSHandlers.inc
changeset 4168 49ad7bea4a33
parent 4160 043c17a8b3ca
child 4182 5240a84df702
equal deleted inserted replaced
4167:207cd9358876 4168:49ad7bea4a33
   350     doStepFallingGear(Gear);
   350     doStepFallingGear(Gear);
   351 
   351 
   352     dec(Gear^.Timer);
   352     dec(Gear^.Timer);
   353     if Gear^.Timer = 1000 then // might need adjustments
   353     if Gear^.Timer = 1000 then // might need adjustments
   354         case Gear^.Kind of 
   354         case Gear^.Kind of 
   355             gtAmmo_Bomb: makeHogsWorry(Gear^.X, Gear^.Y, 50);
   355             gtBomb: makeHogsWorry(Gear^.X, Gear^.Y, 50);
   356             gtClusterBomb: makeHogsWorry(Gear^.X, Gear^.Y, 20);
   356             gtClusterBomb: makeHogsWorry(Gear^.X, Gear^.Y, 20);
   357             gtWatermelon: makeHogsWorry(Gear^.X, Gear^.Y, 75);
   357             gtWatermelon: makeHogsWorry(Gear^.X, Gear^.Y, 75);
   358             gtHellishBomb: makeHogsWorry(Gear^.X, Gear^.Y, 90);
   358             gtHellishBomb: makeHogsWorry(Gear^.X, Gear^.Y, 90);
   359             gtGasBomb: makeHogsWorry(Gear^.X, Gear^.Y, 50);
   359             gtGasBomb: makeHogsWorry(Gear^.X, Gear^.Y, 50);
   360         end;
   360         end;
   374     end;
   374     end;
   375 
   375 
   376     if Gear^.Timer = 0 then
   376     if Gear^.Timer = 0 then
   377     begin
   377     begin
   378         case Gear^.Kind of 
   378         case Gear^.Kind of 
   379             gtAmmo_Bomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
   379             gtBomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
   380             gtBall: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 40, EXPLAutoSound);
   380             gtBall: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 40, EXPLAutoSound);
   381             gtClusterBomb: 
   381             gtClusterBomb: 
   382                 begin
   382                 begin
   383                     x := hwRound(Gear^.X);
   383                     x := hwRound(Gear^.X);
   384                     y := hwRound(Gear^.Y);
   384                     y := hwRound(Gear^.Y);
   507     else if (GameTicks and $1F) = 0 then
   507     else if (GameTicks and $1F) = 0 then
   508         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace)
   508         AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace)
   509 end;
   509 end;
   510 
   510 
   511 ////////////////////////////////////////////////////////////////////////////////
   511 ////////////////////////////////////////////////////////////////////////////////
   512 procedure doStepGrenade(Gear: PGear);
   512 procedure doStepShell(Gear: PGear);
   513 begin
   513 begin
   514     AllInactive := false;
   514     AllInactive := false;
   515     Gear^.dX := Gear^.dX + cWindSpeed;
   515     Gear^.dX := Gear^.dX + cWindSpeed;
   516     doStepFallingGear(Gear);
   516     doStepFallingGear(Gear);
   517     if (Gear^.State and gstCollision) <> 0 then
   517     if (Gear^.State and gstCollision) <> 0 then