NewGRF: Elide unmasked vehicle callbacks where possible
This includes: * CBID_VEHICLE_32DAY_CALLBACK * CBID_VEHICLE_REFIT_COST * CBID_VEHICLE_MODIFY_PROPERTY This is on a per-property basis The main benefit of this is to avoid callbacks not handled by the vehicle's current sprite group from using the full graphics chain as the "default" branch in the callback switch. In the case where the graphics chain is long/expensive, a lot of work had to be done before a callback failure result was eventually returned.
This commit is contained in:
@@ -938,6 +938,8 @@ bool AfterLoadGame()
|
||||
_settings_game.vehicle.train_braking_model = TBM_ORIGINAL;
|
||||
}
|
||||
|
||||
AfterLoadEngines();
|
||||
|
||||
/* Update all vehicles */
|
||||
AfterLoadVehicles(true);
|
||||
|
||||
@@ -4012,6 +4014,7 @@ void ReloadNewGRFData()
|
||||
RecomputePrices();
|
||||
/* reload vehicles */
|
||||
ResetVehicleHash();
|
||||
AfterLoadEngines();
|
||||
AfterLoadVehicles(false);
|
||||
StartupEngines();
|
||||
GroupStatistics::UpdateAfterLoad();
|
||||
|
Reference in New Issue
Block a user