fix for waypoint mobs falling through map

I’m sure anyone who has set up waypoints for mobs has seen the problem where trailing mobs sometimes start falling through the ground when the group is travelling over hilly terrain. This is caused by the z-axis being calculated incorrectly for members and is more likely to be a problem as the following mobs get further away from the leader.

I have set up kodo packs in Mulgore, which have this problem constantly.

To fix this bug, simply edit the CreatureGroups.cpp file and edit the LeaderMoveTo(float x, float y, float z) method, replacing this line:

member->UpdateGroundPositionZ(dx, dy, dz);

with this line:

dz = member->GetBaseMap()->GetHeight(member->GetPhaseMask(), dx, dy, MAX_HEIGHT);

Works great now!

This is 4.3.4 branch? master? mmaps? Also post it on bug tracker.

It’s the latest 3.3 version. I downloaded it a couple of weeks ago per the instructions on the wiki page.

However, it’s a pretty localized change. Unless the mob movement code was rewritten for the 4.3.4 branch, it might still be the same.