diff --git a/src/deh_lua.c b/src/deh_lua.c index 1bac72777..3e492f62c 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -353,11 +353,6 @@ static int ScanConstants(lua_State *L, boolean mathlib, const char *word) } else if (fastncmp("TOL_", word, 4)) { p = word+4; - if (lua_compatmode && fastcmp(p, "MATCH")) - { - CacheAndPushConstant(L, word, ((lua_Integer)TOL_BATTLE)); - return 1; - } for (i = 0; TYPEOFLEVEL[i].name; i++) if (fastcmp(p, TYPEOFLEVEL[i].name)) { CacheAndPushConstant(L, word, TYPEOFLEVEL[i].flag); diff --git a/src/doomstat.h b/src/doomstat.h index 0cffa8373..0b8d6edb2 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -529,12 +529,20 @@ enum TypeOfLevel TOL_BATTLE = 0x0002, ///< Battle TOL_BOSS = 0x0004, ///< Boss (variant of battle, but forbidden) + // Compat + TOL_COMPAT1 = 0x0008, ///< For compat. Handles all the unused kart v1 types. + TOL_COMPAT2 = 0x0010, ///< ^ + TOL_COMPAT3 = 0x0020, ///< ^ + TOL_COMPAT4 = 0x0040, ///< ^ + TOL_COMPAT5 = 0x0080, ///< ^ + TOL_COMPAT6 = 0x0100, ///< ^ + // Modifiers - TOL_TV = 0x0100 ///< Midnight Channel specific: draw TV like overlay on HUD + TOL_TV = 0x0200 ///< Midnight Channel specific: draw TV like overlay on HUD }; #define MAXTOL (1<<31) -#define NUMBASETOLNAMES (4) +#define NUMBASETOLNAMES (10) #define NUMTOLNAMES (NUMBASETOLNAMES + NUMGAMETYPEFREESLOTS) struct tolinfo_t diff --git a/src/g_game.c b/src/g_game.c index 7d4869b3d..5fa83f9d9 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3410,6 +3410,20 @@ tolinfo_t TYPEOFLEVEL[NUMTOLNAMES] = { {"BATTLE",TOL_BATTLE}, {"BOSS",TOL_BOSS}, {"TV",TOL_TV}, + + // Compat stuff + {"MATCH",TOL_BATTLE}, + {"SOLO",TOL_COMPAT1}, + {"SP",TOL_COMPAT1}, + {"SINGLEPLAYER",TOL_COMPAT1}, + {"SINGLE",TOL_COMPAT1}, + {"COOP",TOL_COMPAT2}, + {"CO-OP",TOL_COMPAT2}, + {"COMPETITION",TOL_COMPAT3}, + {"TAG",TOL_COMPAT4}, + {"CTF",TOL_COMPAT5}, + {"CUSTOM",TOL_COMPAT6}, + {NULL, 0} }; diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 352a13faa..971c6c023 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1523,7 +1523,8 @@ static int lib_pTeleportMove(lua_State *L) INLEVEL if (!thing) return LUA_ErrInvalid(L, "mobj_t"); - LUA_Deprecated(L, "P_TeleportMove", "P_SetOrigin\" or \"P_MoveOrigin"); + // Be quiet. + //LUA_Deprecated(L, "P_TeleportMove", "P_SetOrigin\" or \"P_MoveOrigin"); lua_pushboolean(L, P_MoveOrigin(thing, x, y, z)); LUA_PushUserdata(L, g_tm.thing, META_MOBJ); P_RestoreTMStruct(ptm); diff --git a/src/p_saveg.c b/src/p_saveg.c index a10c4ed5a..6eba37486 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3285,8 +3285,8 @@ static void P_NetArchiveThinkers(savebuffer_t *save) continue; } #ifdef PARANOIA - else if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed) // wait garbage collection - I_Error("unknown thinker type %p", th->function.acp1); + else + I_Assert(th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed); // wait garbage collection #endif }