first step: Race -> string

This commit is contained in:
Chris Forbes
2010-02-10 14:07:40 +13:00
parent 5a95048396
commit c3f4653801
9 changed files with 40 additions and 47 deletions

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Server
Index = newConn.PlayerIndex,
PaletteIndex = ChooseFreePalette(),
Name = "Player {0}".F(1 + newConn.PlayerIndex),
Race = 1,
Race = "allies", /* hack */
State = Session.ClientState.NotReady
});
@@ -249,14 +249,7 @@ namespace OpenRA.Server
return true;
}
int race;
if (!int.TryParse(s, out race) || race < 0 || race > 1)
{
Console.WriteLine("Invalid race: {0}", s);
return false;
}
GetClient(conn).Race = 1 + race;
GetClient(conn).Race = s;
SyncLobbyInfo();
return true;
}},