[8725] Fixed bug with crash at forced logout in combat in instance.

In fact this old bug that just has been triggred more often after recent code changes,
so with some chance maybe some other logout related crashes fixed.

Also small cleanup in avoid double calls RemoveFromWorld and CleanupsBeforeDelete in some cases.
This commit is contained in:
VladimirMangos 2009-10-25 01:03:52 +04:00
parent 7323966738
commit b49cf2df28
3 changed files with 14 additions and 12 deletions

View file

@ -1757,11 +1757,12 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
}
GetSession()->SendPacket( &data );
SendSavedInstances();
// remove from old map now
if(oldmap) oldmap->Remove(this, false);
}
// remove from old map now
if(oldmap)
oldmap->Remove(this, false);
// new final coordinates
float final_x = x;
float final_y = y;