From 58d0d2d5e9c208108010a80414845c0ea47a5241 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 4 Jun 2016 19:39:15 +0100 Subject: [PATCH] Completely forgot P_FindSpecialLineFromTag was a thing. Now Linedef type 14 doesn't need to be in the same sector, but requires a tag... --- src/p_floor.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/p_floor.c b/src/p_floor.c index 18126f263..d86b567df 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2890,18 +2890,18 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover) #define controlsec rover->master->frontsector - for (i = 0; i < controlsec->linecount; i++) + if (controlsec->tag != 0) { - if (controlsec->lines[i]->special == 14) // If we can use bustable block parameters, we will. + size_t tagline = P_FindSpecialLineFromTag(14, controlsec->tag, -1); + if (tagline != -1) { - if (sides[controlsec->lines[i]->sidenum[0]].toptexture) - type = (mobjtype_t)sides[controlsec->lines[i]->sidenum[0]].toptexture; // Set as object type in p_setup.c... - if (sides[controlsec->lines[i]->sidenum[0]].textureoffset) - spacing = sides[controlsec->lines[i]->sidenum[0]].textureoffset; - if (sides[controlsec->lines[i]->sidenum[0]].rowoffset) - lifetime = (sides[controlsec->lines[i]->sidenum[0]].rowoffset>>FRACBITS); - flags = controlsec->lines[i]->flags; - break; // If someone has multiple parameter linedefs per control sector, TOUGH. + if (sides[lines[tagline].sidenum[0]].toptexture) + type = (mobjtype_t)sides[lines[tagline].sidenum[0]].toptexture; // Set as object type in p_setup.c... + if (sides[lines[tagline].sidenum[0]].textureoffset) + spacing = sides[lines[tagline].sidenum[0]].textureoffset; + if (sides[lines[tagline].sidenum[0]].rowoffset) + lifetime = (sides[lines[tagline].sidenum[0]].rowoffset>>FRACBITS); + flags = lines[tagline].flags; } }