use a feature flag for the enemy attacks in 3 callback functions.

This is simple enough to handle without gModernMap
This commit is contained in:
Christoph Oelckers 2023-10-04 22:05:26 +02:00
parent 11caee7477
commit 40ca77c6b5
4 changed files with 6 additions and 3 deletions

View file

@ -160,7 +160,8 @@ void BlastSSeqCallback(int, DBloodActor* actor)
}
}
// allow to fire missile in non-player targets
if (target->IsPlayerActor() || gModernMap) {
if (target->IsPlayerActor() || currentLevel->featureflags & kFeatureEnemyAttacks)
{
actFireMissile(actor, -7.5, 0, Aim, kMissileArcGargoyle);
actFireMissile(actor, 7.5, 0, Aim, kMissileArcGargoyle);
}

View file

@ -147,7 +147,8 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
}
}
// allow fire missile in non-player targets if not a demo
if (target->IsPlayerActor() || gModernMap) {
if (target->IsPlayerActor() || currentLevel->featureflags & kFeatureEnemyAttacks)
{
sfxPlay3DSound(actor, 489, 0, 0);
actFireMissile(actor, 0, 0, Aim, kMissileEctoSkull);
}

View file

@ -52,7 +52,7 @@ void houndBiteSeqCallback(int, DBloodActor* actor)
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
DVector3 vec(actor->spr.Angles.Yaw.ToVector() * 64, target->spr.pos.Z - actor->spr.pos.Z);
if (target->IsPlayerActor() || gModernMap) // allow to hit non-player targets
if (target->IsPlayerActor() || currentLevel->featureflags & kFeatureEnemyAttacks)
actFireVector(actor, 0, 0, vec, kVectorHoundBite);
}

View file

@ -62,6 +62,7 @@ BEGIN_BLD_NS
enum EFeatureFlags
{
kFeatureCustomAmmoCount = 1,
kFeatureEnemyAttacks = 2,
};
constexpr int BMAX_PATH = 260;