hedgewars/GSHandlers.inc
changeset 817 7069f18517e9
parent 813 36fffe78ff11
child 819 129cdeabc9d4
--- a/hedgewars/GSHandlers.inc	Thu Mar 20 23:44:19 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Mar 21 20:34:48 2008 +0000
@@ -1033,6 +1033,7 @@
 
 procedure doStepParachute(Gear: PGear);
 var HHGear: PGear;
+    Timer: Longword;
 begin
 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
 HHGear^.State:= HHGear^.State and not gstAttacking;
@@ -1052,8 +1053,9 @@
         State:= State and not (gstAttacking or gstAttacked);
         State:= State or gstMoving;
         end;
+   Timer:= Gear^.Timer;
    DeleteGear(Gear);
-   if Gear^.Timer > 10 then
+   if Timer > 10 then
       begin
       OnUsedAmmo(PHedgehog(HHGear^.Hedgehog)^);
       ApplyAmmoChanges(PHedgehog(HHGear^.Hedgehog)^)