diff --git a/src/maploader/maploader.cpp b/src/maploader/maploader.cpp index 3159fa7b78..983cd31a2b 100644 --- a/src/maploader/maploader.cpp +++ b/src/maploader/maploader.cpp @@ -3660,6 +3660,22 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetVertex) return 0; } +DEFINE_ACTION_FUNCTION(DLevelPostProcessor, FlipLine) +{ + PARAM_SELF_PROLOGUE(DLevelPostProcessor); + PARAM_UINT(lineidx); + + line_t *line = &self->Level->lines[lineidx]; + vertex_t *v1 = line->v1; + vertex_t *v2 = line->v2; + + line->v1 = v2; + line->v2 = v1; + + self->loader->ForceNodeBuild = true; + return 0; +} + DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetLineSectorRef) { PARAM_SELF_PROLOGUE(DLevelPostProcessor); diff --git a/wadsrc/static/zscript/level_postprocessor.zs b/wadsrc/static/zscript/level_postprocessor.zs index afef058d58..fb2ac6d957 100644 --- a/wadsrc/static/zscript/level_postprocessor.zs +++ b/wadsrc/static/zscript/level_postprocessor.zs @@ -47,6 +47,7 @@ class LevelPostProcessor native play protected native void SetThingStringArgument(uint thing, Name value); protected native void SetVertex(uint vertex, double x, double y); + protected native void FlipLine(uint Line); protected native void SetLineSectorRef(uint line, uint side, uint sector); protected native Actor GetDefaultActor(Name actorclass);