hedgewars/CCHandlers.inc
changeset 549 4278a80140a8
parent 547 b81a055f2d06
child 589 f382c41f658a
--- a/hedgewars/CCHandlers.inc	Tue Jul 03 14:47:33 2007 +0000
+++ b/hedgewars/CCHandlers.inc	Tue Jul 03 16:09:04 2007 +0000
@@ -47,18 +47,17 @@
 end;
 
 procedure chAddTeam(var s: shortstring);
+var Color: Longword;
 begin
 if isDeveloperMode then
    begin
    ParseCommand('ammstore 93919294221912103323', true);
-   AddTeam;
-
+   val(s, Color);
+   TryDo(Color <> 0, 'Error: black team color', true);
 
-   if GameType in [gmtDemo, gmtSave] then CurrentTeam^.ExtDriven:= true;
-   val(s, CurrentTeam^.Color);
-   TryDo(CurrentTeam^.Color <> 0, 'Error: black team color', true);
-   CurrentTeam^.AdjColor:= CurrentTeam^.Color;
-   AdjustColor(CurrentTeam^.AdjColor)
+   AddTeam(Color);
+
+   if GameType in [gmtDemo, gmtSave] then CurrentTeam^.ExtDriven:= true
    end
 end;