working game with bots; stop bots from trying to order husks around

This commit is contained in:
Chris Forbes
2010-08-25 20:05:02 +12:00
parent 701ef05562
commit f2dd0de1ea
3 changed files with 29 additions and 12 deletions

View File

@@ -58,7 +58,8 @@ namespace OpenRA
PlayerName = InternalName = pr.Name;
NonCombatant = pr.NonCombatant;
Country = world.GetCountries()
.FirstOrDefault(c => pr.Race == c.Race);
.FirstOrDefault(c => pr.Race == c.Race)
?? world.GetCountries().Random(world.SharedRandom);
PlayerRef = pr;