diff --git a/src/p_acs.cpp b/src/p_acs.cpp index aacd5cc4a5..c40ba6b942 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -75,6 +75,7 @@ #include "actorptrselect.h" #include "farchive.h" #include "decallib.h" +#include "p_terrain.h" #include "version.h" #include "g_shared/a_pickups.h" @@ -4459,6 +4460,7 @@ enum EACSFunctions ACSF_Warp, // 92 ACSF_GetMaxInventory, ACSF_SetSectorDamage, + ACSF_SetSectorTerrain, /* Zandronum's - these must be skipped when we reach 99! -100:ResetMap(0), @@ -5968,6 +5970,18 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound) } break; + case ACSF_SetSectorTerrain: + if (argCount >= 3) + { + int terrain = P_FindTerrain(FBehavior::StaticLookupString(args[2])); + FSectorTagIterator it(args[0]); + int s; + while ((s = it.Next()) >= 0) + { + sectors[s].terrainnum[args[1]] = terrain; + } + } + default: break; }