diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 452360143..40d7bfbe2 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -375,6 +375,22 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingSkills) return 0; } +DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingXY) +{ + PARAM_PROLOGUE; + PARAM_INT(thing); + PARAM_FLOAT(x); + PARAM_FLOAT(y); + + if ((unsigned)thing < MapThingsConverted.Size()) + { + auto& pos = MapThingsConverted[thing].pos; + pos.X = x; + pos.Y = y; + } + return 0; +} + DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingZ) { PARAM_PROLOGUE; diff --git a/wadsrc/static/zscript/level_compatibility.txt b/wadsrc/static/zscript/level_compatibility.txt index 6502ea69b..890872342 100644 --- a/wadsrc/static/zscript/level_compatibility.txt +++ b/wadsrc/static/zscript/level_compatibility.txt @@ -680,6 +680,7 @@ class LevelCompatibility play private static native void AddSectorTag(int sector, int tag); private static native void OffsetSectorPlane(int sector, int plane, double offset); private static native void SetThingSkills(int thing, int skills); + private static native void SetThingXY(int thing, double x, double y); private static native void SetThingZ(int thing, double z); private static native void SetThingFlags(int thing, int flags); private static native void SetVertex(uint vertex, double x, double y);