summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-28 13:14:08 +0200
committeraap <aap@papnet.eu>2019-07-28 13:14:08 +0200
commit6ff921c160e802c12ad40b06f17a93f72eea6bdf (patch)
tree62ba0586a63538340c0f8ebfa99c65c0fc6ed76d /src/vehicles/Vehicle.cpp
parentrenamed flag to R* name (diff)
downloadre3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar.gz
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar.bz2
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar.lz
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar.xz
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.tar.zst
re3-6ff921c160e802c12ad40b06f17a93f72eea6bdf.zip
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r--src/vehicles/Vehicle.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index f7df645d..cafdc28b 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -255,9 +255,9 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
float contactSpeedFwd = DotProduct(wheelContactSpeed, wheelFwd);
float contactSpeedRight = DotProduct(wheelContactSpeed, wheelRight);
- if(*wheelState != WHEEL_STATE_0)
+ if(*wheelState != WHEEL_STATE_NORMAL)
bAlreadySkidding = true;
- *wheelState = WHEEL_STATE_0;
+ *wheelState = WHEEL_STATE_NORMAL;
adhesion *= CTimer::GetTimeStep();
if(bAlreadySkidding)
@@ -299,7 +299,7 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
if(brake > adhesion){
if(Abs(contactSpeedFwd) > 0.005f)
- *wheelState = WHEEL_STATE_STATIC;
+ *wheelState = WHEEL_STATE_FIXED;
}else {
if(fwd > 0.0f){
if(fwd > brake)
@@ -312,11 +312,11 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
}
if(sq(adhesion) < sq(right) + sq(fwd)){
- if(*wheelState != WHEEL_STATE_STATIC){
+ if(*wheelState != WHEEL_STATE_FIXED){
if(bDriving && contactSpeedFwd < 0.2f)
- *wheelState = WHEEL_STATE_1;
+ *wheelState = WHEEL_STATE_SPINNING;
else
- *wheelState = WHEEL_STATE_2;
+ *wheelState = WHEEL_STATE_SKIDDING;
}
float l = Sqrt(sq(right) + sq(fwd));
@@ -343,10 +343,10 @@ CVehicle::ProcessWheelRotation(tWheelState state, const CVector &fwd, const CVec
{
float angularVelocity;
switch(state){
- case WHEEL_STATE_1:
+ case WHEEL_STATE_SPINNING:
angularVelocity = -1.1f; // constant speed forward
break;
- case WHEEL_STATE_STATIC:
+ case WHEEL_STATE_FIXED:
angularVelocity = 0.0f; // not moving
break;
default: