mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 13:53:57 -07: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:
parent
c84d41dc41
commit
fb8f360ef0
1 changed files with 2 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue