diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp index 649e2c2bfa6..899d55a7f54 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp @@ -1617,7 +1617,12 @@ void Locomotor::moveTowardsPositionLegs(Object* obj, PhysicsBehavior *physics, c } Real relAngle = stdAngleDiff(desiredAngle, angle); - locoUpdate_moveTowardsAngle(obj, desiredAngle); + Coord3D desiredPos; + desiredPos.x = obj->getPosition()->x + Cos(desiredAngle) * 1000.0f; + desiredPos.y = obj->getPosition()->y + Sin(desiredAngle) * 1000.0f; + desiredPos.z = obj->getPosition()->z; + PhysicsTurningType rotating = rotateTowardsPosition(obj, desiredPos); + physics->setTurning(rotating); // // Modulate speed according to turning. The more we have to turn, the slower we go @@ -1738,7 +1743,12 @@ void Locomotor::moveTowardsPositionClimb(Object* obj, PhysicsBehavior *physics, relAngle = stdAngleDiff(desiredAngle, angle); } - locoUpdate_moveTowardsAngle(obj, desiredAngle); + Coord3D desiredPos; + desiredPos.x = obj->getPosition()->x + Cos(desiredAngle) * 1000.0f; + desiredPos.y = obj->getPosition()->y + Sin(desiredAngle) * 1000.0f; + desiredPos.z = obj->getPosition()->z; + PhysicsTurningType rotating = rotateTowardsPosition(obj, desiredPos); + physics->setTurning(rotating); // // Modulate speed according to turning. The more we have to turn, the slower we go diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp index 65b0c00583a..2ed2c7eafde 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp @@ -1647,7 +1647,12 @@ void Locomotor::moveTowardsPositionLegs(Object* obj, PhysicsBehavior *physics, c } Real relAngle = stdAngleDiff(desiredAngle, angle); - locoUpdate_moveTowardsAngle(obj, desiredAngle); + Coord3D desiredPos; + desiredPos.x = obj->getPosition()->x + Cos(desiredAngle) * 1000.0f; + desiredPos.y = obj->getPosition()->y + Sin(desiredAngle) * 1000.0f; + desiredPos.z = obj->getPosition()->z; + PhysicsTurningType rotating = rotateTowardsPosition(obj, desiredPos); + physics->setTurning(rotating); // // Modulate speed according to turning. The more we have to turn, the slower we go @@ -1768,7 +1773,12 @@ void Locomotor::moveTowardsPositionClimb(Object* obj, PhysicsBehavior *physics, relAngle = stdAngleDiff(desiredAngle, angle); } - locoUpdate_moveTowardsAngle(obj, desiredAngle); + Coord3D desiredPos; + desiredPos.x = obj->getPosition()->x + Cos(desiredAngle) * 1000.0f; + desiredPos.y = obj->getPosition()->y + Sin(desiredAngle) * 1000.0f; + desiredPos.z = obj->getPosition()->z; + PhysicsTurningType rotating = rotateTowardsPosition(obj, desiredPos); + physics->setTurning(rotating); // // Modulate speed according to turning. The more we have to turn, the slower we go