hello
i was trying to make the mobs to facing their target while they are rooted
I tried this int mobai.cpp in AI_Process
Code:
else {
// See if we can summon the mob to us
if (!HateSummon()) {
// TODO: Check here for another person on hate list with close hate value
if (AIautocastspell_timer->Check()) {
#if MobAI_DEBUG_Spells >= 25
cout << "Engaged (pursing) autocast check triggered: " << this->GetName() << endl;
#endif
AICastSpell(target, 90, SpellType_Root | SpellType_Nuke | SpellType_Lifetap | SpellType_Snare);
}
else if (AImovement_timer->Check()) {
if( !IsRooted())
CalculateNewPosition(target->GetX(), target->GetY(), target->GetZ(), GetRunspeed());
else {
FaceTarget(target,true);
if ( IsMoving() ) {
SetRunAnimSpeed(0);
SetMoving(false);
moved=false;
}
}
}
}
}
it works well when the monster is not moving and you root him
but if the monster is moving before you root him
when rooted he continues to perform its running animation
I don't understand why ? anyone can help plz ?