Tiny optimization + formatting fix
authorunc0rr
Fri, 29 Jun 2012 01:23:43 +0400
changeset 7325 a68eca3ad1fe
parent 7323 8490a4f439a5
child 7327 4e35c45d0853
Tiny optimization + formatting fix
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);