summaryrefslogtreecommitdiffstats
path: root/src/entities/Physical.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-08 21:37:47 +0200
committeraap <aap@papnet.eu>2019-07-08 21:37:47 +0200
commit2ae112fdf6b90bb4435dba34bcc2a23604e1e158 (patch)
tree5137e9ee1d2b01cd1a125409f1cb23a92a142d9f /src/entities/Physical.cpp
parentlittle changes; one more function of CAutomobile (diff)
downloadre3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar.gz
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar.bz2
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar.lz
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar.xz
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.tar.zst
re3-2ae112fdf6b90bb4435dba34bcc2a23604e1e158.zip
Diffstat (limited to '')
-rw-r--r--src/entities/Physical.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index b2512ec2..c67dad84 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -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();
}
}
@@ -1925,7 +1925,7 @@ CPhysical::ProcessCollision(void)
}
}
bHitByTrain = false;
- m_fDistanceTravelled = (GetPosition() - *savedMatrix.GetPosition()).Magnitude();
+ m_fDistanceTravelled = (GetPosition() - savedMatrix.GetPosition()).Magnitude();
m_phy_flagA80 = false;
bIsStuck = false;