Fix movement stopping when activating saucer after longjump
authorWuzzy <Wuzzy2@mail.ru>
Mon, 05 Aug 2019 22:28:59 +0200
changeset 15317 b5171e6c94a4
parent 15316 f382ec6dba11
child 15318 6afce21e60c3
Fix movement stopping when activating saucer after longjump
ChangeLog.txt
hedgewars/uGearsHandlersMess.pas
--- a/ChangeLog.txt	Mon Aug 05 00:20:45 2019 +0200
+++ b/ChangeLog.txt	Mon Aug 05 22:28:59 2019 +0200
@@ -40,6 +40,7 @@
  * Fix hog floating when switching to moving hog
  * Fix jump key not being ignored after placing girder or target
  * Fix buggy hog when hog took damage during "idle" phase in kamikaze attack
+ * Fix movement stopping when activating flying saucer after long jump
 
 Styles and schemes:
  + The Specialists: Unlock game scheme
--- a/hedgewars/uGearsHandlersMess.pas	Mon Aug 05 00:20:45 2019 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Aug 05 22:28:59 2019 +0200
@@ -4635,7 +4635,9 @@
 
     if ((Gear^.State and gsttmpFlag) = 0)
     or (HHGear^.dY < _0) then
-        doStepHedgehogMoving(HHGear);
+        doStepHedgehogMoving(HHGear)
+    else
+        HHGear^.dX:= SignAs(_0, HHGear^.dX);
 
     if
         (HHGear^.Damage <> 0)
@@ -4680,7 +4682,6 @@
         if (dY < _0_1) and (dY > -_0_1) then
             begin
             Gear^.State := Gear^.State or gsttmpFlag;
-            dX := SignAs(_0, dX);
             dY := dY - _0_2
             end
         end