Finish line + respawn line use args

This commit is contained in:
Sally Coolatta 2022-10-10 09:12:41 -04:00
parent 7f75501606
commit 6fb56cc940
3 changed files with 21 additions and 3 deletions

View file

@ -5754,6 +5754,14 @@ static void P_ConvertBinaryLinedefTypes(void)
case 909: //Fog wall
lines[i].blendmode = AST_FOG;
break;
case 2001: //Finish line
if (lines[i].flags & ML_NOCLIMB)
lines[i].args[0] |= TMCFF_FLIP;
break;
case 2004: //Respawn line
if (lines[i].flags & ML_NOCLIMB)
lines[i].args[0] |= TMCRF_FRONTONLY;
break;
default:
break;
}

View file

@ -2079,8 +2079,8 @@ void P_CrossSpecialLine(line_t *line, INT32 side, mobj_t *thing)
{
if ((gametyperules & GTR_CIRCUIT) && !(player->exiting) && !(player->pflags & PF_HITFINISHLINE))
{
if (((line->flags & (ML_NOCLIMB)) && (side == 0))
|| (!(line->flags & (ML_NOCLIMB)) && (side == 1))) // crossed from behind to infront
if (((line->args[0] & TMCFF_FLIP) && (side == 0))
|| (!(line->args[0] & TMCFF_FLIP) && (side == 1))) // crossed from behind to infront
{
K_HandleLapIncrement(player);
}
@ -2100,7 +2100,7 @@ void P_CrossSpecialLine(line_t *line, INT32 side, mobj_t *thing)
if
(
player->respawn.state == RESPAWNST_NONE &&
(!(line->flags & ML_NOCLIMB) || side == 0)
(!(line->args[0] & TMCRF_FRONTONLY) || side == 0)
)
{
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_DEATHPIT);

View file

@ -484,6 +484,16 @@ typedef enum
TMB_MODULATE = 4,
} textmapblendmodes_t;
typedef enum
{
TMCFF_FLIP = 1,
} textmapcrossfinishflags_t;
typedef enum
{
TMCRF_FRONTONLY = 1,
} textmapcrossrespawnflags_t;
// GETSECSPECIAL (specialval, section)
//
// Pulls out the special # from a particular section.