mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Adapt linedef type 439 to UDMF
This commit is contained in:
parent
877ec96eec
commit
3a73c6167c
3 changed files with 44 additions and 13 deletions
|
@ -3050,6 +3050,29 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
439
|
||||
{
|
||||
title = "Change Tagged Linedef's Textures";
|
||||
prefix = "(439)";
|
||||
arg0
|
||||
{
|
||||
title = "Target linedef tag";
|
||||
type = 15;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Affected sides";
|
||||
type = 11;
|
||||
enum = "frontbackboth";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Change unset textures?";
|
||||
type = 11;
|
||||
enum = "yesno";
|
||||
}
|
||||
}
|
||||
|
||||
440
|
||||
{
|
||||
title = "Start Metal Sonic Race";
|
||||
|
|
|
@ -3824,6 +3824,11 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);
|
||||
break;
|
||||
case 439: //Change tagged linedef's textures
|
||||
lines[i].args[0] = tag;
|
||||
lines[i].args[1] = TMSD_FRONTBACK;
|
||||
lines[i].args[2] = !!(lines[i].flags & ML_NOCLIMB);
|
||||
break;
|
||||
case 441: //Condition set trigger
|
||||
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
|
||||
break;
|
||||
|
|
13
src/p_spec.c
13
src/p_spec.c
|
@ -2776,32 +2776,35 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
{
|
||||
size_t linenum;
|
||||
side_t *set = &sides[line->sidenum[0]], *this;
|
||||
boolean always = !(line->flags & ML_NOCLIMB); // If noclimb: 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++)
|
||||
{
|
||||
if (lines[linenum].special == 439)
|
||||
continue; // Don't override other set texture lines!
|
||||
|
||||
if (!Tag_Find(&lines[linenum].tags, tag))
|
||||
if (!Tag_Find(&lines[linenum].tags, line->args[0]))
|
||||
continue; // Find tagged lines
|
||||
|
||||
// Front side
|
||||
if (line->args[1] != TMSD_BACK)
|
||||
{
|
||||
this = &sides[lines[linenum].sidenum[0]];
|
||||
if (always || this->toptexture) this->toptexture = set->toptexture;
|
||||
if (always || this->midtexture) this->midtexture = set->midtexture;
|
||||
if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture;
|
||||
|
||||
if (lines[linenum].sidenum[1] == 0xffff)
|
||||
continue; // One-sided stops here.
|
||||
}
|
||||
|
||||
// Back side
|
||||
if (line->args[1] != TMSD_FRONT && lines[linenum].sidenum[1] != 0xffff)
|
||||
{
|
||||
this = &sides[lines[linenum].sidenum[1]];
|
||||
if (always || this->toptexture) this->toptexture = set->toptexture;
|
||||
if (always || this->midtexture) this->midtexture = set->midtexture;
|
||||
if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 440: // Play race countdown and start Metal Sonic
|
||||
|
|
Loading…
Reference in a new issue