diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 22d6378dc1..dae3e49cf7 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -75,11 +75,19 @@ namespace OpenRA public WinState WinState = WinState.Undefined; public bool HasObjectives = false; - public bool Spectating; + + public bool Spectating + { + get + { + return spectating || WinState != WinState.Undefined; + } + } public World World { get; private set; } readonly bool inMissionMap; + readonly bool spectating; readonly IUnlocksRenderPlayer[] unlockRenderPlayer; // Each player is identified with a unique bit in the set @@ -180,7 +188,7 @@ namespace OpenRA PlayerName = pr.Name; NonCombatant = pr.NonCombatant; Playable = pr.Playable; - Spectating = pr.Spectating; + spectating = pr.Spectating; BotType = pr.Bot; Faction = ResolveFaction(world, pr.Faction, playerRandom, false); DisplayFaction = ResolveDisplayFaction(world, pr.Faction); @@ -188,7 +196,7 @@ namespace OpenRA SpawnPoint = DisplaySpawnPoint = 0; } - if (!Spectating) + if (!spectating) PlayerMask = new LongBitSet(InternalName); // Set this property before running any Created callbacks on the player actor diff --git a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs index cd7fe3f40d..1dca37f418 100644 --- a/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs +++ b/OpenRA.Mods.Common/Traits/Player/MissionObjectives.cs @@ -249,10 +249,7 @@ namespace OpenRA.Mods.Common.Traits public void ResolveOrder(Actor self, Order order) { if (order.OrderString == "Surrender") - { ForceDefeat(self.Owner); - self.Owner.Spectating = true; - } } }