diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-06 22:02:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-06 22:02:44 +0300 |
commit | c9026cc085ee74f76656ac9d930c2e7d262e56a8 (patch) | |
tree | c8d0dc46f267ff8f5551fdf3b7fb31696e46aa1c /src | |
parent | f0ae9007f666580259ca8c120f7aaee58a63f85a (diff) | |
download | plus-c9026cc085ee74f76656ac9d930c2e7d262e56a8.tar.gz plus-c9026cc085ee74f76656ac9d930c2e7d262e56a8.tar.bz2 plus-c9026cc085ee74f76656ac9d930c2e7d262e56a8.tar.xz plus-c9026cc085ee74f76656ac9d930c2e7d262e56a8.zip |
Fix incorrect particle calucaltion in fast physics.
Diffstat (limited to 'src')
-rw-r--r-- | src/particle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/particle.cpp b/src/particle.cpp index c1f2d9edd..aca1d9083 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -140,9 +140,9 @@ bool Particle::update() if (!dist.x) break; - invHypotenuse = 2.0f / static_cast<float>(fabs(dist.x)) + invHypotenuse = 2.0f / (static_cast<float>(fabs(dist.x)) + static_cast<float>(fabs(dist.y)) - + static_cast<float>(fabs(dist.z)); + + static_cast<float>(fabs(dist.z))); break; default: invHypotenuse = 1.0f / static_cast<float>(sqrt( |