summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-02-13 20:52:33 +0000
committeryexo <yexo@openttd.org>2011-02-13 20:52:33 +0000
commitb51c62f5af9aa09a8d91d04f298c8287e4a5e285 (patch)
tree9c828aa65dbacc2e4622e2de8319eab5e62d9a19
parentf1377a228fbe6ed5e6393c5428970742c520340e (diff)
downloadopenttd-b51c62f5af9aa09a8d91d04f298c8287e4a5e285.tar.xz
(svn r22074) -Cleanup (r22073): there was already a setting-callback that did what is needed
-rw-r--r--src/settings.cpp10
-rw-r--r--src/table/settings.h3
2 files changed, 1 insertions, 12 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index e4bc9f336..68e52fec6 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1147,16 +1147,6 @@ static bool StationCatchmentChanged(int32 p1)
}
-static bool MarkAllTrainsDirty(int32 p1)
-{
- Train *t;
- FOR_ALL_TRAINS(t) {
- if (t->IsPrimaryVehicle()) t->MarkDirty();
- }
- SetWindowClassesDirty(WC_VEHICLE_DETAILS);
- return true;
-}
-
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1)
diff --git a/src/table/settings.h b/src/table/settings.h
index e73ae21cb..58fe09d3d 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -43,7 +43,6 @@ static bool InvalidateCompanyLiveryWindow(int32 p1);
static bool InvalidateNewGRFChangeWindows(int32 p1);
static bool InvalidateIndustryViewWindow(int32 p1);
static bool RedrawTownAuthority(int32 p1);
-static bool MarkAllTrainsDirty(int32 p1);
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1);
@@ -423,7 +422,7 @@ const SettingDesc _settings[] = {
SDT_BOOL(GameSettings, order.no_servicing_if_no_breakdowns, 0, 0, true, STR_CONFIG_SETTING_NOSERVICE, NULL),
SDT_BOOL(GameSettings, vehicle.wagon_speed_limits, 0,NN, true, STR_CONFIG_SETTING_WAGONSPEEDLIMITS, UpdateConsists),
SDT_CONDBOOL(GameSettings, vehicle.disable_elrails, 38, SL_MAX_VERSION, 0,NN, false, STR_CONFIG_SETTING_DISABLE_ELRAILS, SettingsDisableElrail),
- SDT_CONDVAR(GameSettings, vehicle.freight_trains, SLE_UINT8, 39, SL_MAX_VERSION, 0,NN, 1, 1, 255, 1, STR_CONFIG_SETTING_FREIGHT_TRAINS, MarkAllTrainsDirty),
+ SDT_CONDVAR(GameSettings, vehicle.freight_trains, SLE_UINT8, 39, SL_MAX_VERSION, 0,NN, 1, 1, 255, 1, STR_CONFIG_SETTING_FREIGHT_TRAINS, UpdateConsists),
SDT_CONDNULL( 1, 67, 158), // order.timetabling
SDT_CONDVAR(GameSettings, vehicle.plane_speed, SLE_UINT8, 90, SL_MAX_VERSION, 0,NN, 4, 1, 4, 0, STR_CONFIG_SETTING_PLANE_SPEED, NULL),
SDT_CONDBOOL(GameSettings, vehicle.dynamic_engines, 95, SL_MAX_VERSION, 0,NN, true, STR_CONFIG_SETTING_DYNAMIC_ENGINES, ChangeDynamicEngines),