fixed #2540 AI orders misinterpreted as an exploit on dedicated

This commit is contained in:
Matthias Mailänder
2013-04-04 20:39:54 +02:00
parent 2fe20b13f1
commit 819e48334e
6 changed files with 35 additions and 16 deletions

View File

@@ -71,8 +71,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
foreach (var b in Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name))
{
var bot = b;
var botController = orderManager.LobbyInfo.Clients.Where(c => c.IsAdmin).FirstOrDefault();
options.Add(new SlotDropDownOption("Bot: {0}".F(bot),
"slot_bot {0} {1}".F(slot.PlayerReference, bot),
"slot_bot {0} {1} {2}".F(slot.PlayerReference, botController.Index, bot),
() => client != null && client.Bot == bot));
}