diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-07-10 14:56:56 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-07-10 14:56:56 +0200 |
commit | 2ef5e4cd662d642b839a9e65b3176335c6b50448 (patch) | |
tree | 5e0a6dcdbf8f1566974c0514986ab7b61e5c067a /src/entities/Physical.cpp | |
parent | Phone start, ped spinning and cop car fix, and some love to CPed (diff) | |
parent | fixed COMMAND_IS_PLAYER_IN_AREA_3D (diff) | |
download | re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar.gz re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar.bz2 re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar.lz re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar.xz re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.tar.zst re3-2ef5e4cd662d642b839a9e65b3176335c6b50448.zip |
Diffstat (limited to 'src/entities/Physical.cpp')
-rw-r--r-- | src/entities/Physical.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index c9e0da90..9cabb28b 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -62,7 +62,7 @@ CPhysical::CPhysical(void) m_phy_flagA10 = false; m_phy_flagA20 = false; - m_nLastCollType = 0; + m_nSurfaceTouched = SURFACE_DEFAULT; } CPhysical::~CPhysical(void) @@ -457,7 +457,7 @@ CPhysical::ApplySpringCollision(float springConst, CVector &springDir, CVector & float compression = 1.0f - springRatio; if(compression > 0.0f){ float step = min(CTimer::GetTimeStep(), 3.0f); - float impulse = -0.008f*m_fMass*step * springConst * compression * bias*2.0f; + float impulse = -GRAVITY*m_fMass*step * springConst * compression * bias*2.0f; ApplyMoveForce(springDir*impulse); ApplyTurnForce(springDir*impulse, point); } @@ -489,7 +489,7 @@ void CPhysical::ApplyGravity(void) { if(bAffectedByGravity) - m_vecMoveSpeed.z -= 0.008f * CTimer::GetTimeStep(); + m_vecMoveSpeed.z -= GRAVITY * CTimer::GetTimeStep(); } void @@ -1783,7 +1783,7 @@ CPhysical::ProcessShift(void) } bIsStuck = false; bIsInSafePosition = true; - m_fDistanceTravelled = (GetPosition() - *matrix.GetPosition()).Magnitude(); + m_fDistanceTravelled = (GetPosition() - matrix.GetPosition()).Magnitude(); RemoveAndAdd(); } } @@ -1918,14 +1918,14 @@ CPhysical::ProcessCollision(void) bHitByTrain || m_status == STATUS_PLAYER || IsPed() && ped->IsPlayer()){ if(IsVehicle()) - ((CVehicle*)this)->m_veh_flagD4 = true; + ((CVehicle*)this)->bVehicleColProcessed = true; if(CheckCollision()){ GetMatrix() = savedMatrix; return; } } bHitByTrain = false; - m_fDistanceTravelled = (GetPosition() - *savedMatrix.GetPosition()).Magnitude(); + m_fDistanceTravelled = (GetPosition() - savedMatrix.GetPosition()).Magnitude(); m_phy_flagA80 = false; bIsStuck = false; |