Fix hog teleporting back and forth when walking on portals on floor. Fixes bug 686
authorWuzzy <Wuzzy2@mail.ru>
Wed, 05 Sep 2018 18:07:56 +0200
changeset 13771 9fdb13633bcb
parent 13770 3d2a7c563d8e
child 13772 2e8b3081cf80
Fix hog teleporting back and forth when walking on portals on floor. Fixes bug #686
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Wed Sep 05 01:53:21 2018 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Wed Sep 05 18:07:56 2018 +0200
@@ -910,7 +910,7 @@
         end;
 
     if (Gear^.Message and (gmLeft or gmRight) <> 0) and (Gear^.State and gstMoving = 0) and 
-		(CheckGearNear(Gear, gtPortal, 26, 26) <> nil) then 
+		(CheckGearNear(Gear, gtPortal, 26, 26) = nil) then
 		Gear^.PortalCounter:= 0;
     PrevdX:= hwSign(Gear^.dX);
     if (Gear^.Message and gmLeft  )<>0 then