[7848] Fix set variable to zero on apply -100% mod

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
SeT 2009-05-18 23:39:42 +04:00 committed by DiSlord
parent 07d00c3927
commit c672d4d99e
2 changed files with 2 additions and 2 deletions

View file

@ -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));
}

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7847"
#define REVISION_NR "7848"
#endif // __REVISION_NR_H__