From 85488f2f30a34c658177c8f29c825c1a9de743f8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 12 Jan 2017 00:49:40 +0100 Subject: [PATCH] - added GetActorFloorTexture and GetActorFloorTerrain ACS functions. --- src/p_acs.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index f1a0ae8bfd..15bb8d0b49 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4408,6 +4408,8 @@ enum EACSFunctions ACSF_DamageActor, // [arookas] ACSF_SetActorFlag, ACSF_SetTranslation, + ACSF_GetActorFloorTexture, + ACSF_GetActorFloorTerrain, // OpenGL stuff @@ -6100,6 +6102,35 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) break; } + case ACSF_GetActorFloorTexture: + { + auto a = SingleActorFromTID(args[0], activator); + if (a != nullptr) + { + return GlobalACSStrings.AddString(TexMan[a->floorpic]->Name); + } + else + { + return GlobalACSStrings.AddString(""); + } + break; + } + + case ACSF_GetActorFloorTerrain: + { + auto a = SingleActorFromTID(args[0], activator); + if (a != nullptr) + { + return GlobalACSStrings.AddString(Terrains[a->floorterrain].Name); + } + else + { + return GlobalACSStrings.AddString(""); + } + break; + } + + default: break;