mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: Merge duplicate functions calculating relative positions - remove CalculatePassengerPosition/CalculatePassengerOffset from TransportBase class
This commit is contained in:
@@ -116,13 +116,8 @@ bool DynamicObject::CreateDynamicObject(ObjectGuid::LowType guidlow, Unit* caste
|
||||
TransportBase* transport = caster->GetTransport();
|
||||
if (transport)
|
||||
{
|
||||
float x, y, z, o;
|
||||
pos.GetPosition(x, y, z, o);
|
||||
transport->CalculatePassengerOffset(x, y, z, &o);
|
||||
m_movementInfo.transport.pos.Relocate(x, y, z, o);
|
||||
|
||||
// This object must be added to transport before adding to map for the client to properly display it
|
||||
transport->AddPassenger(this);
|
||||
transport->AddPassenger(this, transport->GetPositionOffsetTo(pos));
|
||||
}
|
||||
|
||||
if (!GetMap()->AddToMap(this))
|
||||
|
||||
Reference in New Issue
Block a user