diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 965d08e82..39a594fe0 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -573,6 +573,7 @@ const char *keyw[] = "ifplaybackon", // 399 "divscale", // 400 "scalevar", // 401 + "undefinegamefunc", // 402 "" }; #endif @@ -5419,6 +5420,25 @@ repeatcase: continue; + case CON_UNDEFINEGAMEFUNC: + g_scriptPtr--; + C_GetNextValue(LABEL_DEFINE); + g_scriptPtr--; + j = *g_scriptPtr; + + if (EDUKE32_PREDICT_FALSE((unsigned)j > NUMGAMEFUNCTIONS-1)) + { + initprintf("%s:%d: error: function number exceeds number of game functions.\n", + g_scriptFileName,g_lineNumber); + g_errorCnt++; + C_NextLine(); + continue; + } + + gamefunctions[j][0] = '\0'; + + continue; + case CON_DEFINESKILLNAME: g_scriptPtr--; diff --git a/source/duke3d/src/gamedef.h b/source/duke3d/src/gamedef.h index 09d513402..97c07d3cb 100644 --- a/source/duke3d/src/gamedef.h +++ b/source/duke3d/src/gamedef.h @@ -1131,6 +1131,7 @@ enum ScriptKeywords_t CON_IFPLAYBACKON, // 399 CON_DIVSCALE, // 400 CON_SCALEVAR, // 401 + CON_UNDEFINEGAMEFUNC, // 402 CON_END }; // KEEPINSYNC with the keyword list in lunatic/con_lang.lua