summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elrail.c3
-rw-r--r--openttd.c16
2 files changed, 6 insertions, 13 deletions
diff --git a/elrail.c b/elrail.c
index a1a48bceb..64a1735d3 100644
--- a/elrail.c
+++ b/elrail.c
@@ -403,8 +403,7 @@ int32 SettingsDisableElrail(int32 p1)
const RailType new_railtype = disable ? RAILTYPE_RAIL : RAILTYPE_ELECTRIC;
/* walk through all train engines */
- for (e_id = 0; e_id < NUM_TRAIN_ENGINES; e_id++)
- {
+ for (e_id = 0; e_id < NUM_TRAIN_ENGINES; e_id++) {
const RailVehicleInfo *rv_info = RailVehInfo(e_id);
Engine *e = GetEngine(e_id);
/* if it is an electric rail engine and its railtype is the wrong one */
diff --git a/openttd.c b/openttd.c
index 68322079f..2cb3b7c1e 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1548,19 +1548,13 @@ bool AfterLoadGame(void)
ConvertNameArray();
}
- /* from version 38 we have optional elrails */
+ /* from version 38 we have optional elrails, since we cannot know the
+ * preference of a user, let elrails enabled; it can be disabled manually */
if (CheckSavegameVersion(38)) {
- /* old game - before elrails made optional */
- if (CheckSavegameVersion(24)) {
- /* very old game - before elrail was introduced */
- _patches.disable_elrails = true; // disable elrails
- } else {
- /* game with mandatory elrails (r4150+) */
- _patches.disable_elrails = false; // enable elrails
- }
+ _patches.disable_elrails = false; // enable elrails
+ /* do the same as when elrails were enabled/disabled manually just now */
+ SettingsDisableElrail(_patches.disable_elrails);
}
- /* do the same as when elrails were enabled/disabled manually just now */
- SettingsDisableElrail(_patches.disable_elrails);
return true;
}