From 76e944053b07ff6d73d34fa308be596c2319af65 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 18 Dec 2021 15:23:11 +0100 Subject: [PATCH] - the (few) numeric flag literals in SW handled. Virtually all of this was portal hackery. --- source/games/sw/src/break.cpp | 6 +++--- source/games/sw/src/jsector.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index 8795b9242..4dca63f85 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -643,9 +643,9 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, int ang, int typ bool UserBreakWall(WALLp wp) { int match = wp->hitag; - int block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN; - int type_flags = CSTAT_WALL_TRANSLUCENT|CSTAT_WALL_MASKED|CSTAT_WALL_1WAY; - int flags = block_flags|type_flags; + const auto block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN; + const auto type_flags = CSTAT_WALL_TRANSLUCENT|CSTAT_WALL_MASKED|CSTAT_WALL_1WAY; + const auto flags = block_flags|type_flags; bool ret = false; auto actor = FindBreakSpriteMatch(match); diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 76854140f..e7e7184de 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -281,7 +281,7 @@ void JS_InitMirrors(void) for(auto& wal : walls()) { - if (wal.twoSided() && (wal.overpicnum == MIRROR) && (wal.cstat & 32)) + if (wal.twoSided() && (wal.overpicnum == MIRROR) && (wal.cstat & CSTAT_WALL_1WAY)) { auto sec = wal.nextSector(); if ((sec->floorstat & CSTAT_SECTOR_SKY) == 0)