From 1ff401649845990fd154007b459839b907ea4157 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Feb 2017 20:42:12 +0100 Subject: [PATCH] - added ACS math functions floor, ceil and round. --- src/p_acs.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 4a2ca3fd9..baf15c110 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4368,6 +4368,9 @@ enum EACSFunctions ACSF_GetActorFloorTexture, ACSF_GetActorFloorTerrain, ACSF_StrArg, + ACSF_Floor, + ACSF_Ceil, + ACSF_Round, // OpenGL stuff @@ -6091,6 +6094,15 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) case ACSF_StrArg: 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: break; }