- simplified SW's mirror setup a bit to take advantage of Raze's in-engine mirror handling.

We only need one label texture and no special treatment of the backsector.
This commit is contained in:
Christoph Oelckers 2022-12-09 10:14:28 +01:00
parent 9d62951cf3
commit 4ea252c227
4 changed files with 5 additions and 7 deletions

View file

@ -1138,7 +1138,7 @@ void UpdateWallPortalState()
continue;
}
walltype* wal = mirror[i].mirrorWall;
if (wal->wallpicnum != MIRRORLABEL + i)
if (wal->wallpicnum != MIRRORLABEL)
{
wal->portalflags = 0;
continue;

View file

@ -234,9 +234,9 @@ enum
void GameInterface::SetupSpecialTextures(TilesetBuildInfo& info)
{
info.Delete(MIRROR); // mirror
info.Delete(MIRRORLABEL);
for (int i = 0; i < MAXMIRRORS; i++)
{
info.Delete(i + MIRRORLABEL);
info.MakeCanvas(CAMSPRITE + i, 128, 114);
}
// make these two unique, they are empty by default.

View file

@ -283,10 +283,8 @@ void JS_InitMirrors(void)
continue;
}
wal.overpicnum = MIRRORLABEL + mirrorcnt;
wal.wallpicnum = MIRRORLABEL + mirrorcnt;
sec->ceilingpicnum = MIRRORLABEL + mirrorcnt;
sec->floorpicnum = MIRRORLABEL + mirrorcnt;
wal.overpicnum = MIRRORLABEL;
wal.wallpicnum = MIRRORLABEL;
sec->floorstat |= CSTAT_SECTOR_SKY;
mirror[mirrorcnt].mirrorWall = &wal;
mirror[mirrorcnt].mirrorSector = sec;

View file

@ -2059,7 +2059,7 @@ void CallbackSOsink(ANIM* ap, void *data)
ASSERT(destsect != nullptr);
destsect->floorpicnum = srcsect->floorpicnum;
destsect->setfloortexture(srcsect->floortexture());
destsect->floorshade = srcsect->floorshade;
destsect->floorstat &= ~(CSTAT_SECTOR_ALIGN);