This commit is contained in:
Nikolay Korolev 2019-07-15 12:21:24 +03:00
parent 5d90821a8e
commit a6ca999ed4
2 changed files with 5 additions and 5 deletions

View File

@ -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:

View File

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