summaryrefslogtreecommitdiff
path: root/src/particle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-05 15:55:55 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-05 15:55:55 +0300
commitd1bb1b375d657f0821ccfebf18fa1c3873314690 (patch)
treeeb83bbf7242b2c367c4df19113f37f6c6ab9faa2 /src/particle.cpp
parent9f87b4c92e3a4d524250dbbb376cd0f59b7d995e (diff)
downloadmanaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.gz
manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.bz2
manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.xz
manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.zip
Fix useless variables initialisations.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r--src/particle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/particle.cpp b/src/particle.cpp
index 3e5bda24f..2b019ab3f 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -134,9 +134,11 @@ bool Particle::update()
dist.x * dist.x + dist.y * dist.y + dist.z * dist.z);
break;
case 2:
- invHypotenuse = 0;
if (!dist.x)
+ {
+ invHypotenuse = 0;
break;
+ }
invHypotenuse = 2.0f / (static_cast<float>(fabs(dist.x))
+ static_cast<float>(fabs(dist.y))