summaryrefslogtreecommitdiffstats
path: root/src/vehicles/HandlingMgr.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-16 20:17:15 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-08-27 21:18:47 +0200
commit2fabbc3b4cab40220986f402569af64673cb4cd9 (patch)
tree3278631a5e3dd19a0af92204e6bfb48702dd04f0 /src/vehicles/HandlingMgr.cpp
parentCleanup (diff)
downloadre3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.gz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.bz2
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.lz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.xz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.zst
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/HandlingMgr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp
index be96ab08..0f16401e 100644
--- a/src/vehicles/HandlingMgr.cpp
+++ b/src/vehicles/HandlingMgr.cpp
@@ -6,9 +6,9 @@
cHandlingDataMgr &mod_HandlingManager = *(cHandlingDataMgr*)0x728060;
-char *HandlingFilename = "HANDLING.CFG";
+const char *HandlingFilename = "HANDLING.CFG";
-char VehicleNames[NUMHANDLINGS][14] = {
+const char VehicleNames[NUMHANDLINGS][14] = {
"LANDSTAL",
"IDAHO",
"STINGER",
@@ -199,7 +199,7 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling)
if(handling->fTurnMass < 10.0f)
handling->fTurnMass *= 5.0f;
handling->fInvMass = 1.0f/handling->fMass;
- handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * 0.008*handling->fMass;
+ handling->fBuoyancy = 100.0f/handling->nPercentSubmerged * 0.008f*handling->fMass;
// What the hell is going on here?
specificVolume = handling->Dimension.x*handling->Dimension.z*0.5f / handling->fMass; // ?
@@ -207,7 +207,7 @@ cHandlingDataMgr::ConvertDataToGameUnits(tHandlingData *handling)
b = 100.0f;
velocity = handling->Transmission.fMaxVelocity;
while(a < b && velocity > 0.0f){
- velocity -= 0.01;
+ velocity -= 0.01f;
a = handling->Transmission.fEngineAcceleration/6.0f;
b = -velocity * (1.0f/(specificVolume * sq(velocity) + 1.0f) - 1.0f);
}