world wrap water sentries
authoralfadur
Sun, 12 Jul 2020 01:08:42 +0300
changeset 15721 1244c64b8e28
parent 15720 b743adf298d8
child 15722 498c1482dec2
world wrap water sentries
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Jul 11 23:06:29 2020 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Jul 12 01:08:42 2020 +0300
@@ -7575,7 +7575,11 @@
     if (Gear^.Tag = sentry_Walking) and ((GameTicks and $1F) = 0) then
     begin
         if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0 then
-            Gear^.X := Gear^.X + SignAs(_1, Gear^.dX)
+        begin
+            Gear^.dX := SignAs(_1, Gear^.dX);
+            Gear^.X := Gear^.X + Gear^.dX;
+            WorldWrap(Gear);
+        end
         else
             Gear^.Timer := 0
     end;