MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / ~GameEditorModeBase

Method ~GameEditorModeBase

source/modes/GameEditorModeBase.cpp:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142GameEditorModeBase::~GameEditorModeBase()
143{
144 // Note that we don't stop culling because the gamemap has already been
145 // cleared when we are here
146 delete mMainCullingManager;
147 delete mMiniMap;
148
149 // Delete the potential pending event messages
150 for (EventMessage* message : mEventMessages)
151 delete message;
152
153 if(ODClient::getSingleton().isConnected())
154 ODClient::getSingleton().disconnect(mKeepReplayAtDisconnect);
155 if(ODServer::getSingleton().isConnected())
156 ODServer::getSingleton().stopServer();
157
158 // Now that the server is stopped, we can clear the client game map
159 mGameMap->clearAll();
160}
161
162void GameEditorModeBase::deactivate()
163{

Callers

nothing calls this directly

Calls 4

clearAllMethod · 0.80
isConnectedMethod · 0.45
disconnectMethod · 0.45
stopServerMethod · 0.45

Tested by

no test coverage detected