From df866dd37ba8d9b8dd98f972c2e37ae871c68deb Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 18 May 2009 15:15:22 -0500 Subject: [7848] Fix set variable to zero on apply -100% mod Author: SeT --HG-- branch : trunk --- src/shared/Util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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)); } -- cgit v1.2.3