From ee3ef788a518252701900fdfacad03713b307506 Mon Sep 17 00:00:00 2001 From: Player701 Date: Sun, 20 Sep 2020 22:46:01 +0300 Subject: [PATCH] Exported FLevelLocals::ChangeLevel to ZScript # Conflicts: # wadsrc/static/zscript/base.zs --- src/g_level.cpp | 11 +++++++++++ wadsrc/static/zscript/base.zs | 1 + 2 files changed, 12 insertions(+) diff --git a/src/g_level.cpp b/src/g_level.cpp index 6e143b898..ba3c83121 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -698,6 +698,17 @@ void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill } } +DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, ChangeLevel, G_ChangeLevel) +{ + PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); + PARAM_STRING(levelname); + PARAM_INT(position); + PARAM_INT(inflags); + PARAM_INT(nextSkill); + G_ChangeLevel(levelname, position, inflags, nextSkill); + return 0; +} + //========================================================================== // // diff --git a/wadsrc/static/zscript/base.zs b/wadsrc/static/zscript/base.zs index 403596f29..51e019185 100644 --- a/wadsrc/static/zscript/base.zs +++ b/wadsrc/static/zscript/base.zs @@ -788,6 +788,7 @@ struct LevelLocals native native static void ExitLevel(int position, bool keepFacing); native static void SecretExitLevel(int position); + native static void ChangeLevel(string levelname, int position = 0, int flags = 0, int skill = -1); } struct StringTable native