diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-15 11:21:24 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-15 11:21:24 +0200 |
commit | a6ca999ed43ac59a960b463b27f2ad65b2c523c2 (patch) | |
tree | a374161bc5e3793b8d73c783831809153fe346fd /src | |
parent | fix (diff) | |
download | re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar.gz re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar.bz2 re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar.lz re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar.xz re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.tar.zst re3-a6ca999ed43ac59a960b463b27f2ad65b2c523c2.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/control/Script.cpp | 8 | ||||
-rw-r--r-- | src/core/common.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 5a7b318a..cfbaacda 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1598,25 +1598,25 @@ int8 CRunningScript::ProcessCommandsFrom100To199(int32 command) case COMMAND_ABS_VAR_INT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - *ptr = abs(*ptr); + *ptr = ABS(*ptr); return 0; } case COMMAND_ABS_LVAR_INT: { int32* ptr = GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - *ptr = abs(*ptr); + *ptr = ABS(*ptr); return 0; } case COMMAND_ABS_VAR_FLOAT: { float* ptr = (float*)GetPointerToScriptVariable(&m_nIp, VAR_GLOBAL); - *ptr = abs(*ptr); + *ptr = ABS(*ptr); return 0; } case COMMAND_ABS_LVAR_FLOAT: { float* ptr = (float*)GetPointerToScriptVariable(&m_nIp, VAR_LOCAL); - *ptr = abs(*ptr); + *ptr = ABS(*ptr); return 0; } case COMMAND_GENERATE_RANDOM_FLOAT: diff --git a/src/core/common.h b/src/core/common.h index e57c59d8..fd961dd7 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -178,4 +178,4 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define max(a, b) (((a) > (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b)) -#define abs(a) (((a) < 0) ? (-a) : (a)) +#define ABS(a) (((a) < 0) ? (-a) : (a)) |