fixed some issues with feature flags.

This commit is contained in:
Christoph Oelckers 2023-10-13 21:14:49 +02:00
parent 3e17a9cc88
commit dc02d9edbc
3 changed files with 7 additions and 4 deletions

View file

@ -925,7 +925,7 @@ static void actInitDudes()
act->vel.Zero();
if ((currentLevel->featureflags & kFeatureEnemyAttacks) && act->xspr.sysData2 > 0)
if ((currentLevel->featureflags & kFeatureCustomEnemyHealth) && act->xspr.sysData2 > 0)
act->xspr.health = clamp(act->xspr.sysData2 << 4, 1, 65535);
else
act->xspr.health = pDudeInfo->startHealth << 4;

View file

@ -285,9 +285,11 @@ void Respawn(DBloodActor* actor) // 9
int nType = actor->GetType() - kDudeBase;
actor->spr.pos = actor->basePoint;
actor->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
if ((currentLevel->featureflags & kFeatureCustomEnemyHealth) && actor->xspr.sysData2 > 0)
actor->xspr.health = clamp(actor->xspr.sysData2 << 4, 1, 65535);
else
actor->xspr.health = getDudeInfo(actor)->startHealth << 4;
#ifdef NOONE_EXTENSIONS
if (!gModernMap || actor->xspr.sysData2 <= 0) actor->xspr.health = dudeInfo[actor->GetType() - kDudeBase].startHealth << 4;
else actor->xspr.health = ClipRange(actor->xspr.sysData2 << 4, 1, 65535);
switch (actor->GetType()) {
default:
@ -307,7 +309,6 @@ void Respawn(DBloodActor* actor) // 9
}
#else
actor->clipdist = getDudeInfo(nType + kDudeBase)->fClipdist();
actor->xspr.health = getDudeInfo(nType + kDudeBase)->startHealth << 4;
if (getSequence(getDudeInfo(nType + kDudeBase)->seqStartID))
seqSpawn(getDudeInfo(nType + kDudeBase)->seqStartID, actor);
#endif

View file

@ -53,7 +53,9 @@ enum VIEW_EFFECT {
kViewEffectFlag,
kViewEffectBigFlag,
kViewEffectAtom,
#ifdef NOONE_EXTENSIONS
kViewEffectSpotProgress,
#endif
};
enum VIEWPOS {