hedgewars/uGearsHandlersMess.pas
changeset 11342 aa3f886c6298
parent 11305 a20f416c91ec
child 11389 c93f204a5a00
--- a/hedgewars/uGearsHandlersMess.pas	Mon Nov 09 21:09:51 2015 +0300
+++ b/hedgewars/uGearsHandlersMess.pas	Mon Nov 09 19:21:40 2015 +0100
@@ -2650,7 +2650,11 @@
 
     AfterAttack;
 
-    HHGear^.State := HHGear^.State and (not (gstAttacking or gstAttacked or gstMoving));
+    // make sure hog doesn't end up facing in wrong direction due to high jump
+    if (HHGear^.State and gstHHHJump) <> 0 then
+        HHGear^.dX.isNegative := (not HHGear^.dX.isNegative);
+
+    HHGear^.State := HHGear^.State and (not (gstAttacking or gstAttacked or gstMoving or gstHHJumping or gstHHHJump));
     HHGear^.Message := HHGear^.Message and (not gmAttack);
 
     Gear^.doStep := @doStepParachuteWork;