mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
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:
commit
0369bc01fd
4 changed files with 19 additions and 1 deletions
|
|
@ -382,6 +382,11 @@ static inline int lib_getenum(lua_State *L)
|
||||||
lua_pushinteger(L, (lua_Integer)ML_WRAPMIDTEX);
|
lua_pushinteger(L, (lua_Integer)ML_WRAPMIDTEX);
|
||||||
return 1;
|
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);
|
if (mathlib) return luaL_error(L, "linedef flag '%s' could not be found.\n", word);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,9 @@ enum
|
||||||
|
|
||||||
// Transfers FOF properties.
|
// Transfers FOF properties.
|
||||||
ML_TFERLINE = 0x00008000,
|
ML_TFERLINE = 0x00008000,
|
||||||
|
|
||||||
|
// Like ML_WRAPMIDTEX, but invisible wall style instead
|
||||||
|
ML_MIDTEXINVISWALL = 0x00010000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
|
|
||||||
|
|
@ -509,7 +509,9 @@ P_GetMidtextureTopBottom
|
||||||
else
|
else
|
||||||
#endif
|
#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;
|
texbottom += side->rowoffset;
|
||||||
textop += 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 textop, texbottom;
|
||||||
fixed_t texmid, delta1, delta2;
|
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))
|
if (P_GetMidtextureTopBottom(linedef, cross.x, cross.y, &textop, &texbottom))
|
||||||
{
|
{
|
||||||
texmid = texbottom+(textop-texbottom)/2;
|
texmid = texbottom+(textop-texbottom)/2;
|
||||||
|
|
|
||||||
|
|
@ -1977,6 +1977,8 @@ static void ParseTextmapLinedefParameter(UINT32 i, const char *param, const char
|
||||||
lines[i].flags |= ML_NOTBOUNCY;
|
lines[i].flags |= ML_NOTBOUNCY;
|
||||||
else if (fastcmp(param, "transfer") && fastcmp("true", val))
|
else if (fastcmp(param, "transfer") && fastcmp("true", val))
|
||||||
lines[i].flags |= ML_TFERLINE;
|
lines[i].flags |= ML_TFERLINE;
|
||||||
|
else if (fastcmp(param, "midtexinviswall") && fastcmp("true", val))
|
||||||
|
lines[i].flags |= ML_MIDTEXINVISWALL;
|
||||||
// Activation flags
|
// Activation flags
|
||||||
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
|
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
|
||||||
lines[i].activation |= SPAC_REPEATSPECIAL;
|
lines[i].activation |= SPAC_REPEATSPECIAL;
|
||||||
|
|
@ -2787,6 +2789,8 @@ static void P_WriteTextmap(void)
|
||||||
fprintf(f, "notbouncy = true;\n");
|
fprintf(f, "notbouncy = true;\n");
|
||||||
if (wlines[i].flags & ML_TFERLINE)
|
if (wlines[i].flags & ML_TFERLINE)
|
||||||
fprintf(f, "transfer = true;\n");
|
fprintf(f, "transfer = true;\n");
|
||||||
|
if (wlines[i].flags & ML_MIDTEXINVISWALL)
|
||||||
|
fprintf(f, "midtexinviswall = true;\n");
|
||||||
if (wlines[i].activation & SPAC_REPEATSPECIAL)
|
if (wlines[i].activation & SPAC_REPEATSPECIAL)
|
||||||
fprintf(f, "repeatspecial = true;\n");
|
fprintf(f, "repeatspecial = true;\n");
|
||||||
if (wlines[i].activation & SPAC_CROSS)
|
if (wlines[i].activation & SPAC_CROSS)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue