mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7848] Fix set variable to zero on apply -100% mod
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
07d00c3927
commit
c672d4d99e
2 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7847"
|
||||
#define REVISION_NR "7848"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue