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