hedgewars/GSHandlers.inc
changeset 3419 b66a1b597f88
parent 3417 27ff4a6375dd
child 3422 41ae3c48faa0
equal deleted inserted replaced
3418:8545f646a40d 3419:b66a1b597f88
  3217 if ((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or (Gear^.Pos = 20) then // bounce up to 20 times (3 times on gameflagged solid land) before dropping past landscape
  3217 if ((Gear^.Pos = 3) and ((GameFlags and gfSolidLand) <> 0)) or (Gear^.Pos = 20) then // bounce up to 20 times (3 times on gameflagged solid land) before dropping past landscape
  3218     begin
  3218     begin
  3219     Gear^.dY:= Gear^.dY + cGravity * 3;
  3219     Gear^.dY:= Gear^.dY + cGravity * 3;
  3220     Gear^.Y:= Gear^.Y + Gear^.dY;
  3220     Gear^.Y:= Gear^.Y + Gear^.dY;
  3221     CheckGearDrowning(Gear);
  3221     CheckGearDrowning(Gear);
  3222     ResumeMusic;
  3222     if (Gear^.State and gstDrowning) <> 0 then
       
  3223         begin
       
  3224         if CurrentHedgehog^.Gear <> nil then
       
  3225             begin
       
  3226             // Drown the hedgehog.  Could also just delete it, but hey, this gets a caption
       
  3227             CurrentHedgehog^.Gear^.Active:= true;
       
  3228             CurrentHedgehog^.Gear^.X:= Gear^.X;
       
  3229             CurrentHedgehog^.Gear^.Y:=int2hwFloat(cWaterLine+cVisibleWater)+_128;
       
  3230             CurrentHedgehog^.Unplaced:= false
       
  3231             end;
       
  3232         ResumeMusic
       
  3233         end;
  3223     exit
  3234     exit
  3224     end;
  3235     end;
  3225 
  3236 
  3226 doStepFallingGear(Gear);
  3237 doStepFallingGear(Gear);
  3227 
  3238