make TrapExploder feature controlled by a flag.

This part of nnext can be retained easily this way.
This commit is contained in:
Christoph Oelckers 2023-10-08 17:15:26 +02:00
parent 2480f27eb4
commit 603ab5dd73
2 changed files with 2 additions and 3 deletions

View file

@ -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);

View file

@ -281,6 +281,7 @@ enum EFeatureFlags
kFeatureCustomAmmoCount = 1,
kFeatureEnemyAttacks = 2,
kFeatureCustomClipdist = 4,
kFeatureCustomTrapExploder = 8,
};
constexpr int BMAX_PATH = 260;