hedgewars/uGearsHandlersMess.pas
branchios-revival
changeset 11388 1ae8d4582e1e
parent 11342 aa3f886c6298
child 11389 c93f204a5a00
--- a/hedgewars/uGearsHandlersMess.pas	Sun Nov 15 14:40:51 2015 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Nov 15 14:42:59 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;