sinbad / SPUD

Steve's Persistent Unreal Data library
MIT License
300 stars 44 forks source link

Add RestartAfterLevelLoad state, to handle delayed NewGame #40

Closed cbQB closed 2 years ago

cbQB commented 2 years ago

NewGame(bAfterLevelLoad = true) doesn't work as intended. OnPreLoadMap will save the current world if state is RunningIdle, and OnPostLoadMap will try to restore it.

sinbad commented 2 years ago

Ha, I'd discovered this myself and fixed it almost exactly the same way!

sinbad commented 2 years ago

Although my version of OnPostLoadMap would work (since state has been blanked), on reflection I think I prefer your way of skipping that entirely so I've changed mine again. https://github.com/sinbad/SPUD/commit/6f61256061b706204384597cac5d18f0f05c3273