Linedef 80 updated

- Uses args instead of texture offsets.
- Compares tag lists, instead of thing angle.
- Made the arguments accept 0 as a "catch-all" option (args[0] == 0 means don't care what type it is; line tag == 0 means don't care what tags they have)
This commit is contained in:
Sally Coolatta 2022-10-10 08:55:49 -04:00
parent aa7e26e40e
commit 7f75501606
2 changed files with 25 additions and 6 deletions

View file

@ -4215,6 +4215,10 @@ static void P_ConvertBinaryLinedefTypes(void)
lines[i].args[0] = tag;
lines[i].args[1] = P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS;
break;
case 80: //Raise tagged things by type to this FOF
lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS;
// angle will be converted to tags elsewhere, because they aren't ready yet...
break;
case 81: //Block enemies
lines[i].flags |= ML_BLOCKMONSTERS;
lines[i].special = 0;

View file

@ -5241,7 +5241,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
static void
P_RaiseTaggedThingsToFakeFloor (
UINT16 type,
INT16 tag,
const taglist_t *tags,
sector_t *control
){
sector_t *target;
@ -5261,9 +5261,25 @@ P_RaiseTaggedThingsToFakeFloor (
{
mthing = mo->spawnpoint;
if (mthing == NULL)
{
continue;
}
if (!udmf)
{
// We have to convert these here, as mobjs, let alone
// sector thing lists, don't exist at the time of the rest
// of the binary map conversion.
const mtag_t convertTag = mthing->angle;
Tag_Add(&mthing->tags, convertTag);
Taggroup_Add(tags_mapthings, convertTag, (size_t)(mthing - mapthings));
}
if (
mthing->type == type &&
mthing->angle == tag
(type == 0 || mthing->type == type) &&
(tags->count == 0 || Tag_Share(&mthing->tags, tags))
){
if (( mo->flags2 & MF2_OBJECTFLIP ))
{
@ -6805,10 +6821,9 @@ void P_SpawnSpecialsThatRequireObjects(boolean fromnetsave)
case 80: // Raise tagged things by type to this FOF
{
mtag_t tag = Tag_FGet(&lines[i].tags);
P_RaiseTaggedThingsToFakeFloor(
( sides[lines[i].sidenum[0]].textureoffset >> FRACBITS ),
tag,
lines[i].args[0],
&lines[i].tags,
lines[i].frontsector
);
}