diff options
author | rubidium <rubidium@openttd.org> | 2009-05-06 15:06:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-06 15:06:57 +0000 |
commit | 2664f2a2d95dbc2122ff1f9b96e8569ae401892f (patch) | |
tree | fb2112ce7a51edd259190186790bf00319a53510 /src/toolbar_gui.cpp | |
parent | bb121a1510fbd3faea71b794b1f6bdaba1641665 (diff) | |
download | openttd-2664f2a2d95dbc2122ff1f9b96e8569ae401892f.tar.xz |
(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
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index fdc7715ef..93e22bb24 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -249,7 +249,7 @@ static void ToolbarPauseClick(Window *w) { if (_networking && !_network_server) return; // only server can pause the game - if (DoCommandP(0, _pause_game ? 0 : 1, 0, CMD_PAUSE)) SndPlayFx(SND_15_BEEP); + if (DoCommandP(0, PM_PAUSED_NORMAL, _pause_mode == PM_UNPAUSED, CMD_PAUSE)) SndPlayFx(SND_15_BEEP); } /* --- Fast forwarding --- */ @@ -1106,7 +1106,7 @@ struct MainToolbarWindow : Window { virtual void OnTick() { - if (this->IsWidgetLowered(TBN_PAUSE) != !!_pause_game) { + if (this->IsWidgetLowered(TBN_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(TBN_PAUSE); this->InvalidateWidget(TBN_PAUSE); } @@ -1379,7 +1379,7 @@ public: virtual void OnTick() { - if (this->IsWidgetLowered(TBSE_PAUSE) != !!_pause_game) { + if (this->IsWidgetLowered(TBSE_PAUSE) != !!_pause_mode) { this->ToggleWidgetLoweredState(TBSE_PAUSE); this->SetDirty(); } |