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.
This commit is contained in:
toasterbabe 2016-06-06 19:02:08 +01:00
parent 356dd03234
commit 8e2212bb48

View file

@ -1802,9 +1802,21 @@ void T_MarioBlockChecker(levelspecthink_t *block)
return; return;
line_t *masterline = block->sourceline; line_t *masterline = block->sourceline;
if (SearchMarioNode(block->sector->touching_thinglist)) 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 else
{
sides[masterline->sidenum[0]].midtexture = sides[masterline->sidenum[0]].toptexture; 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 // This is the Thwomp's 'brain'. It looks around for players nearby, and if