hedgewars/uGears.pas
changeset 7687 c73fd8cfa7c0
parent 7669 a85e1c167b69
child 7721 2b1ad418ba39
--- a/hedgewars/uGears.pas	Mon Aug 27 17:40:16 2012 +0200
+++ b/hedgewars/uGears.pas	Sun Sep 16 16:54:51 2012 +0200
@@ -284,7 +284,7 @@
             end;
     stChWin:
         begin
-        CheckForWin;
+        CheckForWin();
         inc(step)
         end;
     stWater:
@@ -296,8 +296,8 @@
             AddGear(0, 0, gtWaterUp, 0, _0, _0, 0)^.Tag:= cWaterRise;
         inc(step)
         end
-    else
-        inc(step);
+    else // since we are not raising the water, a second win-check isn't needed
+        inc(step,2);
     stChWin2:
         begin
         CheckForWin;
@@ -570,7 +570,7 @@
 Gear:= GearsList;
 while Gear <> nil do
     begin
-    if Gear^.State and gstInvisible = 0 then
+    if (Gear^.State and gstInvisible = 0) and (Gear^.Message and gmRemoveFromList = 0) then
         begin
         x:= hwRound(Gear^.X) + WorldDx;
         y:= hwRound(Gear^.Y) + WorldDy;