From c672d4d99e8139fa5162f8a33e8b7e10335bccc3 Mon Sep 17 00:00:00 2001 From: SeT Date: Mon, 18 May 2009 23:39:42 +0400 Subject: [PATCH] [7848] Fix set variable to zero on apply -100% mod Signed-off-by: DiSlord --- src/shared/Util.h | 2 +- src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/Util.h b/src/shared/Util.h index 8fa4faacf..121bbc292 100644 --- a/src/shared/Util.h +++ b/src/shared/Util.h @@ -90,7 +90,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)); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 6d508bccf..d0f13bcb4 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7847" + #define REVISION_NR "7848" #endif // __REVISION_NR_H__