mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Implement "set flats" linedef type
This commit is contained in:
parent
13eb4cb359
commit
099cea0a19
4 changed files with 56 additions and 0 deletions
|
@ -2009,6 +2009,14 @@ linedeftypes
|
|||
flags8text = "[3] Set delay by backside sector";
|
||||
}
|
||||
|
||||
408
|
||||
{
|
||||
title = "Set Tagged Sector's Flats";
|
||||
prefix = "(408)";
|
||||
flags64text = "[6] Don't set floor flat";
|
||||
flags512text = "[9] Don't set ceiling flat";
|
||||
}
|
||||
|
||||
409
|
||||
{
|
||||
title = "Change Tagged Sector's Tag";
|
||||
|
|
|
@ -765,6 +765,11 @@ doom
|
|||
title = "Set Tagged Sector's Light Level";
|
||||
prefix = "(402)";
|
||||
}
|
||||
408
|
||||
{
|
||||
title = "Set Tagged Sector's Flats";
|
||||
prefix = "(408)";
|
||||
}
|
||||
409
|
||||
{
|
||||
title = "Change Tagged Sector's Tag";
|
||||
|
@ -2448,6 +2453,23 @@ udmf
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
408
|
||||
{
|
||||
title = "Set Tagged Sector's Flats";
|
||||
prefix = "(408)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Affected planes";
|
||||
type = 11;
|
||||
enum = "floorceiling";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linedefexecplane
|
||||
|
|
|
@ -3570,6 +3570,20 @@ static void P_ConvertBinaryMap(void)
|
|||
lines[i].args[4] = !!(lines[i].flags & ML_NOCLIMB);
|
||||
lines[i].special = 405;
|
||||
break;
|
||||
case 408: //Set flats
|
||||
lines[i].args[0] = tag;
|
||||
if ((lines[i].flags & (ML_NOCLIMB|ML_EFFECT4)) == (ML_NOCLIMB|ML_EFFECT4))
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Set flats linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"), tag);
|
||||
lines[i].special = 0;
|
||||
}
|
||||
else if (lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[1] = 1;
|
||||
else if (lines[i].flags & ML_EFFECT4)
|
||||
lines[i].args[1] = 0;
|
||||
else
|
||||
lines[i].args[1] = 2;
|
||||
break;
|
||||
case 411: //Stop plane movement
|
||||
lines[i].args[0] = tag;
|
||||
break;
|
||||
|
|
12
src/p_spec.c
12
src/p_spec.c
|
@ -2284,6 +2284,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
EV_DoCeiling(line->args[0], line, moveCeilingByDistance);
|
||||
break;
|
||||
|
||||
case 408: // Set flats
|
||||
{
|
||||
TAG_ITER_SECTORS(line->args[0], secnum)
|
||||
{
|
||||
if (line->args[1] != 1)
|
||||
sectors[secnum].floorpic = line->frontsector->floorpic;
|
||||
if (line->args[1] != 0)
|
||||
sectors[secnum].ceilingpic = line->frontsector->ceilingpic;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 409: // Change tagged sectors' tag
|
||||
// (formerly "Change calling sectors' tag", but behavior was changed)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue