diff options
Diffstat (limited to 'src/gamehandler.cpp')
-rw-r--r-- | src/gamehandler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gamehandler.cpp b/src/gamehandler.cpp index c61a95db..ebda00d6 100644 --- a/src/gamehandler.cpp +++ b/src/gamehandler.cpp @@ -84,17 +84,16 @@ GameClient::~GameClient() void GameClient::setCharacter(tmwserv::BeingPtr ch) { assert(mCharacterPtr.get() == NULL); - tmwserv::State &state = tmwserv::State::instance(); mCharacterPtr = ch; - state.addBeing(mCharacterPtr, mCharacterPtr->getMapId()); + gameState->addBeing(mCharacterPtr); + gameState->informBeing(mCharacterPtr); } void GameClient::unsetCharacter() { if (mCharacterPtr.get() == NULL) return; // remove being from world - tmwserv::State &state = tmwserv::State::instance(); - state.removeBeing(mCharacterPtr); + gameState->removeBeing(mCharacterPtr); mCharacterPtr = tmwserv::BeingPtr(NULL); } |