*A hacky fix of the crash happening when player is teleported during logout.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-13 10:01:00 -05:00
parent 5ab3117c0c
commit 284b0063a8
3 changed files with 13 additions and 5 deletions
+3 -2
View File
@@ -1617,12 +1617,13 @@ void Player::SendTeleportAckMsg()
GetSession()->SendPacket(&data);
}
// this is not used anywhere
void Player::TeleportOutOfMap(Map *oldMap)
{
while(IsBeingTeleportedFar())
GetSession()->HandleMoveWorldportAckOpcode();
if(FindMap() != oldMap)
if(GetMap() != oldMap)
return;
TeleportTo(m_homebindMapId, m_homebindX, m_homebindY, m_homebindZ, GetOrientation());
@@ -1630,7 +1631,7 @@ void Player::TeleportOutOfMap(Map *oldMap)
while(IsBeingTeleportedFar())
GetSession()->HandleMoveWorldportAckOpcode();
if(FindMap() == oldMap)
if(GetMap() == oldMap)
{
sLog.outCrash("Cannot teleport player out of map!");
ResetMap();