summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-04-22 07:39:52 +0100
committerPeterN <peter@fuzzle.org>2019-04-29 17:40:22 +0100
commit931d32f4145e36ef08b432314353ff9f058f6a08 (patch)
tree7503cca488e8d3453adeb0e69fc51a609649f1a0 /src/saveload
parent10ba431d21f58c707398f95b99faf3c2aac77e77 (diff)
downloadopenttd-931d32f4145e36ef08b432314353ff9f058f6a08.tar.xz
Codechange: Remove RailTypeByte type
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/oldloader_sl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index 1590cb655..f7309a474 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -1277,7 +1277,8 @@ bool LoadOldVehicle(LoadgameState *ls, int num)
};
if (v->spritenum / 2 >= lengthof(spriteset_rail)) return false;
v->spritenum = spriteset_rail[v->spritenum / 2]; // adjust railway sprite set offset
- Train::From(v)->railtype = type == 0x25 ? 1 : 0; // monorail / rail
+ /* Should be the original values for monorail / rail, can't use RailType constants */
+ Train::From(v)->railtype = static_cast<RailType>(type == 0x25 ? 1 : 0);
break;
}