Merge branch 'midtexinviswall' into 'master'

Adds ML_MIDTEXINVISWALL linedef flag

See merge request kart-krew-dev/ring-racers-internal!2921
This commit is contained in:
Oni VelocitOni 2025-10-02 22:37:54 +00:00
commit 0369bc01fd
4 changed files with 19 additions and 1 deletions

View file

@ -382,6 +382,11 @@ static inline int lib_getenum(lua_State *L)
lua_pushinteger(L, (lua_Integer)ML_WRAPMIDTEX);
return 1;
}
if (fastcmp(p, "EFFECT6"))
{
lua_pushinteger(L, (lua_Integer)ML_MIDTEXINVISWALL);
return 1;
}
if (mathlib) return luaL_error(L, "linedef flag '%s' could not be found.\n", word);
return 0;
}

View file

@ -159,6 +159,9 @@ enum
// Transfers FOF properties.
ML_TFERLINE = 0x00008000,
// Like ML_WRAPMIDTEX, but invisible wall style instead
ML_MIDTEXINVISWALL = 0x00010000,
};
enum

View file

@ -509,7 +509,9 @@ P_GetMidtextureTopBottom
else
#endif
{
if ((linedef->flags & ML_WRAPMIDTEX) && !side->repeatcnt) // "infinite" repeat
const boolean invismidtexwall = !!(P_IsLineTripWire(linedef)) ^ !!(linedef->flags & ML_MIDTEXINVISWALL);
if (((linedef->flags & ML_WRAPMIDTEX) && !side->repeatcnt) || invismidtexwall) // "infinite" repeat
{
texbottom += side->rowoffset;
textop += side->rowoffset;
@ -782,6 +784,10 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj, opening_t *open)
fixed_t textop, texbottom;
fixed_t texmid, delta1, delta2;
// Should we override typical behavior and extend teh midtexture to the ceiling, to include FoFs?
// const boolean inifiniteheight = linedef->flags & ML_INFINITEMIDTEXTUREHEIGHT;
if (P_GetMidtextureTopBottom(linedef, cross.x, cross.y, &textop, &texbottom))
{
texmid = texbottom+(textop-texbottom)/2;

View file

@ -1977,6 +1977,8 @@ static void ParseTextmapLinedefParameter(UINT32 i, const char *param, const char
lines[i].flags |= ML_NOTBOUNCY;
else if (fastcmp(param, "transfer") && fastcmp("true", val))
lines[i].flags |= ML_TFERLINE;
else if (fastcmp(param, "midtexinviswall") && fastcmp("true", val))
lines[i].flags |= ML_MIDTEXINVISWALL;
// Activation flags
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
lines[i].activation |= SPAC_REPEATSPECIAL;
@ -2787,6 +2789,8 @@ static void P_WriteTextmap(void)
fprintf(f, "notbouncy = true;\n");
if (wlines[i].flags & ML_TFERLINE)
fprintf(f, "transfer = true;\n");
if (wlines[i].flags & ML_MIDTEXINVISWALL)
fprintf(f, "midtexinviswall = true;\n");
if (wlines[i].activation & SPAC_REPEATSPECIAL)
fprintf(f, "repeatspecial = true;\n");
if (wlines[i].activation & SPAC_CROSS)