summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-12-29 20:32:37 +0100
committeraap <aap@papnet.eu>2020-12-29 20:32:37 +0100
commit2e38b51e1cbb31fa9e4217273ed4252a2884bbb7 (patch)
treeb810e44d146bbce4032855a5c0b2572e5bd1719c /src/vehicles/Vehicle.cpp
parentfix custom pipes mem leak (diff)
downloadre3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar.gz
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar.bz2
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar.lz
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar.xz
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.tar.zst
re3-2e38b51e1cbb31fa9e4217273ed4252a2884bbb7.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Vehicle.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 3beacad5..56de3562 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -877,7 +877,6 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
}
if(fwd != 0.0f || right != 0.0f){
-#if 1
CVector totalSpeed = fwd*wheelFwd + right*wheelRight;
CVector turnDirection = totalSpeed;
@@ -911,17 +910,6 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
ApplyMoveForce(impulse * direction);
ApplyTurnForce(turnImpulse * direction, wheelContactPoint);
-#else
- CVector direction = fwd*wheelFwd + right*wheelRight;
- float speed = direction.Magnitude();
- direction.Normalise();
-
- float impulse = speed*m_fMass;
- float turnImpulse = speed*GetMass(wheelContactPoint, direction);
-
- ApplyMoveForce(impulse * direction);
- ApplyTurnForce(turnImpulse * direction, wheelContactPoint);
-#endif
}
}