summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-08-17 09:46:11 +0200
committeraap <aap@papnet.eu>2021-08-17 09:46:11 +0200
commit7374fbf54cacb4c020e2185d5f4d01e9f65875a2 (patch)
treebb9d7b0dba9e9c08b6aa77c8c85c2a361810b5c2 /src/vehicles
parentMerge branch 'miami' into lcs (diff)
downloadre3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar.gz
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar.bz2
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar.lz
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar.xz
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.tar.zst
re3-7374fbf54cacb4c020e2185d5f4d01e9f65875a2.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp6
-rw-r--r--src/vehicles/Vehicle.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 810c1661..e13290c8 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -973,8 +973,8 @@ CAutomobile::ProcessControl(void)
*/
static float magicValue = 4.0f;
- float steerRange;
if(magicValue > 0.0f){
+ float steerRange;
// looks like a bug with the wheel ids here, why only left wheels?
if(fwdSpeed > 0.01f && (m_aWheelTimer[CARWHEEL_FRONT_LEFT] > 0.0f || m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f) && GetStatus() == STATUS_PLAYER){
CColPoint point;
@@ -995,9 +995,9 @@ CAutomobile::ProcessControl(void)
}else
steerRange = 1.0f;
- }
- m_fSteerAngle *= steerRange;
+ m_fSteerAngle *= steerRange;
+ }
brake = m_fBrakePedal * pHandling->fBrakeDeceleration * CTimer::GetTimeStep();
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 7784bc07..591a9f83 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -965,7 +965,7 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
turnDirection = direction;
float impulse = speed*m_fMass;
- float turnImpulse = turnSpeed*GetMass(wheelContactPoint, turnDirection);
+ float turnImpulse = turnSpeed*GetMass(wheelContactPoint - Multiply3x3(GetMatrix(), m_vecCentreOfMass), turnDirection);
ApplyMoveForce(impulse * direction);
ApplyTurnForce(turnImpulse * turnDirection, wheelContactPoint);