mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
parent
4d24537590
commit
ef0009aea7
4 changed files with 40 additions and 31 deletions
|
@ -534,18 +534,18 @@ void ServerEnvironment::init()
|
|||
}
|
||||
}
|
||||
|
||||
ServerEnvironment::~ServerEnvironment()
|
||||
void ServerEnvironment::deactivateBlocksAndObjects()
|
||||
{
|
||||
// Clear active block list.
|
||||
// This makes the next one delete all active objects.
|
||||
m_active_blocks.clear();
|
||||
|
||||
try {
|
||||
// Convert all objects to static and delete the active objects
|
||||
deactivateFarObjects(true);
|
||||
} catch (ModError &e) {
|
||||
m_server->addShutdownError(e);
|
||||
}
|
||||
deactivateFarObjects(true);
|
||||
}
|
||||
|
||||
ServerEnvironment::~ServerEnvironment()
|
||||
{
|
||||
assert(m_active_blocks.size() == 0); // deactivateBlocksAndObjects does this
|
||||
|
||||
// Drop/delete map
|
||||
if (m_map)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue