avoid infinite loop
authornemo
Sun, 20 Oct 2013 20:10:09 -0400
changeset 9565 7f786eb439aa
parent 9563 225dfd449480
child 9567 42bc1b58a242
avoid infinite loop
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sun Oct 20 18:25:58 2013 -0400
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Oct 20 20:10:09 2013 -0400
@@ -1148,7 +1148,7 @@
         Gear^.Y := Gear^.Y + Gear^.dY;
         tX:= Gear^.X;
         tY:= Gear^.Y;
-        if WorldWrap(Gear) then
+        if (Gear^.PortalCounter < 30) and WorldWrap(Gear) then
             begin
             cX:= Gear^.X;
             cY:= Gear^.Y;