1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 20:02:40 +01:00

Merge pull request #296 from ShFil119/patch-3

Replace manual radian conversion with glm's function
This commit is contained in:
tsjost 2017-07-26 00:34:22 +02:00 committed by GitHub
commit 45814cce07

View File

@ -264,7 +264,7 @@ void VehicleObject::tickPhysics(float dt) {
if (wi.m_bIsFrontWheel) {
float sign = std::signbit(steerAngle) ? -1.f : 1.f;
physVehicle->setSteeringValue(
std::min(info->handling.steeringLock * (3.141f / 180.f),
std::min(glm::radians(info->handling.steeringLock),
std::abs(steerAngle)) *
sign,
w);
@ -294,7 +294,7 @@ void VehicleObject::tickPhysics(float dt) {
if (isInWater()) {
float sign = std::signbit(steerAngle) ? -1.f : 1.f;
float steer =
std::min(info->handling.steeringLock * (3.141f / 180.f),
std::min(glm::radians(info->handling.steeringLock),
std::abs(steerAngle)) *
sign;
auto orient = collision->getBulletBody()->getOrientation();