aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWarpten <vertozor@gmail.com>2013-07-11 11:10:05 +0200
committerWarpten <vertozor@gmail.com>2013-07-11 11:10:05 +0200
commit55338ff53bdc73e5bab02c00ef25b0a2ce354096 (patch)
treedf8703b29b235a27c9f1ebfe6d9f110e142a45bd /src
parentf274560c4a291891aff286414edc3d0472c844e3 (diff)
Revert "Shared/Utils: Fixed ApplyPercentModFloatVar."
This reverts commit 2005be04740406f17bd8af8569f2cd75aa0614d4. Note to self: do not touch maths past 10 any more.
Diffstat (limited to 'src')
-rw-r--r--src/server/shared/Utilities/Util.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index fff86b11901..a379bfd32fc 100644
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
@@ -114,8 +114,7 @@ inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
{
if (val == -100.0f) // prevent set var to zero
val = -99.99f;
-
- var *= apply ? (100.0f + val) / 100.0f : (100.0f - val) / 100.0f;
+ var *= (apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
}
// Percentage calculation