EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   facing its target when rooted (https://www.eqemulator.org/forums/showthread.php?t=12671)

sandy 03-26-2004 02:29 AM

facing its target when rooted
 
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 ?

RexChaos 03-26-2004 03:12 AM

I always thought it was lame that mobs could turn while rooted but PC's couldn't. Of course that may have to do with the fact that I'm partial towards rogues anyway. ;)

samandhi 03-26-2004 08:51 AM

Quote:

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 ?
I am not totally sure of this so bonk me of I am wrong, but wasnt something like that implemented on purpose to make up for not being able to use fear (read in temporary place of), until pathing is implemented?

devn00b 03-27-2004 05:23 AM

could always force the animation. doanim(0);? cant recall the exact function but somthing like that.

Scorpious2k 03-27-2004 08:56 AM

Mob::DoAnim(const int animnum, int type, bool ackreq)


All times are GMT -4. The time now is 12:39 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.