hedgewars/GSHandlers.inc
changeset 161 d8870bbf960e
parent 146 458f4f58c1b6
child 183 57c2ef19f719
--- a/hedgewars/GSHandlers.inc	Fri Sep 22 18:09:26 2006 +0000
+++ b/hedgewars/GSHandlers.inc	Sat Sep 23 19:26:07 2006 +0000
@@ -363,14 +363,14 @@
     HHGear: PGear;
 begin
 AllInactive:= false;
+HHGear:= PHedgehog(Gear.Hedgehog).Gear;
 dec(Gear.Timer);
-if (Gear.Timer = 0)or((Gear.Message and gm_Destroy) <> 0) then
+if (Gear.Timer = 0)or((Gear.Message and gm_Destroy) <> 0)or((HHGear.State and gstHHDriven) = 0) then
    begin
    DeleteGear(Gear);
    AfterAttack;
    exit
    end;
-HHGear:= PHedgehog(Gear.Hedgehog).Gear;
 if (Gear.Timer and $3F) = 0 then
    begin
    i:= round(Gear.X) - Gear.Radius  - GetRandom(2);