forked from 0ad/0ad
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
@ -446,9 +446,8 @@ function playerFinished(player, won)
|
|||||||
global.music.states.DEFEAT
|
global.music.states.DEFEAT
|
||||||
);
|
);
|
||||||
|
|
||||||
// Select "observer" item
|
// Select "observer" item on loss. On win enable observermode without changing perspective
|
||||||
if (!won)
|
Engine.GetGUIObjectByName("viewPlayer").selected = won ? g_ViewedPlayer : 0;
|
||||||
Engine.GetGUIObjectByName("viewPlayer").selected = 0;
|
|
||||||
|
|
||||||
g_ConfirmExit = won ? "won" : "defeated";
|
g_ConfirmExit = won ? "won" : "defeated";
|
||||||
}
|
}
|
||||||
@ -510,8 +509,6 @@ function resignGame(leaveGameAfterResign)
|
|||||||
"resign": true
|
"resign": true
|
||||||
});
|
});
|
||||||
|
|
||||||
global.music.setState(global.music.states.DEFEAT);
|
|
||||||
|
|
||||||
if (!leaveGameAfterResign)
|
if (!leaveGameAfterResign)
|
||||||
resumeGame(true);
|
resumeGame(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user