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:27:00 +0200 |
commit | 9f0a96ac896cec2e8d094738e23566652ac45f52 (patch) | |
tree | e7e0cbeef8bf1dd219cb01fd91eba745a5d8d1e0 | |
parent | readme: fix lto option (diff) | |
download | re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar.gz re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar.bz2 re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar.lz re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar.xz re3-9f0a96ac896cec2e8d094738e23566652ac45f52.tar.zst re3-9f0a96ac896cec2e8d094738e23566652ac45f52.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 890e7876..e9ae3065 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -521,6 +521,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; if(bIsHeavy) |