Core/GameObjects: Transport (type 11) improvements
Port From (https://github.com/TrinityCore/TrinityCore/commit/630b60eb0dcd3d9ce41582664ab822b049365431)
This commit is contained in:
@@ -222,11 +222,14 @@ namespace Game.Movement
|
||||
if (args.TransformForTransport)
|
||||
{
|
||||
Unit vehicle = unit.GetVehicleBase();
|
||||
Transport transport = unit.GetTransport();
|
||||
if (vehicle != null)
|
||||
angle -= vehicle.Orientation;
|
||||
else if (transport != null)
|
||||
angle -= transport.Orientation;
|
||||
angle -= vehicle.GetOrientation();
|
||||
else
|
||||
{
|
||||
ITransport transport = unit.GetTransport();
|
||||
if (transport != null)
|
||||
angle -= transport.GetTransportOrientation();
|
||||
}
|
||||
}
|
||||
|
||||
args.facing.angle = MathFunctions.wrap(angle, 0.0f, MathFunctions.TwoPi);
|
||||
|
||||
Reference in New Issue
Block a user