Core/Units: Properly update passenger position if vehicle uses waypoint movement. Fixes e.g. Icefang path

This commit is contained in:
Machiavelli committed 2012-03-01 17:06:41 +01:00
1 parent 844e2ca857
commit 6bb689b494
4 files changed
+15 -6

No files matched your search

+8 -4
View File
@@ -17171,14 +17171,18 @@ bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool tel
GetMap()->CreatureRelocation(ToCreature(), x, y, z, orientation);
}
else if (turn)
SetOrientation(orientation);
if ((relocated || turn) && IsVehicle())
GetVehicleKit()->RelocatePassengers(x, y, z, orientation);
UpdateOrientation(orientation);
return (relocated || turn);
}
void Unit::UpdateOrientation(float orientation)
{
SetOrientation(orientation);
if (IsVehicle())
GetVehicleKit()->RelocatePassengers(GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
}
void Unit::SendThreatListUpdate()
{
if (!getThreatManager().isThreatListEmpty())