jjohnsnaill / SubworldLibrary

Dimensions in Terraria, made easy.
44 stars 24 forks source link

ReturnDestination to main menu fix #35

Closed GeorgeFeldy closed 8 months ago

GeorgeFeldy commented 10 months ago

Fixed cache.DrawMenu still being called when exiting a subworld to the main menu (with ReturnDestination being int.MinValue) Once the subworld had finished saving and unloading, the cache Subworld still had a value, so the DrawMenu method was still being drawn.

Simply setting the cache value to null once the saving was complete fixed it.

GeorgeFeldy commented 10 months ago

I discovered this while toying around with the possibility of a "Save & Exit" directly from the subworld - this should also include the player rejoining the exact same subworld upon joining a world. This is because in our mod (Macrocosm), we want the players to only be able to go back the same way they came.

Other related things to consider: