1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 09:30:00 +00:00
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))