hedgewars/GSHandlers.inc
changeset 2225 162d8f6bca25
parent 2221 ef52dae4130b
child 2226 e35b62cb7a1c
equal deleted inserted replaced
2224:4f3e7bd31841 2225:162d8f6bca25
    92 begin
    92 begin
    93 AllInactive:= false;
    93 AllInactive:= false;
    94 Gear^.Y:= Gear^.Y + cDrownSpeed;
    94 Gear^.Y:= Gear^.Y + cDrownSpeed;
    95 if hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear);
    95 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)
    96 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
    97 if Random(1000) < 10 then AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble);
    97 if (GameTicks and $1F) = 0 then
       
    98     if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then 
       
    99         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
       
   100     else if Random(12) = 0 then
       
   101         AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
    98 end;
   102 end;
    99 
   103 
   100 ////////////////////////////////////////////////////////////////////////////////
   104 ////////////////////////////////////////////////////////////////////////////////
   101 procedure doStepFallingGear(Gear: PGear);
   105 procedure doStepFallingGear(Gear: PGear);
   102 var isFalling: boolean;
   106 var isFalling: boolean;