hedgewars/uGearsHandlersMess.pas
changeset 15509 6ddfde71ba6a
parent 15473 20066da10268
child 15587 61f2ffcd5652
equal deleted inserted replaced
15508:dfdd0db89760 15509:6ddfde71ba6a
  3089 
  3089 
  3090     DeleteCI(HHGear);
  3090     DeleteCI(HHGear);
  3091 
  3091 
  3092     AfterAttack;
  3092     AfterAttack;
  3093 
  3093 
       
  3094     // Delete parachute early if hog already collides
       
  3095     if (TestCollisionXwithGear(HHGear, -1) <> 0) and (TestCollisionXwithGear(HHGear, 1) <> 0) then
       
  3096         begin
       
  3097         HHGear^.dY := cGravity * 100;
       
  3098         isCursorVisible:= false;
       
  3099         ApplyAmmoChanges(HHGear^.Hedgehog^);
       
  3100         DeleteGear(Gear);
       
  3101         exit;
       
  3102         end;
       
  3103 
  3094     // make sure hog doesn't end up facing in wrong direction due to high jump
  3104     // make sure hog doesn't end up facing in wrong direction due to high jump
  3095     if (HHGear^.State and gstHHHJump) <> 0 then
  3105     if (HHGear^.State and gstHHHJump) <> 0 then
  3096         HHGear^.dX.isNegative := (not HHGear^.dX.isNegative);
  3106         HHGear^.dX.isNegative := (not HHGear^.dX.isNegative);
  3097 
  3107 
  3098     HHGear^.State := HHGear^.State and (not (gstAttacking or gstAttacked or gstMoving or gstHHJumping or gstHHHJump));
  3108     HHGear^.State := HHGear^.State and (not (gstAttacking or gstAttacked or gstMoving or gstHHJumping or gstHHHJump));