Skip to content

Commit

Permalink
Don't suppress world when starting in dungeons
Browse files Browse the repository at this point in the history
Fixes a class of load order issue where player starts game > loads dungeon save > recalls out of dungeon back to interior > drops into void.
In this pathway the exterior world is initialised only after teleport is complete, resulting in player transform position to be reset back to 0,0,0.
All other startup pathways do not suppress world to fix this same kind of transition problem.
Starting in dungeons is now standardised to other startup cases. There will be a small increase to loading a dungeon save from a fresh startup, but no different to loading a building save from fresh startup, or any other case than dungeons up to now.
Confirmed resolves issue and should not cause any regressions as this is already the standard behaviour elsewhere.
  • Loading branch information
Interkarma committed Jul 19, 2023
1 parent 9d5ee7c commit 53ce636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Scripts/Game/PlayerEnterExit.cs
Expand Up @@ -534,7 +534,7 @@ IEnumerator Respawner(int worldX, int worldZ, bool insideDungeon, bool insideBui
world.TeleportToCoordinates(pos.X, pos.Y, StreamingWorld.RepositionMethods.None);
dfUnity.ContentReader.GetLocation(summary.RegionIndex, summary.MapIndex, out location);
StartDungeonInterior(location, true, importEnemies);
world.suppressWorld = true;
world.suppressWorld = false;
}
else if (hasLocation && insideBuilding && exteriorDoors != null)
{
Expand Down

0 comments on commit 53ce636

Please sign in to comment.