Core/Vehicles
* Fixed vehicle orientation on transports * Fixed exiting vehicles on moving transports
This commit is contained in:
1 parent
82181a8622
commit
9d6904f03d
2 files changed
+11
-3
No files matched your search
@@ -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