hedgewars/GSHandlers.inc
changeset 2228 7f4613bae01a
parent 2227 743218daf878
child 2262 0dc94341bf42
equal deleted inserted replaced
2227:743218daf878 2228:7f4613bae01a
    90 ////////////////////////////////////////////////////////////////////////////////
    90 ////////////////////////////////////////////////////////////////////////////////
    91 procedure doStepDrowningGear(Gear: PGear);
    91 procedure doStepDrowningGear(Gear: PGear);
    92 begin
    92 begin
    93 AllInactive:= false;
    93 AllInactive:= false;
    94 Gear^.Y:= Gear^.Y + cDrownSpeed;
    94 Gear^.Y:= Gear^.Y + cDrownSpeed;
       
    95 Gear^.X:= Gear^.X + Gear^.dX * cDrownSpeed;
    95 if hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear);
    96 if hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear);
    96 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
    97 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
    97 if (GameTicks and $1F) = 0 then
    98 if (GameTicks and $1F) = 0 then
    98     if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then 
    99     if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then 
    99         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
   100         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)