Neglected to delete gear at end of turn
authornemo
Fri, 15 May 2009 02:14:13 +0000
changeset 2058 5c2b52755141
parent 2057 cf0d84479251
child 2059 b25eed7f9183
Neglected to delete gear at end of turn
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Fri May 15 00:51:37 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Fri May 15 02:14:13 2009 +0000
@@ -491,7 +491,13 @@
         else
             if(HHGear^.Angle - 1 >= 0) then dec(HHGear^.Angle);
 
-if (TurnTimeLeft > 0) then dec(TurnTimeLeft)
+if (TurnTimeLeft > 0) then 
+    dec(TurnTimeLeft)
+else
+    begin
+	DeleteGear(Gear);
+	AfterAttack
+    end;
 end;
 
 ////////////////////////////////////////////////////////////////////////////////