Core/Movement: Crash fix
This commit is contained in:
@@ -77,9 +77,14 @@ MotionMaster::~MotionMaster()
|
|||||||
|
|
||||||
void MotionMaster::UpdateMotion(uint32 diff)
|
void MotionMaster::UpdateMotion(uint32 diff)
|
||||||
{
|
{
|
||||||
|
if (!i_owner)
|
||||||
|
return;
|
||||||
|
|
||||||
if (i_owner->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) // what about UNIT_STAT_DISTRACTED? Why is this not included?
|
if (i_owner->HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED)) // what about UNIT_STAT_DISTRACTED? Why is this not included?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ASSERT(!empty());
|
ASSERT(!empty());
|
||||||
|
|
||||||
m_cleanFlag |= MMCF_UPDATE;
|
m_cleanFlag |= MMCF_UPDATE;
|
||||||
if (!top()->Update(*i_owner, diff))
|
if (!top()->Update(*i_owner, diff))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user