From 8e2212bb48fe91b7899c1e3c70b0f9c1937ef07b Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 6 Jun 2016 19:02:08 +0100 Subject: [PATCH] One more Mario block change. If FOF linedef has backside: * If there's items in it set the FOF's floor and ceiling flats to that of the backside sector's ceiling * Otherwise, set them to that of the backside sector's floor. Otherwise, the flats do not change. This allows for SMW style blocks which are much darker when empty then full on all sides. --- src/p_floor.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/p_floor.c b/src/p_floor.c index 0e7f52376..4ddba60bc 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -1802,9 +1802,21 @@ void T_MarioBlockChecker(levelspecthink_t *block) return; line_t *masterline = block->sourceline; if (SearchMarioNode(block->sector->touching_thinglist)) - sides[masterline->sidenum[0]].midtexture = sides[masterline->sidenum[0]].bottomtexture; + { + sides[masterline->sidenum[0]].midtexture = sides[masterline->sidenum[0]].bottomtexture; // Update textures + if (masterline->sidenum[1]) + { + sides[masterline->sidenum[0]].sector->ceilingpic = sides[masterline->sidenum[0]].sector->floorpic = sides[masterline->sidenum[1]].sector->ceilingpic; // Update flats to be backside's ceiling if there's a back sector, otherwise leave them alone + } + } else + { sides[masterline->sidenum[0]].midtexture = sides[masterline->sidenum[0]].toptexture; + if (masterline->sidenum[1]) + { + sides[masterline->sidenum[0]].sector->ceilingpic = sides[masterline->sidenum[0]].sector->floorpic = sides[masterline->sidenum[1]].sector->floorpic; // Update flats to be backside's floor if there's a back sector, otherwise leave them alone + } + } } // This is the Thwomp's 'brain'. It looks around for players nearby, and if