fix marking player as spectator going through unsynced code
This commit is contained in:
@@ -238,7 +238,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString == "Surrender")
|
||||
{
|
||||
ForceDefeat(self.Owner);
|
||||
self.Owner.Spectating = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (world.LocalPlayer.WinState != WinState.Undefined)
|
||||
Game.RunAfterDelay(objectives != null ? objectives.Info.GameOverDelay : 0, () =>
|
||||
{
|
||||
world.LocalPlayer.Spectating = true;
|
||||
playerRoot.RemoveChildren();
|
||||
Game.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user