mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/Vehicles
* Fixed vehicle orientation on transports * Fixed exiting vehicles on moving transports
This commit is contained in:
@@ -480,7 +480,10 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
|
||||
{
|
||||
/// @todo Allow players to aquire this updateflag.
|
||||
*data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->m_ID);
|
||||
*data << float(unit->GetOrientation());
|
||||
if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||
*data << float(unit->GetTransOffsetO());
|
||||
else
|
||||
*data << float(unit->GetOrientation());
|
||||
}
|
||||
|
||||
// 0x200
|
||||
|
||||
@@ -521,8 +521,13 @@ Vehicle* Vehicle::RemovePassenger(Unit* unit)
|
||||
|
||||
if (_me->IsInWorld())
|
||||
{
|
||||
unit->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
|
||||
unit->m_movementInfo.transport.Reset();
|
||||
if (!_me->GetTransport())
|
||||
{
|
||||
unit->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
|
||||
unit->m_movementInfo.transport.Reset();
|
||||
}
|
||||
else
|
||||
unit->m_movementInfo.transport = _me->m_movementInfo.transport;
|
||||
}
|
||||
|
||||
// only for flyable vehicles
|
||||
|
||||
Reference in New Issue
Block a user