Core/Movement: Fixed Facing* splines on transports
This commit is contained in:
1 parent
7a5e4dd585
commit
3b44401aa6
2 files changed
+13
-3
No files matched your search
@@ -138,6 +138,14 @@ namespace Movement
|
||||
|
||||
void MoveSplineInit::SetFacing(float angle)
|
||||
{
|
||||
if (unit.HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
|
||||
{
|
||||
if (Unit* vehicle = unit.GetVehicleBase())
|
||||
angle -= vehicle->GetOrientation();
|
||||
else if (Transport* transport = unit.GetTransport())
|
||||
angle -= transport->GetOrientation();
|
||||
}
|
||||
|
||||
args.facing.angle = G3D::wrap(angle, 0.f, (float)G3D::twoPi());
|
||||
args.flags.EnableFacingAngle();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user