diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-07-10 22:24:27 +0200 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-07-10 22:24:27 +0200 |
commit | e9baf31ad87d85d4159f98dcc91cd3a879122bcb (patch) | |
tree | 2b3831a8bb6bbe578e1ff8039d3e4f3d6e7be1ed | |
parent | Merge/sync fixes after threaded audio (diff) | |
download | re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar.gz re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar.bz2 re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar.lz re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar.xz re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.tar.zst re3-e9baf31ad87d85d4159f98dcc91cd3a879122bcb.zip |
-rw-r--r-- | src/entities/Physical.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 182ff46b..591fb501 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -480,6 +480,10 @@ CPhysical::ApplySpringDampening(float damping, CVector &springDir, CVector &poin { float speedA = DotProduct(speed, springDir); float speedB = DotProduct(GetSpeed(point), springDir); +#ifdef FIX_BUGS + if (speedB == 0.0f) + return true; +#endif float step = Min(CTimer::GetTimeStep(), 3.0f); float impulse = -damping * (speedA + speedB)/2.0f * m_fMass * step * 0.53f; |