Always mark defeated/victorious players as spectating
This commit is contained in:
@@ -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<PlayerBitMask>(InternalName);
|
||||
|
||||
// Set this property before running any Created callbacks on the player actor
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user