Fix RebuildViewportKdtree being called too early in AfterLoadGame

This commit is contained in:
Jonathan G Rennison
2019-04-01 18:17:48 +01:00
parent 8ad3e50b80
commit c7d96d037b

View File

@@ -608,9 +608,6 @@ bool AfterLoadGame()
RebuildTownKdtree(); RebuildTownKdtree();
RebuildStationKdtree(); RebuildStationKdtree();
/* This needs to be done even before conversion, because some conversions will destroy objects
* that otherwise won't exist in the tree. */
RebuildViewportKdtree();
if (IsSavegameVersionBefore(SLV_98)) GamelogGRFAddList(_grfconfig); if (IsSavegameVersionBefore(SLV_98)) GamelogGRFAddList(_grfconfig);
@@ -3682,6 +3679,9 @@ bool AfterLoadGame()
_settings_game.game_creation.generation_unique_id = _interactive_random.Next(UINT32_MAX-1) + 1; /* Generates between [1;UINT32_MAX] */ _settings_game.game_creation.generation_unique_id = _interactive_random.Next(UINT32_MAX-1) + 1; /* Generates between [1;UINT32_MAX] */
} }
/* This needs to be done after conversion. */
RebuildViewportKdtree();
/* Road stops is 'only' updating some caches */ /* Road stops is 'only' updating some caches */
AfterLoadRoadStops(); AfterLoadRoadStops();
AfterLoadLabelMaps(); AfterLoadLabelMaps();