mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen.
This commit is contained in:
parent
e06c121d78
commit
01f06784e7
10
player_gui.c
10
player_gui.c
|
@ -802,7 +802,7 @@ static void EndGameWndProc(Window *w, WindowEvent *e)
|
||||||
} break;
|
} break;
|
||||||
case WE_CLICK: /* Close the window (and show the highscore window) */
|
case WE_CLICK: /* Close the window (and show the highscore window) */
|
||||||
DeleteWindow(w);
|
DeleteWindow(w);
|
||||||
break;
|
break;
|
||||||
case WE_DESTROY: /* Show the highscore window when this one is closed */
|
case WE_DESTROY: /* Show the highscore window when this one is closed */
|
||||||
if (!_networking) DoCommandP(0, 0, 0, NULL, CMD_PAUSE); // unpause
|
if (!_networking) DoCommandP(0, 0, 0, NULL, CMD_PAUSE); // unpause
|
||||||
ShowHighscoreTable(w->window_number, WP(w, highscore_d).rank);
|
ShowHighscoreTable(w->window_number, WP(w, highscore_d).rank);
|
||||||
|
@ -859,7 +859,7 @@ static const Widget _highscore_widgets[] = {
|
||||||
|
|
||||||
static const WindowDesc _highscore_desc = {
|
static const WindowDesc _highscore_desc = {
|
||||||
0, 0, 641, 481,
|
0, 0, 641, 481,
|
||||||
WC_HIGHSCORE_ENDSCREEN,0,
|
WC_HIGHSCORE,0,
|
||||||
0,
|
0,
|
||||||
_highscore_widgets,
|
_highscore_widgets,
|
||||||
HighScoreWndProc
|
HighScoreWndProc
|
||||||
|
@ -867,7 +867,7 @@ static const WindowDesc _highscore_desc = {
|
||||||
|
|
||||||
static const WindowDesc _endgame_desc = {
|
static const WindowDesc _endgame_desc = {
|
||||||
0, 0, 641, 481,
|
0, 0, 641, 481,
|
||||||
WC_HIGHSCORE_ENDSCREEN,0,
|
WC_ENDSCREEN,0,
|
||||||
0,
|
0,
|
||||||
_highscore_widgets,
|
_highscore_widgets,
|
||||||
EndGameWndProc
|
EndGameWndProc
|
||||||
|
@ -886,7 +886,7 @@ void ShowHighscoreTable(int difficulty, int8 ranking)
|
||||||
/* Close all always on-top windows to get a clean screen */
|
/* Close all always on-top windows to get a clean screen */
|
||||||
if (_game_mode != GM_MENU) HideVitalWindows();
|
if (_game_mode != GM_MENU) HideVitalWindows();
|
||||||
|
|
||||||
DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
|
DeleteWindowByClass(WC_HIGHSCORE);
|
||||||
w = AllocateWindowDesc(&_highscore_desc);
|
w = AllocateWindowDesc(&_highscore_desc);
|
||||||
|
|
||||||
if (w != NULL) {
|
if (w != NULL) {
|
||||||
|
@ -909,7 +909,7 @@ void ShowEndGameChart(void)
|
||||||
if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
if (!_networking) DoCommandP(0, 1, 0, NULL, CMD_PAUSE);
|
||||||
|
|
||||||
HideVitalWindows();
|
HideVitalWindows();
|
||||||
DeleteWindowById(WC_HIGHSCORE_ENDSCREEN, 0);
|
DeleteWindowByClass(WC_ENDSCREEN);
|
||||||
w = AllocateWindowDesc(&_endgame_desc);
|
w = AllocateWindowDesc(&_endgame_desc);
|
||||||
|
|
||||||
if (w != NULL) {
|
if (w != NULL) {
|
||||||
|
|
5
ttd.h
5
ttd.h
|
@ -436,8 +436,9 @@ enum {
|
||||||
WC_NETWORK_STATUS_WINDOW = 0x4A,
|
WC_NETWORK_STATUS_WINDOW = 0x4A,
|
||||||
WC_CUSTOM_CURRENCY = 0x4B,
|
WC_CUSTOM_CURRENCY = 0x4B,
|
||||||
WC_REPLACE_VEHICLE = 0x4C,
|
WC_REPLACE_VEHICLE = 0x4C,
|
||||||
WC_HIGHSCORE_ENDSCREEN = 0x4D,
|
WC_HIGHSCORE = 0x4D,
|
||||||
WC_SIGN_LIST = 0x4E,
|
WC_ENDSCREEN = 0x4E,
|
||||||
|
WC_SIGN_LIST = 0x4F,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue