Codechange: Set VehicleType's base type to byte instead of using VehicleTypeByte

This commit is contained in:
Charles Pigott
2019-04-21 22:25:54 +01:00
committed by PeterN
parent 96a4787710
commit 69a6c494bf
5 changed files with 14 additions and 16 deletions

View File

@@ -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"
});