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 15394 b7e40129dbdb
parent 15393 0ef770a40e75
child 15395 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;