Core/Vehicles

* Fixed vehicle orientation on transports
* Fixed exiting vehicles on moving transports
This commit is contained in:
Shauren
2014-01-02 14:20:05 +01:00
parent 82181a8622
commit 9d6904f03d
2 changed files with 11 additions and 3 deletions

View File

@@ -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

View File

@@ -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