diff --git a/src/deh_lua.c b/src/deh_lua.c index eed99c22b..708bb8d02 100644 --- a/src/deh_lua.c +++ b/src/deh_lua.c @@ -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; } diff --git a/src/doomdata.h b/src/doomdata.h index c81bc059b..ef0fce7a3 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -159,6 +159,9 @@ enum // Transfers FOF properties. ML_TFERLINE = 0x00008000, + + // Like ML_WRAPMIDTEX, but invisible wall style instead + ML_MIDTEXINVISWALL = 0x00010000, }; enum diff --git a/src/p_maputl.c b/src/p_maputl.c index dca379e83..45f3b5009 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -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; diff --git a/src/p_setup.cpp b/src/p_setup.cpp index ee8b8a9b2..12e1c8f8b 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -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)