diff options
Diffstat (limited to 'source/cRoot.cpp')
-rw-r--r-- | source/cRoot.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp index 9ab923d50..ef234044f 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -162,6 +162,8 @@ void cRoot::Start() // Deallocate stuffs LOG("Shutting down server..."); m_Server->Shutdown(); // This waits for threads to stop and d/c clients + LOG("Stopping world threads..."); + StopWorlds(); LOG("Stopping authenticator..."); m_Authenticator.Stop(); LOG("Stopping plugin manager..."); @@ -253,6 +255,18 @@ void cRoot::StartWorlds(void) +void cRoot::StopWorlds(void) +{ + for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr ) + { + itr->second->StopThreads(); + } +} + + + + + void cRoot::UnloadWorlds(void) { for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr ) |