Merge branch 'blankart-dev' into portv1objects

This commit is contained in:
NepDisk 2025-04-15 16:41:57 -04:00
commit 06d35a774e
5 changed files with 28 additions and 10 deletions

View file

@ -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);

View file

@ -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

View file

@ -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}
};

View file

@ -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);

View file

@ -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
}