forked from mirrors/0ad
Change the perspective to "observer" to reveal the map to observers who watched a player resign, while keeping the choice to see the old territory from d5b85c7ffc.
This was SVN commit r18860.
This commit is contained in:
@@ -455,6 +455,12 @@ function playerFinished(player, won)
|
||||
updateDiplomacy();
|
||||
updateChatAddressees();
|
||||
|
||||
if (player != g_ViewedPlayer)
|
||||
return;
|
||||
|
||||
// Select "observer" item on loss. On win enable observermode without changing perspective
|
||||
Engine.GetGUIObjectByName("viewPlayer").selected = won ? g_ViewedPlayer + 1 : 0;
|
||||
|
||||
if (player != Engine.GetPlayerID() || Engine.IsAtlasRunning())
|
||||
return;
|
||||
|
||||
@@ -464,9 +470,6 @@ function playerFinished(player, won)
|
||||
global.music.states.DEFEAT
|
||||
);
|
||||
|
||||
// Select "observer" item on loss. On win enable observermode without changing perspective
|
||||
Engine.GetGUIObjectByName("viewPlayer").selected = won ? g_ViewedPlayer + 1 : 0;
|
||||
|
||||
g_ConfirmExit = won ? "won" : "defeated";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user