Fix #7925: Reset temporary saveload data at the start of loading a savegame instead of at the end.
Otherwise temporary data may be passed from an aborted load action to the next load action.
This commit is contained in:

committed by
Niels Martin Hansen

parent
41163331aa
commit
a4be4514c9
@@ -155,6 +155,11 @@ void MoveWaypointsToBaseStations()
|
||||
UpdateWaypointOrder(&v->current_order);
|
||||
}
|
||||
|
||||
ResetOldWaypoints();
|
||||
}
|
||||
|
||||
void ResetOldWaypoints()
|
||||
{
|
||||
_old_waypoints.clear();
|
||||
_old_waypoints.shrink_to_fit();
|
||||
}
|
||||
@@ -182,7 +187,7 @@ static const SaveLoad _old_waypoint_desc[] = {
|
||||
static void Load_WAYP()
|
||||
{
|
||||
/* Precaution for when loading failed and it didn't get cleared */
|
||||
_old_waypoints.clear();
|
||||
ResetOldWaypoints();
|
||||
|
||||
int index;
|
||||
|
||||
|
Reference in New Issue
Block a user