mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-23 09:41:20 +00:00
Merge branch 'improve-439-again' into 'next'
Allow linedef action 439 to set different back-side textures (again) See merge request STJr/SRB2!1812
This commit is contained in:
commit
31a6b7b365
4 changed files with 19 additions and 9 deletions
|
@ -2481,6 +2481,7 @@ linedeftypes
|
||||||
prefix = "(439)";
|
prefix = "(439)";
|
||||||
flags8text = "[3] Set delay by backside sector";
|
flags8text = "[3] Set delay by backside sector";
|
||||||
flags64text = "[6] Only existing";
|
flags64text = "[6] Only existing";
|
||||||
|
flags8192text = "[13] Use backside textures";
|
||||||
}
|
}
|
||||||
|
|
||||||
440
|
440
|
||||||
|
|
|
@ -4588,6 +4588,12 @@ udmf
|
||||||
type = 11;
|
type = 11;
|
||||||
enum = "yesno";
|
enum = "yesno";
|
||||||
}
|
}
|
||||||
|
arg3
|
||||||
|
{
|
||||||
|
title = "Use backside textures?";
|
||||||
|
type = 11;
|
||||||
|
enum = "noyes";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
440
|
440
|
||||||
|
|
|
@ -5275,6 +5275,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
||||||
lines[i].args[0] = tag;
|
lines[i].args[0] = tag;
|
||||||
lines[i].args[1] = TMSD_FRONTBACK;
|
lines[i].args[1] = TMSD_FRONTBACK;
|
||||||
lines[i].args[2] = !!(lines[i].flags & ML_NOCLIMB);
|
lines[i].args[2] = !!(lines[i].flags & ML_NOCLIMB);
|
||||||
|
lines[i].args[3] = !!(lines[i].flags & ML_EFFECT6);
|
||||||
break;
|
break;
|
||||||
case 441: //Condition set trigger
|
case 441: //Condition set trigger
|
||||||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||||
|
|
16
src/p_spec.c
16
src/p_spec.c
|
@ -2886,7 +2886,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
case 439: // Set texture
|
case 439: // Set texture
|
||||||
{
|
{
|
||||||
size_t linenum;
|
size_t linenum;
|
||||||
side_t *set = &sides[line->sidenum[0]], *this;
|
side_t *setfront = &sides[line->sidenum[0]];
|
||||||
|
side_t *setback = (line->args[3] && line->sidenum[1] != 0xffff) ? &sides[line->sidenum[1]] : setfront;
|
||||||
|
side_t *this;
|
||||||
boolean always = !(line->args[2]); // If args[2] is set: Only change mid texture if mid texture already exists on tagged lines, etc.
|
boolean always = !(line->args[2]); // If args[2] is set: Only change mid texture if mid texture already exists on tagged lines, etc.
|
||||||
|
|
||||||
for (linenum = 0; linenum < numlines; linenum++)
|
for (linenum = 0; linenum < numlines; linenum++)
|
||||||
|
@ -2901,18 +2903,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||||
if (line->args[1] != TMSD_BACK)
|
if (line->args[1] != TMSD_BACK)
|
||||||
{
|
{
|
||||||
this = &sides[lines[linenum].sidenum[0]];
|
this = &sides[lines[linenum].sidenum[0]];
|
||||||
if (always || this->toptexture) this->toptexture = set->toptexture;
|
if (always || this->toptexture) this->toptexture = setfront->toptexture;
|
||||||
if (always || this->midtexture) this->midtexture = set->midtexture;
|
if (always || this->midtexture) this->midtexture = setfront->midtexture;
|
||||||
if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture;
|
if (always || this->bottomtexture) this->bottomtexture = setfront->bottomtexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back side
|
// Back side
|
||||||
if (line->args[1] != TMSD_FRONT && lines[linenum].sidenum[1] != 0xffff)
|
if (line->args[1] != TMSD_FRONT && lines[linenum].sidenum[1] != 0xffff)
|
||||||
{
|
{
|
||||||
this = &sides[lines[linenum].sidenum[1]];
|
this = &sides[lines[linenum].sidenum[1]];
|
||||||
if (always || this->toptexture) this->toptexture = set->toptexture;
|
if (always || this->toptexture) this->toptexture = setback->toptexture;
|
||||||
if (always || this->midtexture) this->midtexture = set->midtexture;
|
if (always || this->midtexture) this->midtexture = setback->midtexture;
|
||||||
if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture;
|
if (always || this->bottomtexture) this->bottomtexture = setback->bottomtexture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue