mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[10529] Water level in movement use fixes.
* Move selection allowed upper and lower heights for target point into near point core function used for contact/close point selection. Selection base at possibility target point searcher fly/swim(or walk by water bottom). * Use vamp water level data so have proper water level in instances in movements. * Use increased ground search distance for water level case.
This commit is contained in:
parent
f92518ee14
commit
2170c9c919
13 changed files with 171 additions and 41 deletions
|
|
@ -55,7 +55,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
|
|||
else
|
||||
{
|
||||
// to at i_offset distance from target and i_angle from target facing
|
||||
i_target->GetClosePoint(x, y, z, owner.GetObjectBoundingRadius(), i_offset, i_angle);
|
||||
i_target->GetClosePoint(x, y, z, owner.GetObjectBoundingRadius(), i_offset, i_angle, &owner);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -75,11 +75,6 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
|
|||
return;
|
||||
*/
|
||||
|
||||
// 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())
|
||||
z = i_target->GetPositionZ();
|
||||
|
||||
Traveller<T> traveller(owner);
|
||||
i_destinationHolder.SetDestination(traveller, x, y, z);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue