- added ACS math functions floor, ceil and round.

This commit is contained in:
Christoph Oelckers 2017-02-27 20:42:12 +01:00
parent e511f7f84b
commit 1ff4016498

View file

@ -4368,6 +4368,9 @@ enum EACSFunctions
ACSF_GetActorFloorTexture, ACSF_GetActorFloorTexture,
ACSF_GetActorFloorTerrain, ACSF_GetActorFloorTerrain,
ACSF_StrArg, ACSF_StrArg,
ACSF_Floor,
ACSF_Ceil,
ACSF_Round,
// OpenGL stuff // OpenGL stuff
@ -6091,6 +6094,15 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
case ACSF_StrArg: case ACSF_StrArg:
return -FName(FBehavior::StaticLookupString(args[0])); return -FName(FBehavior::StaticLookupString(args[0]));
case ACSF_Floor:
return args[0] & ~0xffff;
case ACSF_Ceil:
return (args[0] & ~0xffff) + 0x10000;
case ACSF_Round:
return (args[0] + 32768) & ~0xffff;
default: default:
break; break;
} }