diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-14 18:25:01 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-14 18:25:01 +0000 |
commit | fbb794d450bd900a9a0b3326f20daa931781261f (patch) | |
tree | f7564ed6ed05665e86db5012a81bb674946c9b90 /settings_gui.c | |
parent | 5174d3adfe9e3b120fd2c50847c7f9cf772a702b (diff) | |
download | openttd-fbb794d450bd900a9a0b3326f20daa931781261f.tar.xz |
(svn r2307) - Fix (regression): it was not possible to change the drive-side in the intro-game.
- CodeChange: remove unused "CANT_DO_THIS" double-string.
Diffstat (limited to 'settings_gui.c')
-rw-r--r-- | settings_gui.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/settings_gui.c b/settings_gui.c index 1d4241aad..19e2acacf 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -70,7 +70,7 @@ static int GetCurRes(void) static inline bool RoadVehiclesAreBuilt(void) { - Vehicle *v; + const Vehicle *v; FOR_ALL_VEHICLES(v) { if (v->type == VEH_Road) return true; } @@ -171,7 +171,7 @@ static void GameOptionsWndProc(Window *w, WindowEvent *e) break; case 11: /* Road side */ if (_opt_ptr->road_side != e->dropdown.index) { // only change if setting changed - DoCommandP(0, e->dropdown.index, 0, NULL, CMD_SET_ROAD_DRIVE_SIDE | CMD_MSG(STR_EMPTY)); + DoCommandP(0, e->dropdown.index, 0, NULL, CMD_SET_ROAD_DRIVE_SIDE | CMD_MSG(STR_00B4_CAN_T_DO_THIS)); MarkWholeScreenDirty(); } break; @@ -214,8 +214,9 @@ static void GameOptionsWndProc(Window *w, WindowEvent *e) */ int32 CmdSetRoadDriveSide(int x, int y, uint32 flags, uint32 p1, uint32 p2) { - /* Check boundaries and you can only change this if NO vehicles have been built yet */ - if (p1 > 1 || RoadVehiclesAreBuilt()) return CMD_ERROR; + /* Check boundaries and you can only change this if NO vehicles have been built yet, + * except in the intro-menu where of course it's always possible to do so. */ + if (p1 > 1 || (_game_mode != GM_MENU && RoadVehiclesAreBuilt())) return CMD_ERROR; if (flags & DC_EXEC) { _opt_ptr->road_side = p1; |