hedgewars/GSHandlers.inc
changeset 7325 a68eca3ad1fe
parent 7310 7f8d62b869bd
child 7335 3c6f08af7dac
equal deleted inserted replaced
7323:8490a4f439a5 7325:a68eca3ad1fe
  3329         Gear^.Y := Gear^.Y + Gear^.dY;
  3329         Gear^.Y := Gear^.Y + Gear^.dY;
  3330         DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 2, 6);
  3330         DrawTunnel(oX, oY, Gear^.dX, Gear^.dY, 2, 6);
  3331         if (Gear^.Timer mod 30) = 0 then
  3331         if (Gear^.Timer mod 30) = 0 then
  3332             AddVisualGear(hwRound(Gear^.X + _20 * Gear^.dX), hwRound(Gear^.Y + _20 * Gear^.dY), vgtDust);
  3332             AddVisualGear(hwRound(Gear^.X + _20 * Gear^.dX), hwRound(Gear^.Y + _20 * Gear^.dY), vgtDust);
  3333         if (CheckGearDrowning(Gear)) then
  3333         if (CheckGearDrowning(Gear)) then
  3334            begin
  3334             begin
  3335             StopSoundChan(Gear^.SoundChannel);
  3335             StopSoundChan(Gear^.SoundChannel);
  3336             exit
  3336             exit
  3337     end
  3337         end
  3338     end;
  3338     end;
  3339 
  3339 
  3340     if GameTicks > Gear^.FlightTime then
  3340     if GameTicks > Gear^.FlightTime then
  3341         t := CheckGearsCollision(Gear)
  3341         t := CheckGearsCollision(Gear)
  3342         
  3342         
  3423             gear^.RenderTimer:= true;
  3423             gear^.RenderTimer:= true;
  3424         if Gear^.Timer > 0 then dec(Gear^.Timer)
  3424         if Gear^.Timer > 0 then dec(Gear^.Timer)
  3425         end
  3425         end
  3426     else if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Tag <> 0) then
  3426     else if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Tag <> 0) then
  3427         begin
  3427         begin
  3428         if Gear^.Timer > 0 then dec(Gear^.Timer);
  3428         if Gear^.Timer > 0 then 
  3429         if Gear^.Timer = 0 then
  3429             dec(Gear^.Timer)
       
  3430         else
  3430             begin
  3431             begin
  3431             doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound);
  3432             doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound);
  3432             DeleteGear(Gear);
  3433             DeleteGear(Gear);
  3433             end
  3434             end
  3434         end;
  3435         end;