diff options
| author | QAston <none@none> | 2009-08-01 21:39:33 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-08-01 21:39:33 +0200 |
| commit | 3e5205cda742c6042f4df2d12384f50f113bafb7 (patch) | |
| tree | 2a62d7c11ca2a65bc32da7158ab016448db8fe57 /src | |
| parent | 604ad4eba378c40767ddeb1f061568400a54eab5 (diff) | |
*Do not remove player reference to map on player remove from map.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/Chat.cpp | 1 | ||||
| -rw-r--r-- | src/game/Map.cpp | 4 | ||||
| -rw-r--r-- | src/game/Player.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 323b4834a45..e6677070599 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -168,6 +168,7 @@ ChatCommand * ChatHandler::getCommandTable() { "entervehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugEnterVehicle, "", NULL }, { "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateWorldStateCommand, "", NULL }, { "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateCommand, "", NULL }, + { "itemexpire", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 4f0ecb1d26a..f58086ccec6 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -818,10 +818,12 @@ void Map::Remove(Player *player, bool remove) // invalid coordinates player->RemoveFromWorld(); - player->ResetMap(); if( remove ) + { DeleteFromWorld(player); + player->ResetMap(); + } return; } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6ede76af68e..6c52978fa42 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -481,9 +481,7 @@ Player::~Player () // it must be unloaded already in PlayerLogout and accessed only for loggined player //m_social = NULL; - // Remove reference to map if still exists - if (FindMap()) - ResetMap(); + assert (!FindMap()); // Note: buy back item already deleted from DB when player was saved for(uint8 i = 0; i < PLAYER_SLOTS_COUNT; ++i) |
