summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-04-19 15:54:05 +0200
committerGitHub <noreply@github.com>2020-04-19 15:54:05 +0200
commitf9ed50e17813d2a6708a6516e18041c7482a7462 (patch)
treee8d1312d1e2a9706793ac781271fedc73db91624 /src/vehicles
parentFix savename buffer overflow (diff)
parentStruct cleanup, various fixes, enable PS2 rand (diff)
downloadre3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.gz
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.bz2
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.lz
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.xz
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.zst
re3-f9ed50e17813d2a6708a6516e18041c7482a7462.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Automobile.cpp4
-rw-r--r--src/vehicles/HandlingMgr.h4
-rw-r--r--src/vehicles/Vehicle.cpp8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index c2a664a6..2d0aadcc 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -562,7 +562,7 @@ CAutomobile::ProcessControl(void)
bWasPostponed = false;
bHasHitWall = false;
m_fDistanceTravelled = 0.0f;
- field_EF = false;
+ m_bIsVehicleBeingShifted = false;
m_phy_flagA80 = false;
ApplyMoveSpeed();
ApplyTurnSpeed();
@@ -2148,7 +2148,7 @@ CAutomobile::ProcessEntityCollision(CEntity *ent, CColPoint *colpoints)
// m_aSuspensionSpringRatio are now set to the point where the tyre touches ground.
// In ProcessControl these will be re-normalized to ignore the tyre radius.
- if(field_EF || m_phy_flagA80 ||
+ if(m_bIsVehicleBeingShifted || m_phy_flagA80 ||
GetModelIndex() == MI_DODO && (ent->IsPed() || ent->IsVehicle())){
// don't do line collision
for(i = 0; i < 4; i++)
diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h
index 137925f3..398a415f 100644
--- a/src/vehicles/HandlingMgr.h
+++ b/src/vehicles/HandlingMgr.h
@@ -101,7 +101,7 @@ struct tHandlingData
float fSteeringLock;
float fTractionLoss;
float fTractionBias;
- uint32 field_AC;
+ float fABS; // should be VC leftover
float fSuspensionForceLevel;
float fSuspensionDampingLevel;
float fSuspensionUpperLimit;
@@ -126,7 +126,7 @@ private:
float field_C; // unused it seems
float field_10; //
tHandlingData HandlingData[NUMHANDLINGS];
- uint32 field_302C; // unused it seems, padding?
+ uint32 field_302C; // unused it seems
public:
cHandlingDataMgr(void);
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index bc47b486..0ed83f87 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -65,7 +65,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_nNumGettingIn = 0;
m_nGettingInFlags = 0;
m_nGettingOutFlags = 0;
- m_nNumMaxPassengers = 8;
+ m_nNumMaxPassengers = ARRAY_SIZE(pPassengers);
for(i = 0; i < m_nNumMaxPassengers; i++)
pPassengers[i] = nil;
m_nBombTimer = 0;
@@ -101,7 +101,7 @@ CVehicle::CVehicle(uint8 CreatedBy)
m_nLastWeaponDamage = -1;
m_fMapObjectHeightAhead = m_fMapObjectHeightBehind = 0.0f;
m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this);
- if(m_audioEntityId)
+ if(m_audioEntityId >= 0)
DMAudio.SetEntityStatus(m_audioEntityId, true);
m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK;
m_pCurGroundEntity = nil;
@@ -728,7 +728,7 @@ CVehicle::CanBeDeleted(void)
return false;
}
- for(i = 0; i < 8; i++){
+ for(i = 0; i < ARRAY_SIZE(pPassengers); i++){
// Same check as above
if(pPassengers[i]){
if(pPassengers[i]->CharCreatedBy == MISSION_CHAR)
@@ -941,7 +941,7 @@ void
CVehicle::RemovePassenger(CPed *p)
{
if (IsTrain()){
- for (int i = 0; i < 8; i++){
+ for (int i = 0; i < ARRAY_SIZE(pPassengers); i++){
if (pPassengers[i] == p) {
pPassengers[i] = nil;
m_nNumPassengers--;