mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 09:22:42 +01:00
(svn r16482) [0.7] -Backport from trunk:
- Fix: [NewGRF] Invalidate NewGRF variable caches of more vehicles in more places. Esp. they were only invalidated for trains (r16480) - Fix: [NewGRF] Call callbacks after initialisation of vehicle variables (r16479) - Fix: [NewGRF] Determining most common (sub-)cargo-type was broken due to someone confusing similiary named variables (r16478) - Fix: Loading indicator when 'unload' in and 'no loading' is off was pointing to the wrong direction [FS#2936] (r16477) - Fix: Track reservation was drawn at bridge heads in the menu (r16470)
This commit is contained in:
@@ -797,8 +797,12 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
v->vehicle_flags = 0;
|
||||
if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SetBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
|
||||
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
||||
v->cargo_cap = GetVehicleProperty(v, 0x0D, svi->capacity);
|
||||
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
|
||||
VehicleMove(v, false);
|
||||
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
@@ -942,6 +946,7 @@ CommandCost CmdRefitShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
v->cargo_type = new_cid;
|
||||
v->cargo_subtype = new_subtype;
|
||||
v->colourmap = PAL_NONE; // invalidate vehicle colour map
|
||||
v->InvalidateNewGRFCacheOfChain();
|
||||
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
|
||||
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||
InvalidateWindowClassesData(WC_SHIPS_LIST, 0);
|
||||
|
||||
Reference in New Issue
Block a user