mirror of https://github.com/OpenTTD/OpenTTD
(svn r197) -Fix: Disable Fast Forward in network games visually (didn't work anyways, just showed graphical output)
parent
0caa819190
commit
80cb0b7fd6
|
@ -1654,6 +1654,9 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
|
||||||
GfxFillRect(0, 0, w->width-1, w->height-1, 0xB2);
|
GfxFillRect(0, 0, w->width-1, w->height-1, 0xB2);
|
||||||
GfxFillRect(0, 0, w->width-1, w->height-1, 0x80B4);
|
GfxFillRect(0, 0, w->width-1, w->height-1, 0x80B4);
|
||||||
|
|
||||||
|
// if networking, disable fast-forward button
|
||||||
|
if (_networking) w->disabled_state |= (1 << 1);
|
||||||
|
|
||||||
// if spectator, disable things
|
// if spectator, disable things
|
||||||
if (_current_player == OWNER_SPECTATOR){
|
if (_current_player == OWNER_SPECTATOR){
|
||||||
w->disabled_state |= (1 << 0) | (1 << 19) | (1<<20) | (1<<21) | (1<<22) | (1<<23);
|
w->disabled_state |= (1 << 0) | (1 << 19) | (1<<20) | (1<<21) | (1<<22) | (1<<23);
|
||||||
|
|
2
sdl.c
2
sdl.c
|
@ -542,7 +542,7 @@ static int SdlVideoMainLoop()
|
||||||
#else
|
#else
|
||||||
if (keys[SDLK_TAB]) {
|
if (keys[SDLK_TAB]) {
|
||||||
#endif
|
#endif
|
||||||
_fast_forward |= 2;
|
if (!_networking) _fast_forward |= 2;
|
||||||
} else if (_fast_forward&2) {
|
} else if (_fast_forward&2) {
|
||||||
_fast_forward = 0;
|
_fast_forward = 0;
|
||||||
}
|
}
|
||||||
|
|
2
win32.c
2
win32.c
|
@ -672,7 +672,7 @@ static int Win32GdiMainLoop()
|
||||||
#else
|
#else
|
||||||
if (_wnd.has_focus && GetAsyncKeyState(VK_TAB) < 0) {
|
if (_wnd.has_focus && GetAsyncKeyState(VK_TAB) < 0) {
|
||||||
#endif
|
#endif
|
||||||
_fast_forward |= 2;
|
if (!_networking) _fast_forward |= 2;
|
||||||
} else if (_fast_forward&2) {
|
} else if (_fast_forward&2) {
|
||||||
_fast_forward = 0;
|
_fast_forward = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue