Core/Movement: Fixed transport teleports on the same map (and teleporting on transports too)

This commit is contained in:
Shauren
2018-03-19 00:22:55 +01:00
committed by Aokromes
parent e0dd75b626
commit 97bd2e2f2f

View File

@@ -507,6 +507,7 @@ void Transport::UpdatePosition(float x, float y, float z, float o)
Cell oldCell(GetPositionX(), GetPositionY());
Relocate(x, y, z, o);
m_stationaryPosition.SetOrientation(o);
UpdateModelPosition();
UpdatePassengerPositions(_passengers);
@@ -619,6 +620,8 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
}
else
{
UpdatePosition(x, y, z, o);
// Teleport players, they need to know it
for (PassengerSet::iterator itr = _passengers.begin(); itr != _passengers.end(); ++itr)
{
@@ -637,7 +640,6 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
}
}
UpdatePosition(x, y, z, o);
return false;
}
}