mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Fix: [NewGRF] Default value of RailVehicleInfo::railveh_type was inconsistent with other default properties. (#9967)
If a NewGRF assigned neither "power" nor "dual-headed" properties, then "railveh_type" defaulted to "singlehead-engine", while "power=0" said "it's a wagon".
This commit is contained in:
parent
bba6ad1f4e
commit
acf9d786f1
@ -76,6 +76,8 @@ Engine::Engine(VehicleType type, EngineID base)
|
||||
|
||||
/* Check if this base engine is within the original engine data range */
|
||||
if (base >= _engine_counts[type]) {
|
||||
/* 'power' defaults to zero, so we also have to default to 'wagon' */
|
||||
if (type == VEH_TRAIN) this->u.rail.railveh_type = RAILVEH_WAGON;
|
||||
/* Set model life to maximum to make wagons available */
|
||||
this->info.base_life = 0xFF;
|
||||
/* Set road vehicle tractive effort to the default value */
|
||||
|
Loading…
Reference in New Issue
Block a user