diff --git a/src/p_map.c b/src/p_map.c index 631f41ac9..c1d3d27a6 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1554,8 +1554,7 @@ boolean P_IsLineBlocking(const line_t *ld, const mobj_t *thing) boolean P_IsLineTripWire(const line_t *ld) { - return (sides[ld->sidenum[0]].midtexture == - R_TextureNumForName("TRIPWIRE")); + return ld->tripwire; } // diff --git a/src/p_setup.c b/src/p_setup.c index 654eb6eb1..4acc53e42 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1044,6 +1044,8 @@ static void P_InitializeLinedef(line_t *ld) ld->validcount = 0; ld->polyobj = NULL; + ld->tripwire = false; + ld->text = NULL; ld->callcount = 0; @@ -1941,6 +1943,12 @@ static void P_ProcessLinedefsAfterSidedefs(void) ld->frontsector = sides[ld->sidenum[0]].sector; //e6y: Can't be -1 here ld->backsector = ld->sidenum[1] != 0xffff ? sides[ld->sidenum[1]].sector : 0; + if (sides[ld->sidenum[0]].midtexture == + R_TextureNumForName("TRIPWIRE")) + { + ld->tripwire = true; + } + switch (ld->special) { // Compile linedef 'text' from both sidedefs 'text' for appropriate specials. diff --git a/src/r_defs.h b/src/r_defs.h index 41b0cdaab..7decdfeab 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -420,6 +420,8 @@ typedef struct line_s size_t validcount; // if == validcount, already checked polyobj_t *polyobj; // Belongs to a polyobject? + boolean tripwire; + char *text; // a concatenation of all front and back texture names, for linedef specials that require a string. INT16 callcount; // no. of calls left before triggering, for the "X calls" linedef specials, defaults to 0 } line_t;