diff options
author | aap <aap@papnet.eu> | 2020-12-27 20:34:19 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-27 20:34:19 +0100 |
commit | d33f1071ae2505ce9952f3cf08020782a3a85135 (patch) | |
tree | c6349408c44e64afcf91acec7a820a1e58196ad1 /src/vehicles | |
parent | fix backface culling (diff) | |
download | re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar.gz re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar.bz2 re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar.lz re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar.xz re3-d33f1071ae2505ce9952f3cf08020782a3a85135.tar.zst re3-d33f1071ae2505ce9952f3cf08020782a3a85135.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/HandlingMgr.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp index 16c1b6de..b8c8566c 100644 --- a/src/vehicles/HandlingMgr.cpp +++ b/src/vehicles/HandlingMgr.cpp @@ -2,6 +2,7 @@ #include "main.h" #include "FileMgr.h" +#include "Physical.h" #include "HandlingMgr.h" //--MIAMI: done @@ -348,18 +349,18 @@ cHandlingDataMgr::FindExactWord(const char *word, const char *words, int wordLen void cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling) { - // TODO: figure out what exactly is being converted here + // convert distance to m, time to 1/50s float velocity, a, b, specificVolume; - handling->Transmission.fEngineAcceleration /= 2500.0f; - handling->Transmission.fMaxVelocity /= 180.0f; - handling->fBrakeDeceleration /= 2500.0f; + handling->Transmission.fEngineAcceleration *= 1.0f/(50.0f*50.0f); + handling->Transmission.fMaxVelocity *= 1000.0f/(60.0f*60.0f * 50.0f); + handling->fBrakeDeceleration *= 1.0f/(50.0f*50.0f); handling->fTurnMass = (sq(handling->Dimension.x) + sq(handling->Dimension.y)) * handling->fMass / 12.0f; if(handling->fTurnMass < 10.0f) handling->fTurnMass *= 5.0f; handling->fInvMass = 1.0f/handling->fMass; handling->fCollisionDamageMultiplier *= 2000.0f/handling->fMass; - handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * 0.008f*handling->fMass; + handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * GRAVITY*handling->fMass; // What the hell is going on here? specificVolume = handling->Dimension.x*handling->Dimension.z*0.5f / handling->fMass; // ? |