diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 0b0391bd0..0569dc20c 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -2436,6 +2436,12 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, GetDisplacement) ACTION_RETURN_VEC2(ofs); } +DEFINE_ACTION_FUNCTION(FLevelLocals, GetPortalGroupCount) +{ + PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); + ACTION_RETURN_INT(self->Displacements.size); +} + void SphericalCoords(FLevelLocals *self, double vpX, double vpY, double vpZ, double tX, double tY, double tZ, double viewYaw, double viewPitch, int absolute, DVector3 *result) { diff --git a/wadsrc/static/zscript/doombase.zs b/wadsrc/static/zscript/doombase.zs index 5425c7b00..7e8190ba2 100644 --- a/wadsrc/static/zscript/doombase.zs +++ b/wadsrc/static/zscript/doombase.zs @@ -492,6 +492,7 @@ struct LevelLocals native native clearscope vector3 Vec2OffsetZ(vector2 pos, vector2 dir, double atz, bool absolute = false) const; native clearscope vector3 Vec3Offset(vector3 pos, vector3 dir, bool absolute = false) const; native clearscope Vector2 GetDisplacement(int pg1, int pg2) const; + native clearscope int GetPortalGroupCount() const; native String GetChecksum() const;