Set dX to zero in hedgehog walk routine to prevent unexpected changes in X coordinate in certain conditions
authorunc0rr
Wed, 04 Sep 2019 23:23:23 +0200
changeset 15399 b7e40129dbdb
parent 15398 0ef770a40e75
child 15400 a87b5e16b863
Set dX to zero in hedgehog walk routine to prevent unexpected changes in X coordinate in certain conditions
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Wed Sep 04 00:07:23 2019 +0300
+++ b/hedgewars/uGearsHedgehog.pas	Wed Sep 04 23:23:23 2019 +0200
@@ -916,10 +916,10 @@
 		Gear^.PortalCounter:= 0;
     PrevdX:= hwSign(Gear^.dX);
     if (Gear^.Message and gmLeft  )<>0 then
-        Gear^.dX:= -cLittle else
+        Gear^.dX:= -_0 else
     if (Gear^.Message and gmRight )<>0 then
-        Gear^.dX:=  cLittle
-        else exit;
+        Gear^.dX:=  _0
+    else exit;
 
     StepSoundTimer:= cHHStepTicks;