Change to just set timer to 0
authornemo
Mon, 17 May 2010 02:54:56 +0000
changeset 3470 2b0c88693535
parent 3469 39e16d76d745
child 3471 e1f1ab5dfd8f
Change to just set timer to 0
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Mon May 17 00:48:16 2010 +0000
+++ b/hedgewars/uGears.pas	Mon May 17 02:54:56 2010 +0000
@@ -823,7 +823,7 @@
 //If any of these are set as permanent toggles in the frontend, that needs to be checked and skipped here.
 procedure EndTurnCleanup;
 var  i: LongInt;
-    tmpGear, iterator: PGear;
+    iterator: PGear;
 begin
     SpeechText:= ''; // in case it has not been consumed
 
@@ -858,16 +858,10 @@
                         Gear^.Invulnerable:= false;
                   end;
     iterator:= GearsList;
-    tmpGear:= nil;
     while iterator <> nil do
         begin
-        if (iterator^.Kind = gtPortal) then 
-            begin
-            tmpGear:= iterator;
-            iterator:= iterator^.NextGear;
-            DeleteGear(tmpGear)
-            end
-        else iterator:= iterator^.NextGear;
+        if (iterator^.Kind = gtPortal) then iterator^.Timer:= 0;
+        iterator:= iterator^.NextGear;
         end;
 end;