diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-21 22:25:54 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:40:22 +0100 |
commit | 69a6c494bfb81e332e63376f4577a104a5a8e679 (patch) | |
tree | cd34f49260fc2ac6cd825082f8d34f37e2e21f76 /src/newgrf.cpp | |
parent | 96a47877104d99e117b9fd97e43908f9e9567ec5 (diff) | |
download | openttd-69a6c494bfb81e332e63376f4577a104a5a8e679.tar.xz |
Codechange: Set VehicleType's base type to byte instead of using VehicleTypeByte
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 20408394e..759c556a7 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -657,7 +657,7 @@ static Engine *GetNewEngine(const GRFFile *file, VehicleType type, uint16 intern _engine_mngr.push_back({ scope_grfid, // Note: this is INVALID_GRFID if dynamic_engines is disabled, so no reservation internal_id, - {static_cast<byte>(type)}, + type, static_cast<uint8>(min(internal_id, _engine_counts[type])) // substitute_id == _engine_counts[subtype] means "no substitute" }); |