From 6fb56cc9407e03d5cf7dbb5b55e200297a10a017 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 10 Oct 2022 09:12:41 -0400 Subject: [PATCH] Finish line + respawn line use args --- src/p_setup.c | 8 ++++++++ src/p_spec.c | 6 +++--- src/p_spec.h | 10 ++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index cbd5a9979..be1276a42 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -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; } diff --git a/src/p_spec.c b/src/p_spec.c index 0fe83adea..8e525dcab 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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); diff --git a/src/p_spec.h b/src/p_spec.h index c07a65b71..e3cae0bfe 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -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.