[11719] Destroy all movement generators at Unit::CleanupsBeforeDelete call

this fixes possible crash at grid unloading
This commit is contained in:
SilverIce 2011-07-08 03:58:38 +03:00
parent 0176b15cf0
commit e302fce513

View file

@ -9448,7 +9448,7 @@ void Unit::CleanupsBeforeDelete()
else else
getHostileRefManager().deleteReferences(); getHostileRefManager().deleteReferences();
RemoveAllAuras(AURA_REMOVE_BY_DELETE); RemoveAllAuras(AURA_REMOVE_BY_DELETE);
GetMotionMaster()->Clear(false); // remove different non-standard movement generators. GetMotionMaster()->Clear(false,true); // remove all movement generators.
} }
WorldObject::CleanupsBeforeDelete(); WorldObject::CleanupsBeforeDelete();
} }