From 603ab5dd73a8b5428b57e81737df308a6e5df05b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers <coelckers@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:15:26 +0200 Subject: [PATCH] make TrapExploder feature controlled by a flag. This part of nnext can be retained easily this way. --- source/games/blood/src/actor.cpp | 4 +--- source/games/blood/src/blood.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index b18760a5c..eaaf452b6 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -4129,9 +4129,8 @@ void actExplodeSprite(DBloodActor* actor) int nSnd = 304; int nSeq = 4; -#ifdef NOONE_EXTENSIONS // allow to customize hidden exploder trap - if (gModernMap) + if (currentLevel->featureflags & kFeatureCustomTrapExploder) { nType = actor->xspr.data1; // Explosion type int tSeq = actor->xspr.data2; // SEQ id @@ -4149,7 +4148,6 @@ void actExplodeSprite(DBloodActor* actor) if (tSeq > 0) nSeq = tSeq; if (tSnd > 0) nSnd = tSnd; } -#endif if (getSequence(nSeq)) seqSpawn(nSeq, actor); sfxPlay3DSound(actor, nSnd, -1, 0); diff --git a/source/games/blood/src/blood.h b/source/games/blood/src/blood.h index c87322914..cb9f9bbb0 100644 --- a/source/games/blood/src/blood.h +++ b/source/games/blood/src/blood.h @@ -281,6 +281,7 @@ enum EFeatureFlags kFeatureCustomAmmoCount = 1, kFeatureEnemyAttacks = 2, kFeatureCustomClipdist = 4, + kFeatureCustomTrapExploder = 8, }; constexpr int BMAX_PATH = 260;