Don't remove already removed team
authorunc0rr
Wed, 23 May 2012 23:24:03 +0400
changeset 7119 2737c488756b
parent 7118 dcdbb6fcc924
child 7120 9257cf8e7af2
Don't remove already removed team
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Wed May 23 21:19:15 2012 +0200
+++ b/hedgewars/uTeams.pas	Wed May 23 23:24:03 2012 +0400
@@ -580,12 +580,13 @@
     exit;
 
 with TeamsArray[t]^ do
-    begin
-    AddChatString('** '+ TeamName + ' is gone');
-    hasGone:= true
-    end;
+    if not hasGone then
+        begin
+        AddChatString('** '+ TeamName + ' is gone');
+        hasGone:= true;
 
-RecountTeamHealth(TeamsArray[t])
+        RecountTeamHealth(TeamsArray[t])
+        end;
 end;