Fix freezer ray extending with low fuel usage when firing straight up/down while holding up/down key
authorWuzzy <Wuzzy2@mail.ru>
Thu, 25 Oct 2018 23:46:31 +0200
changeset 13995 4d0c80f7aa32
parent 13994 818969052920
child 13996 350adfa0e896
Fix freezer ray extending with low fuel usage when firing straight up/down while holding up/down key
ChangeLog.txt
hedgewars/uGearsHandlersMess.pas
--- a/ChangeLog.txt	Thu Oct 25 23:39:54 2018 +0200
+++ b/ChangeLog.txt	Thu Oct 25 23:46:31 2018 +0200
@@ -25,6 +25,7 @@
  * Fix drill rocket exploding when digging at bounce/wrap world edge
  * Fix freezer ray not working through wrap world edge
  * Fix freezer ray going through bounce world edge
+ * Fix freezer ray extending with low fuel usage when firing straight up/down while holding up/down key
  * Fix cake walking through bounce world edge
  * Fix cake walking through land when reaching wrap world edge
  * Laser sight now works properly through wrap world edge
--- a/hedgewars/uGearsHandlersMess.pas	Thu Oct 25 23:39:54 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Oct 25 23:46:31 2018 +0200
@@ -6332,7 +6332,7 @@
         HedgehogChAngle(HHGear);
         ndX:= SignAs(AngleSin(HHGear^.Angle), HHGear^.dX) * _4;
         ndY:= -AngleCos(HHGear^.Angle) * _4;
-        if (ndX <> dX) or (ndY <> dY) or
+        if (ndX <> dX) or (ndY <> dY) or (Gear^.Message and (gmUp or gmDown) <> 0) or
            (((Target.X <> NoPointX) and (Target.X and LAND_WIDTH_MASK = 0) and
              (Target.Y and LAND_HEIGHT_MASK = 0) and ((Land[Target.Y, Target.X] = 0)) and
              (not CheckCoordInWater(Target.X, Target.Y))) and (CheckGearNear(gtAirMine, int2hwFloat(Target.X),int2hwFloat(Target.Y), Gear^.Radius*3, Gear^.Radius*3) = nil)) then