hedgewars/GSHandlers.inc
changeset 817 7069f18517e9
parent 813 36fffe78ff11
child 819 129cdeabc9d4
equal deleted inserted replaced
816:235d56fe19f4 817:7069f18517e9
  1031 
  1031 
  1032 ////////////////////////////////////////////////////////////////////////////////
  1032 ////////////////////////////////////////////////////////////////////////////////
  1033 
  1033 
  1034 procedure doStepParachute(Gear: PGear);
  1034 procedure doStepParachute(Gear: PGear);
  1035 var HHGear: PGear;
  1035 var HHGear: PGear;
       
  1036     Timer: Longword;
  1036 begin
  1037 begin
  1037 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
  1038 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
  1038 HHGear^.State:= HHGear^.State and not gstAttacking;
  1039 HHGear^.State:= HHGear^.State and not gstAttacking;
  1039 DeleteCI(HHGear);
  1040 DeleteCI(HHGear);
  1040 
  1041 
  1050         SetLittle(dX);
  1051         SetLittle(dX);
  1051         dY:= _0;
  1052         dY:= _0;
  1052         State:= State and not (gstAttacking or gstAttacked);
  1053         State:= State and not (gstAttacking or gstAttacked);
  1053         State:= State or gstMoving;
  1054         State:= State or gstMoving;
  1054         end;
  1055         end;
  1055    DeleteGear(Gear);
  1056    Timer:= Gear^.Timer;
  1056    if Gear^.Timer > 10 then
  1057    DeleteGear(Gear);
       
  1058    if Timer > 10 then
  1057       begin
  1059       begin
  1058       OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
  1060       OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
  1059       ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^)
  1061       ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^)
  1060       end;
  1062       end;
  1061    exit
  1063    exit