mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
* Force save when leaving. Kind of sucks. I'll work on it :)
This commit is contained in:
@@ -839,6 +839,14 @@ void Minecraft::leaveGame(bool bCopyMap)
|
||||
// @BUG: Deleting ServerSideNetworkHandler too late! This causes
|
||||
// access to invalid memory in the destructor seeing as we already deleted the level.
|
||||
delete m_pNetEventCallback;
|
||||
|
||||
// @NOTE: Saving only happens once every 50 ticks. Force it to happen when quitting.
|
||||
if (m_pLevel)
|
||||
{
|
||||
m_pLevel->saveAllChunks();
|
||||
m_pLevel->saveLevelData();
|
||||
m_pLevel->savePlayerData();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_pLevel)
|
||||
|
||||
Reference in New Issue
Block a user