summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-04 16:09:16 +0000
committerrubidium <rubidium@openttd.org>2009-02-04 16:09:16 +0000
commit09fca459a7acd7c1b1e14712678a977d30a13297 (patch)
tree9e8fdb91ff99e8b4da81a383159882a8ff57b155 /src/settings_gui.cpp
parent496b541cb1eb64405ad6e89a322530e8875e183d (diff)
downloadopenttd-09fca459a7acd7c1b1e14712678a977d30a13297.tar.xz
(svn r15335) -Change: use the patch change mechanism to change the road side too instead of a separate command.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index e3d62622c..9cae1373f 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -275,7 +275,9 @@ struct GameOptionsWindow : Window {
case GAMEOPT_ROADSIDE_BTN: // Road side
if (this->opt->vehicle.road_side != index) { // only change if setting changed
- DoCommandP(0, index, 0, CMD_SET_ROAD_DRIVE_SIDE | CMD_MSG(STR_00B4_CAN_T_DO_THIS));
+ uint i;
+ if (GetPatchFromName("vehicle.road_side", &i) == NULL) NOT_REACHED();
+ SetPatchValue(i, index);
MarkWholeScreenDirty();
}
break;