mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r11735) -Fix [FS#1574]: Don't reset loading indicator IDs when only reloading NewGRFs.
This commit is contained in:
parent
3dd61f423a
commit
aab495604a
@ -1371,7 +1371,7 @@ bool AfterLoadGame()
|
|||||||
InitializeLandscapeVariables(true);
|
InitializeLandscapeVariables(true);
|
||||||
|
|
||||||
/* Update all vehicles */
|
/* Update all vehicles */
|
||||||
AfterLoadVehicles();
|
AfterLoadVehicles(true);
|
||||||
|
|
||||||
/* Update all waypoints */
|
/* Update all waypoints */
|
||||||
if (CheckSavegameVersion(12)) FixOldWaypoints();
|
if (CheckSavegameVersion(12)) FixOldWaypoints();
|
||||||
@ -2284,7 +2284,7 @@ void ReloadNewGRFData()
|
|||||||
LoadStringWidthTable();
|
LoadStringWidthTable();
|
||||||
/* reload vehicles */
|
/* reload vehicles */
|
||||||
ResetVehiclePosHash();
|
ResetVehiclePosHash();
|
||||||
AfterLoadVehicles();
|
AfterLoadVehicles(false);
|
||||||
StartupEngines();
|
StartupEngines();
|
||||||
/* update station and waypoint graphics */
|
/* update station and waypoint graphics */
|
||||||
AfterLoadWaypoints();
|
AfterLoadWaypoints();
|
||||||
|
@ -212,7 +212,7 @@ void VehiclePositionChanged(Vehicle *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Called after load to update coordinates */
|
/** Called after load to update coordinates */
|
||||||
void AfterLoadVehicles()
|
void AfterLoadVehicles(bool clear_te_id)
|
||||||
{
|
{
|
||||||
Vehicle *v;
|
Vehicle *v;
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ void AfterLoadVehicles()
|
|||||||
|
|
||||||
v->UpdateDeltaXY(v->direction);
|
v->UpdateDeltaXY(v->direction);
|
||||||
|
|
||||||
v->fill_percent_te_id = INVALID_TE_ID;
|
if (clear_te_id) v->fill_percent_te_id = INVALID_TE_ID;
|
||||||
v->first = NULL;
|
v->first = NULL;
|
||||||
if (v->type == VEH_TRAIN) v->u.rail.first_engine = INVALID_ENGINE;
|
if (v->type == VEH_TRAIN) v->u.rail.first_engine = INVALID_ENGINE;
|
||||||
if (v->type == VEH_ROAD) v->u.road.first_engine = INVALID_ENGINE;
|
if (v->type == VEH_ROAD) v->u.road.first_engine = INVALID_ENGINE;
|
||||||
|
@ -181,7 +181,7 @@ DECLARE_OLD_POOL(Vehicle, Vehicle, 9, 125)
|
|||||||
/* Some declarations of functions, so we can make them friendly */
|
/* Some declarations of functions, so we can make them friendly */
|
||||||
struct SaveLoad;
|
struct SaveLoad;
|
||||||
extern const SaveLoad *GetVehicleDescription(VehicleType vt);
|
extern const SaveLoad *GetVehicleDescription(VehicleType vt);
|
||||||
extern void AfterLoadVehicles();
|
extern void AfterLoadVehicles(bool clear_te_id);
|
||||||
struct LoadgameState;
|
struct LoadgameState;
|
||||||
extern bool LoadOldVehicle(LoadgameState *ls, int num);
|
extern bool LoadOldVehicle(LoadgameState *ls, int num);
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ private:
|
|||||||
Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain
|
Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain
|
||||||
public:
|
public:
|
||||||
friend const SaveLoad *GetVehicleDescription(VehicleType vt); // So we can use private/protected variables in the saveload code
|
friend const SaveLoad *GetVehicleDescription(VehicleType vt); // So we can use private/protected variables in the saveload code
|
||||||
friend void AfterLoadVehicles(); // So we can set the previous and first pointers while loading
|
friend void AfterLoadVehicles(bool clear_te_id); // So we can set the previous and first pointers while loading
|
||||||
friend bool LoadOldVehicle(LoadgameState *ls, int num); // So we can set the proper next pointer while loading
|
friend bool LoadOldVehicle(LoadgameState *ls, int num); // So we can set the proper next pointer while loading
|
||||||
|
|
||||||
Vehicle *depot_list; // NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace
|
Vehicle *depot_list; // NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace
|
||||||
|
Loading…
Reference in New Issue
Block a user