diff --git a/polymer/eduke32/build/include/m32script.h b/polymer/eduke32/build/include/m32script.h index 35f29d8f3..3b2c1a87a 100644 --- a/polymer/eduke32/build/include/m32script.h +++ b/polymer/eduke32/build/include/m32script.h @@ -122,7 +122,6 @@ enum GamevarFlags_t { GAMEVAR_CHARPTR = 0x00010000, // plValues is a pointer to a char GAMEVAR_PTR_MASK = GAMEVAR_INTPTR|GAMEVAR_FLOATPTR|GAMEVAR_SHORTPTR|GAMEVAR_CHARPTR, -// GAMEVAR_NORESET = 0x00020000, // var values are not reset when restoring map state GAMEVAR_SPECIAL = 0x00040000, // flag for structure member shortcut vars }; @@ -142,7 +141,6 @@ enum GamearrayFlags_t { GAMEARRAY_VARSIZE = 0x00000020, GAMEARRAY_RESET = 0x00000008, -/// GAMEARRAY_NORESET = 0x00000001, }; typedef struct { diff --git a/polymer/eduke32/source/lunatic/con_lang.lua b/polymer/eduke32/source/lunatic/con_lang.lua index e9e18400a..5ec6b7441 100644 --- a/polymer/eduke32/source/lunatic/con_lang.lua +++ b/polymer/eduke32/source/lunatic/con_lang.lua @@ -725,8 +725,8 @@ local SectorLabels = { hitag = SEC".hitag", extra = SEC".extra", - ceilingbunch = {}, - floorbunch = {}, + ceilingbunch = { SEC".ceilingbunch" }, + floorbunch = { SEC".floorbunch" }, ulotag = S2U(SEC".lotag"), uhitag = S2U(SEC".hitag"), diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index 71c426fc4..0180d552b 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -1376,7 +1376,7 @@ local function our_require(modname, ...) errorf(ERRLEV-1, "Couldn't open file \"%s\"", modfn) end - local modfunc, errmsg = loadstring(str) + local modfunc, errmsg = loadstring(str, modfn) if (modfunc == nil) then errorf(ERRLEV-1, "Couldn't load \"%s\": %s", modname, errmsg) end diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 1dea66823..ae9b2b4ca 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -1113,6 +1113,12 @@ function Cmd.gamevar(identifier, initval, flags) return end + local GVFLAG_NYI = GVFLAG.NODEFAULT + GVFLAG.NORESET + if (bit.band(flags, GVFLAG_NYI) ~= 0) then + warnprintf("gamevar \"%s\" flag(s) %d: not yet implemented", + identifier, bit.band(flags, GVFLAG_NYI)) + end + if (flags==GVFLAG.PERPLAYER+GVFLAG.PERACTOR) then errprintf("invalid gamevar flags: must be either PERPLAYER or PERACTOR, not both") return @@ -3227,14 +3233,23 @@ local function handle_cmdline_arg(str) local val = true local warnstr = str:sub(3) - if (warnstr:sub(1,3)=="no-") then - val = false - warnstr = warnstr:sub(4) - end - - if (type(g_warn[warnstr])=="boolean") then - g_warn[warnstr] = val + if (warnstr == "all") then + -- Enable all warnings. + for wopt in pairs(g_warn) do + g_warn[wopt] = true + end ok = true + else + -- Enable or disable a particular warning. + if (warnstr:sub(1,3)=="no-") then + val = false + warnstr = warnstr:sub(4) + end + + if (type(g_warn[warnstr])=="boolean") then + g_warn[warnstr] = val + ok = true + end end -- -fno* special handling