summaryrefslogtreecommitdiffstats
path: root/src/entities/Physical.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/entities/Physical.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index d37405ec..16070dc4 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -350,7 +350,7 @@ CPhysical::ProcessControl(void)
bWasPostponed = false;
bHasHitWall = false;
- if(m_status == STATUS_SIMPLE)
+ if(GetStatus() == STATUS_SIMPLE)
return;
m_nCollisionRecords = 0;
@@ -538,7 +538,7 @@ CPhysical::ApplyCollision(CPhysical *B, CColPoint &colpoint, float &impulseA, fl
float timestepB;
if(A->bPedPhysics){
if(A->IsPed() && ((CPed*)A)->IsPlayer() && B->IsVehicle() &&
- (B->m_status == STATUS_ABANDONED || B->m_status == STATUS_WRECKED || A->bHasHitWall))
+ (B->GetStatus() == STATUS_ABANDONED || B->GetStatus() == STATUS_WRECKED || A->bHasHitWall))
timestepB = 2200.0f / B->m_fMass;
else
timestepB = 10.0f;
@@ -757,7 +757,7 @@ CPhysical::ApplyCollision(CPhysical *B, CColPoint &colpoint, float &impulseA, fl
fA.y *= 1.4f;
if(colpoint.normal.z < 0.7f)
fA.z *= 0.3f;
- if(A->m_status == STATUS_PLAYER)
+ if(A->GetStatus() == STATUS_PLAYER)
pointposA *= 0.8f;
if(CWorld::bNoMoreCollisionTorque){
A->ApplyFrictionMoveForce(fA*-0.3f);
@@ -769,7 +769,7 @@ CPhysical::ApplyCollision(CPhysical *B, CColPoint &colpoint, float &impulseA, fl
fB.y *= 1.4f;
if(colpoint.normal.z < 0.7f)
fB.z *= 0.3f;
- if(B->m_status == STATUS_PLAYER)
+ if(B->GetStatus() == STATUS_PLAYER)
pointposB *= 0.8f;
if(CWorld::bNoMoreCollisionTorque){
// BUG: the game actually uses A here, but this can't be right
@@ -815,7 +815,7 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV
if(normalSpeed < 0.0f){
float minspeed = 0.0104f * CTimer::GetTimeStep();
#ifdef GTA3_1_1_PATCH
- if ((IsObject() || IsVehicle() && (GetUp().z < -0.3f || ((CVehicle*)this)->IsBike() && (m_status == STATUS_ABANDONED || m_status == STATUS_WRECKED))) &&
+ if ((IsObject() || IsVehicle() && (GetUp().z < -0.3f || ((CVehicle*)this)->IsBike() && (GetStatus() == STATUS_ABANDONED || GetStatus() == STATUS_WRECKED))) &&
#else
if((IsObject() || IsVehicle() && GetUp().z < -0.3f) &&
#endif
@@ -1341,8 +1341,8 @@ collision:
}
}
- if(B->m_status == STATUS_SIMPLE){
- B->m_status = STATUS_PHYSICS;
+ if(B->GetStatus() == STATUS_SIMPLE){
+ B->SetStatus(STATUS_PHYSICS);
if(B->IsVehicle())
CCarCtrl::SwitchVehicleToRealPhysics((CVehicle*)B);
}
@@ -1544,7 +1544,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
}else
adhesion = 0.0f;
}else if(A->IsVehicle()){
- if(A->m_status == STATUS_WRECKED)
+ if(A->GetStatus() == STATUS_WRECKED)
adhesion *= 3.0f;
else if(A->GetUp().z > 0.3f)
adhesion = 0.0f;
@@ -1561,7 +1561,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
m_vecMoveSpeed += moveSpeed / numResponses;
m_vecTurnSpeed += turnSpeed / numResponses;
if(!CWorld::bNoMoreCollisionTorque &&
- A->m_status == STATUS_PLAYER && A->IsVehicle() &&
+ A->GetStatus() == STATUS_PLAYER && A->IsVehicle() &&
Abs(A->m_vecMoveSpeed.x) > 0.2f &&
Abs(A->m_vecMoveSpeed.y) > 0.2f){
A->m_vecMoveFriction.x += moveSpeed.x * -0.3f / numCollisions;
@@ -1713,8 +1713,8 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
Aobj->ObjectDamage(maxImpulseB);
}
- if(B->m_status == STATUS_SIMPLE){
- B->m_status = STATUS_PHYSICS;
+ if(B->GetStatus() == STATUS_SIMPLE){
+ B->SetStatus(STATUS_PHYSICS);
if(B->IsVehicle())
CCarCtrl::SwitchVehicleToRealPhysics((CVehicle*)B);
}
@@ -1758,7 +1758,7 @@ void
CPhysical::ProcessShift(void)
{
m_fDistanceTravelled = 0.0f;
- if(m_status == STATUS_SIMPLE){
+ if(GetStatus() == STATUS_SIMPLE){
bIsStuck = false;
bIsInSafePosition = true;
RemoveAndAdd();
@@ -1813,9 +1813,9 @@ CPhysical::ProcessCollision(void)
return;
}
- if(m_status == STATUS_SIMPLE){
- if(CheckCollision_SimpleCar() && m_status == STATUS_SIMPLE){
- m_status = STATUS_PHYSICS;
+ if(GetStatus() == STATUS_SIMPLE){
+ if(CheckCollision_SimpleCar() && GetStatus() == STATUS_SIMPLE){
+ SetStatus(STATUS_PHYSICS);
if(IsVehicle())
CCarCtrl::SwitchVehicleToRealPhysics((CVehicle*)this);
}
@@ -1840,7 +1840,7 @@ CPhysical::ProcessCollision(void)
n = NUMSTEPS(0.3f);
step = savedTimeStep / n;
}else if(IsVehicle() && distSq >= sq(0.4f)){
- if(m_status == STATUS_PLAYER)
+ if(GetStatus() == STATUS_PLAYER)
n = NUMSTEPS(0.2f);
else
n = distSq > 0.32f ? NUMSTEPS(0.3f) : NUMSTEPS(0.4f);
@@ -1921,7 +1921,7 @@ CPhysical::ProcessCollision(void)
if(!m_vecMoveSpeed.IsZero() ||
!m_vecTurnSpeed.IsZero() ||
bHitByTrain ||
- m_status == STATUS_PLAYER || IsPed() && ped->IsPlayer()){
+ GetStatus() == STATUS_PLAYER || IsPed() && ped->IsPlayer()){
if(IsVehicle())
((CVehicle*)this)->bVehicleColProcessed = true;
if(CheckCollision()){