From e302fce513008b3f89ab236e3e3359f7d4f3c9c5 Mon Sep 17 00:00:00 2001 From: SilverIce Date: Fri, 8 Jul 2011 03:58:38 +0300 Subject: [PATCH] [11719] Destroy all movement generators at Unit::CleanupsBeforeDelete call this fixes possible crash at grid unloading --- src/game/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ecc5fe85b..27308d8d6 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9448,7 +9448,7 @@ void Unit::CleanupsBeforeDelete() else getHostileRefManager().deleteReferences(); RemoveAllAuras(AURA_REMOVE_BY_DELETE); - GetMotionMaster()->Clear(false); // remove different non-standard movement generators. + GetMotionMaster()->Clear(false,true); // remove all movement generators. } WorldObject::CleanupsBeforeDelete(); }