mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-30 07:31:12 +00:00
- added a FORCEINFIGHTING flag.
This commit is contained in:
parent
92b916fd5d
commit
0cc46a2aaf
4 changed files with 5 additions and 1 deletions
|
@ -389,6 +389,7 @@ enum ActorFlag7
|
|||
MF7_NOSHIELDREFLECT = 0x08000000, // will not be reflected by shields.
|
||||
MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen.
|
||||
MF7_NOINFIGHTSPECIES = 0x20000000, // don't start infights with one's own species.
|
||||
MF7_FORCEINFIGHTING = 0x40000000, // overrides a map setting of 'no infighting'.
|
||||
};
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
|
|
@ -1772,7 +1772,8 @@ bool AActor::OkayToSwitchTarget (AActor *other)
|
|||
}
|
||||
|
||||
int infight;
|
||||
if (flags5 & MF5_NOINFIGHTING) infight=-1;
|
||||
if (flags7 & MF7_FORCEINFIGHTING) infight = 1;
|
||||
else if (flags5 & MF5_NOINFIGHTING) infight = -1;
|
||||
else infight = G_SkillProperty(SKILLP_Infight);
|
||||
|
||||
if (infight < 0 && other->player == NULL && !IsHostile (other))
|
||||
|
|
|
@ -1177,6 +1177,7 @@ static bool CanAttackHurt(AActor *victim, AActor *shooter)
|
|||
if (!victim->player && !shooter->player)
|
||||
{
|
||||
int infight = G_SkillProperty(SKILLP_Infight);
|
||||
if (infight < 0 && (victim->flags7 & MF7_FORCEINFIGHTING)) infight = 0; // This must override the 'no infight' setting to take effect.
|
||||
|
||||
if (infight < 0)
|
||||
{
|
||||
|
|
|
@ -318,6 +318,7 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, NOINFIGHTSPECIES, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, FORCEINFIGHTING, AActor, flags7),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
|
Loading…
Reference in a new issue