--- a/hedgewars/CCHandlers.inc Tue May 19 22:48:27 2009 +0000
+++ b/hedgewars/CCHandlers.inc Wed May 20 16:35:27 2009 +0000
@@ -282,7 +282,7 @@
bShowFinger:= false;
with CurrentHedgehog^.Gear^ do
begin
- {$IFDEF DEBUGFILE}AddFileLog('/+attack: Gear^.State = '+inttostr(State));{$ENDIF}
+ {$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF}
if ((State and gstHHDriven) <> 0) then
begin
FollowGear:= CurrentHedgehog^.Gear;
--- a/hedgewars/uGears.pas Tue May 19 22:48:27 2009 +0000
+++ b/hedgewars/uGears.pas Wed May 20 16:35:27 2009 +0000
@@ -404,7 +404,7 @@
end;
if Gear^.Kind = gtHedgehog then
- if CurAmmoGear <> nil then
+ if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
begin
Gear^.Message:= gm_Destroy;
CurAmmoGear^.Message:= gm_Destroy;