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

@@ -528,9 +528,11 @@ namespace OpenRA.Server
SendDisconnected(toDrop); /* Report disconnection */
lobbyInfo.Clients.RemoveAll(c => c.Index == toDrop.PlayerIndex);
// remove the bots he added
lobbyInfo.Clients.RemoveAll(c => c.BotControllerClientIndex == toDrop.PlayerIndex);
// reassign admin if necessary
if ( lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin && State == ServerState.WaitingPlayers)
if (lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin && State == ServerState.WaitingPlayers)
{
if (lobbyInfo.Clients.Where(c1 => c1.Bot == null).Count() > 0)
{
@@ -545,7 +547,7 @@ namespace OpenRA.Server
if (conns.Count != 0 || lobbyInfo.GlobalSettings.Dedicated)
SyncLobbyInfo();
if ( !lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin )
if (!lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin)
Shutdown();
}