# HG changeset patch # User unc0rr # Date 1340918623 -14400 # Node ID a68eca3ad1fe97b4e6fbbc5f9adec5a3c46a294c # Parent 8490a4f439a5304142a66de7c8ac3d586d5cd625 Tiny optimization + formatting fix diff -r 8490a4f439a5 -r a68eca3ad1fe hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Fri Jun 29 00:45:13 2012 +0400 +++ b/hedgewars/GSHandlers.inc Fri Jun 29 01:23:43 2012 +0400 @@ -3331,10 +3331,10 @@ if (Gear^.Timer mod 30) = 0 then AddVisualGear(hwRound(Gear^.X + _20 * Gear^.dX), hwRound(Gear^.Y + _20 * Gear^.dY), vgtDust); if (CheckGearDrowning(Gear)) then - begin + begin StopSoundChan(Gear^.SoundChannel); exit - end + end end; if GameTicks > Gear^.FlightTime then @@ -3425,8 +3425,9 @@ end else if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Tag <> 0) then begin - if Gear^.Timer > 0 then dec(Gear^.Timer); - if Gear^.Timer = 0 then + if Gear^.Timer > 0 then + dec(Gear^.Timer) + else begin doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, Gear^.Hedgehog, EXPLAutoSound); DeleteGear(Gear);