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

@@ -287,8 +287,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
var slot = orderManager.LobbyInfo.FirstEmptySlot();
var bot = Rules.Info["player"].Traits.WithInterface<IBotInfo>().Select(t => t.Name).FirstOrDefault();
var botController = orderManager.LobbyInfo.Clients.Where(c => c.IsAdmin).FirstOrDefault();
if (slot != null && bot != null)
orderManager.IssueOrder(Order.Command("slot_bot {0} {1}".F(slot, bot)));
orderManager.IssueOrder(Order.Command("slot_bot {0} {1} {2}".F(slot, botController.Index, bot)));
});
}