In my mod, this led to the map loading just fine with fast traveling into a city because the load order for the fast travel and update is correct, and the streaming world current location object doesn't update until after the full fast travel has been completed and the streaming world fully loaded, (including updating the current streaming world location object the player is in). But, as said above, upon walking into the new map pixel/location the map pixel change call would trigger before the streaming world updated the current location object, leading to grabbing the completely wrong/previous streaming current object location.
I found this issue by creating a debug log that listed the location name through the streaming world, through the playerGPS, and through the streaming world/local_playerGPS. I fixed it by doing this.
Code: Select all
if (!GameManager.Instance.IsPlayerInside && Minimap.changedLocations)
{
if(GameManager.Instance.StreamingWorld.CurrentPlayerLocationObject.Summary.LocationName != GameManager.Instance.PlayerGPS.CurrentLocation.Name)
Return;
Minimap.changedLocations = false;
}
Nothing major, but it would be nice if the StreamingWorld.CurrentPlayerLocationObject was updated before the PlayerGPS_OnMapPixelChanged(DFPosition mapPixel) call finished, that way, if the map pixel call is used to trigger and grab the StreamingWorld.CurrentPlayerLocationObject other modders don't run into my issue.