hedgewars/CCHandlers.inc
changeset 145 e593d5266e01
parent 110 330a2dbacd67
child 154 5667e6f38704
--- a/hedgewars/CCHandlers.inc	Wed Sep 13 19:26:16 2006 +0000
+++ b/hedgewars/CCHandlers.inc	Thu Sep 14 17:20:50 2006 +0000
@@ -47,8 +47,15 @@
 end;
 
 procedure chAddTeam(var s: shortstring);
+const TeamsCount: Longword = 0;
 begin
-if isDeveloperMode then AddTeam;
+if isDeveloperMode then
+   begin
+   inc(TeamsCount);
+   TryDo(TeamsCount <= 5, 'Too many teams', true);
+   AddTeam
+   end;
+   
 if GameType in [gmtDemo, gmtSave] then CurrentTeam.ExtDriven:= true
 end;