Fix collision with current hedgehog
authorunc0rr
Sun, 27 May 2007 17:55:55 +0000
changeset 528 54fd6924de4e
parent 527 e23490ce1f06
child 529 812682c1ab62
Fix collision with current hedgehog
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Sun May 27 17:33:06 2007 +0000
+++ b/hedgewars/HHHandlers.inc	Sun May 27 17:55:55 2007 +0000
@@ -271,7 +271,8 @@
    exit
    end;
    
-if ((Gear^.State and gstFalling) <> 0) or (StepTicks = cHHStepTicks)
+if ((Gear^.State and (gstFalling or gstMoving)) <> 0)
+   or (StepTicks = cHHStepTicks)
    or (CurAmmoGear <> nil) then // we're moving
    begin
    // check for case with ammo
@@ -289,7 +290,7 @@
 if ((Gear^.Message and gm_Attack) <> 0) or
    ((Gear^.State and gstAttacking) <> 0)then Attack(Gear);
 
-if (Gear^.State and gstFalling) <> 0 then
+if (Gear^.State and (gstFalling or gstMoving)) <> 0 then
    begin
    if ((Gear^.Message and gm_HJump) <> 0) and
       ((Gear^.State and gstHHJumping) <> 0) and