add a bot player, make ai apply to the bot not the local player
This commit is contained in:
@@ -113,6 +113,8 @@ namespace OpenRA.Server
|
||||
}
|
||||
}
|
||||
} ) { IsBackground = true }.Start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
static Session.Slot MakeSlotFromPlayerReference(PlayerReference pr)
|
||||
|
||||
@@ -48,7 +48,15 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void GameStarted(World w)
|
||||
{
|
||||
p = Game.world.LocalPlayer;
|
||||
try
|
||||
{
|
||||
p = Game.world.players.First(c => c.Value.PlayerName.Equals("bot")).Value;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//Could not find a bot.
|
||||
}
|
||||
//p = Game.world.LocalPlayer;
|
||||
enabled = Game.IsHost && p != null;
|
||||
if (enabled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user