--- a/hedgewars/uTeams.pas Mon Oct 13 19:04:27 2008 +0000
+++ b/hedgewars/uTeams.pas Tue Oct 14 14:33:54 2008 +0000
@@ -329,18 +329,21 @@
var i: LongInt;
begin
with team^ do
- begin
- NewTeamHealthBarWidth:= 0;
- for i:= 0 to cMaxHHIndex do
- if Hedgehogs[i].Gear <> nil then
- inc(NewTeamHealthBarWidth, Hedgehogs[i].Gear^.Health);
- TeamHealth:= NewTeamHealthBarWidth;
- if NewTeamHealthBarWidth > MaxTeamHealth then
- begin
- MaxTeamHealth:= NewTeamHealthBarWidth;
- RecountAllTeamsHealth;
- end else NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
- end;
+ begin
+ NewTeamHealthBarWidth:= 0;
+
+ if not hasGone then
+ for i:= 0 to cMaxHHIndex do
+ if Hedgehogs[i].Gear <> nil then
+ inc(NewTeamHealthBarWidth, Hedgehogs[i].Gear^.Health);
+
+ TeamHealth:= NewTeamHealthBarWidth;
+ if NewTeamHealthBarWidth > MaxTeamHealth then
+ begin
+ MaxTeamHealth:= NewTeamHealthBarWidth;
+ RecountAllTeamsHealth;
+ end else NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
+ end;
RecountClanHealth(team^.Clan);