diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-28 14:52:39 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-28 14:52:39 +0200 |
commit | f7c93fc15c9b9b45a3022433379ff967443a2c74 (patch) | |
tree | 9db8a9057d0b96fac16bdb9f76796c87e5283706 /src/vehicles/Vehicle.cpp | |
parent | fixed phones (diff) | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.gz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.bz2 re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.lz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.xz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.zst re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.zip |
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: |