Jump to content

Recommended Posts

Posted

mangos 10517 with vmaps.

scriptdev2 1828

ytdb 343

when i attack a mob in water by a spell,

it comes to me.

but, it changes x,y coords only.

it doesn't swim up to me. (z coord)

it stays under the sea.

Posted

my fix

diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp
index b8cb423..4f0f8d3 100644
--- a/src/game/TargetedMovementGenerator.cpp
+++ b/src/game/TargetedMovementGenerator.cpp
@@ -80,7 +80,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner, bool upd

    // Just a temp hack, GetContactPoint/GetClosePoint in above code use UpdateGroundPositionZ (in GetNearPoint)
    // and then has the wrong z to use when creature try follow unit in the air.
-    if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
+    if (owner.GetTypeId() == TYPEID_UNIT && (((Creature*)&owner)->canFly() || ((Creature*)&owner)->IsInWater()))
        z = i_target->GetPositionZ();

    //ACE_High_Res_Timer timer = ACE_High_Res_Timer();

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use