hedgewars/GSHandlers.inc
changeset 4153 6bd94e4c5d65
parent 4135 5be798ecafdc
child 4155 9160dbe77118
--- a/hedgewars/GSHandlers.inc	Sat Nov 06 23:07:20 2010 +0300
+++ b/hedgewars/GSHandlers.inc	Sat Nov 06 17:56:24 2010 -0400
@@ -2655,6 +2655,12 @@
 var 
     i: LongWord;
 begin
+    if (Gear^.Tag = 0) or (cWaterLine = 0) then
+        begin
+            DeleteGear(Gear);
+            exit
+        end;
+
     AllInactive := false;
 
     inc(Gear^.Timer);
@@ -2671,9 +2677,7 @@
         SetAllToActive
     end;
 
-    inc(Gear^.Tag);
-    if (Gear^.Tag = 47) or (cWaterLine = 0) then
-        DeleteGear(Gear)
+    dec(Gear^.Tag);
 end;
 
 ////////////////////////////////////////////////////////////////////////////////