hedgewars/GSHandlers.inc
changeset 3406 f4bdebced042
parent 3404 d445798e5fe2
child 3407 dcc129c4352e
--- a/hedgewars/GSHandlers.inc	Sun May 02 18:42:19 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Sun May 02 20:30:23 2010 +0000
@@ -3133,15 +3133,18 @@
             iterator:= GearsList;
             while iterator <> nil do
                 begin
-                iterator^.Active:= true;
-                if iterator^.dY.QWordValue = _0.QWordValue then iterator^.dY.isNegative:= false;
-                iterator^.State:= iterator^.State or gstMoving;
-                DeleteCI(iterator);
-                inc(iterator^.dY.QWordValue,10);
-                iterator:= iterator^.NextGear;
+                if iterator^.Kind <> gtPortal then
+                    begin
+                    iterator^.Active:= true;
+                    if iterator^.dY.QWordValue = _0.QWordValue then iterator^.dY.isNegative:= false;
+                    iterator^.State:= iterator^.State or gstMoving;
+                    DeleteCI(iterator);
+                    inc(iterator^.dY.QWordValue,10);
+                    end;
+                iterator:= iterator^.NextGear
                 end;
             doStepPortal(Gear);
-            if Gear^.IntersectGear <> nil then doStepPortal(Gear^.IntersectGear);
+            if Gear^.IntersectGear <> nil then Gear^.IntersectGear^.doStep(Gear^.IntersectGear);
             end
         end
     end