aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/Util.h')
-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));
}