hedgewars/uTeams.pas
changeset 14499 35724823b0d3
parent 14498 4b678aad50e9
child 14502 65b25ca6ff31
--- a/hedgewars/uTeams.pas	Wed Dec 19 19:10:42 2018 +0100
+++ b/hedgewars/uTeams.pas	Wed Dec 19 20:27:35 2018 +0100
@@ -29,7 +29,7 @@
 procedure freeModule;
 
 function  AddTeam(TeamColor: Longword): PTeam;
-function  SetMissionTeam(TeamColor: Longword): PTeam;
+function  SetMissionTeam(): PTeam;
 procedure SwitchHedgehog;
 procedure AfterSwitchHedgehog;
 procedure InitTeams;
@@ -477,7 +477,7 @@
     end;
 end;
 
-function SetMissionTeam(TeamColor: Longword): PTeam;
+function SetMissionTeam(): PTeam;
 var team: PTeam;
 begin
 New(team);
@@ -798,8 +798,7 @@
 end;
 
 procedure chSetMissionTeam(var s: shortstring);
-var Color: Longword;
-    ts, cs: shortstring;
+var ts, cs: shortstring;
 begin
 cs:= '';
 ts:= '';
@@ -807,11 +806,8 @@
     begin
     SplitBySpace(s, cs);
     SplitBySpace(cs, ts);
-    Color:= StrToInt(cs);
 
-    // color is always little endian so the mask must be constant also in big endian archs
-    Color:= Color or $FF000000;
-    SetMissionTeam(Color);
+    SetMissionTeam();
 
     if CurrentTeam <> nil then
         begin