diff options
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r-- | src/vehicles/Vehicle.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 194d4e14..36675c8b 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: |