aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-18 15:15:22 -0500
committermegamage <none@none>2009-05-18 15:15:22 -0500
commitdf866dd37ba8d9b8dd98f972c2e37ae871c68deb (patch)
tree9beb34e9fbb97c63d4e31bd258f427dc4ca242f0 /src/shared
parentc3499f39da83887e79a2fe219ddc75961c81c756 (diff)
[7848] Fix set variable to zero on apply -100% mod Author: SeT
--HG-- branch : trunk
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/Util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/Util.h b/src/shared/Util.h
index adfbdad620a..ddbf968b2c2 100644
--- a/src/shared/Util.h
+++ b/src/shared/Util.h
@@ -92,7 +92,7 @@ inline void ApplyModFloatVar(float& var, float val, bool apply)
inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
{
- if (!apply && val == -100.0f)
+ if (val == -100.0f) // prevent set var to zero
val = -99.99f;
var *= (apply?(100.0f+val)/100.0f : 100.0f / (100.0f+val));
}