(svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother -Fix: new game + pause on new game + autopause make the game not unpause on the first join
This commit is contained in:
@@ -54,7 +54,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
EndGameWindow(const WindowDesc *desc) : EndGameHighScoreBaseWindow(desc)
|
||||
{
|
||||
/* Pause in single-player to have a look at the highscore at your own leisure */
|
||||
if (!_networking) DoCommandP(0, 1, 0, CMD_PAUSE);
|
||||
if (!_networking) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
||||
|
||||
this->background_img = SPR_TYCOON_IMG1_BEGIN;
|
||||
|
||||
@@ -82,7 +82,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
|
||||
~EndGameWindow()
|
||||
{
|
||||
if (!_networking) DoCommandP(0, 0, 0, CMD_PAUSE); // unpause
|
||||
if (!_networking) DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE); // unpause
|
||||
ShowHighscoreTable(this->window_number, this->rank);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
HighScoreWindow(const WindowDesc *desc, int difficulty, int8 ranking) : EndGameHighScoreBaseWindow(desc)
|
||||
{
|
||||
/* pause game to show the chart */
|
||||
if (!_networking) DoCommandP(0, 1, 0, CMD_PAUSE);
|
||||
if (!_networking) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
||||
|
||||
/* Close all always on-top windows to get a clean screen */
|
||||
if (_game_mode != GM_MENU) HideVitalWindows();
|
||||
@@ -130,7 +130,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
{
|
||||
if (_game_mode != GM_MENU) ShowVitalWindows();
|
||||
|
||||
if (!_networking) DoCommandP(0, 0, 0, CMD_PAUSE); // unpause
|
||||
if (!_networking) DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE); // unpause
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
|
Reference in New Issue
Block a user