mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-23 00:26:00 +00:00
Fix missing observermode for players who won (and that's why a ternary was used there before 9f796068f8).
Don't start the defeat music when clicking on resign and then restarting it right on the next turn. This was SVN commit r18539.
This commit is contained in:
@@ -446,9 +446,8 @@ function playerFinished(player, won)
|
||||
global.music.states.DEFEAT
|
||||
);
|
||||
|
||||
// Select "observer" item
|
||||
if (!won)
|
||||
Engine.GetGUIObjectByName("viewPlayer").selected = 0;
|
||||
// Select "observer" item on loss. On win enable observermode without changing perspective
|
||||
Engine.GetGUIObjectByName("viewPlayer").selected = won ? g_ViewedPlayer : 0;
|
||||
|
||||
g_ConfirmExit = won ? "won" : "defeated";
|
||||
}
|
||||
@@ -510,8 +509,6 @@ function resignGame(leaveGameAfterResign)
|
||||
"resign": true
|
||||
});
|
||||
|
||||
global.music.setState(global.music.states.DEFEAT);
|
||||
|
||||
if (!leaveGameAfterResign)
|
||||
resumeGame(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user