Set default service interval and timetable flags for virtual trains

See: #636
pull/642/head
Jonathan G Rennison 4 months ago
parent 18739394e1
commit efab96b82b

@ -7083,6 +7083,11 @@ Train* BuildVirtualRailVehicle(EngineID eid, StringID &error, uint32_t user, boo
v->reliability_spd_dec = e->reliability_spd_dec;
v->max_age = e->GetLifeLengthInDays();
v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_trains);
v->SetServiceIntervalIsPercent(Company::Get(_current_company)->settings.vehicle.servint_ispercent);
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, Company::Get(_current_company)->settings.vehicle.auto_timetable_by_default);
SB(v->vehicle_flags, VF_TIMETABLE_SEPARATION, 1, Company::Get(_current_company)->settings.vehicle.auto_separation_by_default);
v->railtype = rvi->railtype;
_new_vehicle_id = v->index;

Loading…
Cancel
Save