Fix IsSinglePlayer

This commit is contained in:
rob-v
2017-05-16 22:34:20 +02:00
committed by Paul Chote
parent 8a508ecafa
commit 78bedb0513
11 changed files with 29 additions and 24 deletions

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.Traits
{
@@ -113,7 +114,7 @@ namespace OpenRA.Traits
void INotifyCreated.Created(Actor self)
{
Enabled = self.World.LobbyInfo.IsSinglePlayer || self.World.LobbyInfo.GlobalSettings
Enabled = self.World.LobbyInfo.NonBotPlayers.Count() == 1 || self.World.LobbyInfo.GlobalSettings
.OptionOrDefault("cheats", info.Enabled);
}