--- a/hedgewars/uGears.pas Thu Jan 12 16:33:26 2006 +0000
+++ b/hedgewars/uGears.pas Thu Jan 12 22:07:36 2006 +0000
@@ -228,6 +228,7 @@
end;
procedure DeleteGear(Gear: PGear);
+var team: PTeam;
begin
if Gear.CollIndex < High(Longword) then DeleteCR(Gear);
if Gear.Kind = gtHedgehog then
@@ -239,8 +240,9 @@
exit
end else
begin
- RecountTeamHealth(PHedgehog(Gear.Hedgehog).Team);
+ team:= PHedgehog(Gear.Hedgehog).Team;
PHedgehog(Gear.Hedgehog).Gear:= nil;
+ RecountTeamHealth(team);
end;
if CurAmmoGear = Gear then
CurAmmoGear:= nil;