mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-21 08:01:03 +00:00
made 'modern' custom monster health an engine feature.
This commit is contained in:
parent
7a7d579b8e
commit
7b3203c607
2 changed files with 5 additions and 8 deletions
|
@ -1506,14 +1506,10 @@ static void actInitDudes()
|
|||
|
||||
act->vel.Zero();
|
||||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
// add a way to set custom hp for every enemy - should work only if map just started and not loaded.
|
||||
if (!gModernMap || act->xspr.sysData2 <= 0) act->xspr.health = pDudeInfo->startHealth << 4;
|
||||
else act->xspr.health = ClipRange(act->xspr.sysData2 << 4, 1, 65535);
|
||||
#else
|
||||
act->xspr.health = pDudeInfo->startHealth << 4;
|
||||
#endif
|
||||
|
||||
if ((currentLevel->featureflags & kFeatureEnemyAttacks) && act->xspr.sysData2 > 0)
|
||||
act->xspr.health = clamp(act->xspr.sysData2 << 4, 1, 65535);
|
||||
else
|
||||
act->xspr.health = pDudeInfo->startHealth << 4;
|
||||
}
|
||||
|
||||
if (getSequence(seqStartId)) seqSpawn(seqStartId, act);
|
||||
|
|
|
@ -282,6 +282,7 @@ enum EFeatureFlags
|
|||
kFeatureEnemyAttacks = 2,
|
||||
kFeatureCustomClipdist = 4,
|
||||
kFeatureCustomTrapExploder = 8,
|
||||
kFeatureCustomEnemyHealth = 16,
|
||||
};
|
||||
|
||||
constexpr int BMAX_PATH = 260;
|
||||
|
|
Loading…
Reference in a new issue