mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- added HARMFRIENDS flag.
This commit is contained in:
parent
b6f4862024
commit
5ac7e4fc38
3 changed files with 19 additions and 14 deletions
|
@ -341,6 +341,7 @@ enum
|
||||||
MF7_ALWAYSTELEFRAG = 0x00000004, // will unconditionally be telefragged when in the way. Overrides all other settings.
|
MF7_ALWAYSTELEFRAG = 0x00000004, // will unconditionally be telefragged when in the way. Overrides all other settings.
|
||||||
MF7_HANDLENODELAY = 0x00000008, // respect NoDelay state flag
|
MF7_HANDLENODELAY = 0x00000008, // respect NoDelay state flag
|
||||||
MF7_WEAPONSPAWN = 0x00000010, // subject to DF_NO_COOP_WEAPON_SPAWN dmflag
|
MF7_WEAPONSPAWN = 0x00000010, // subject to DF_NO_COOP_WEAPON_SPAWN dmflag
|
||||||
|
MF7_HARMFRIENDS = 0x00000020, // is allowed to harm friendly monsters.
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
||||||
|
|
|
@ -1111,9 +1111,11 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
||||||
// cases where they are clearly supposed to do that
|
// cases where they are clearly supposed to do that
|
||||||
if (thing->IsFriend(tm.thing->target))
|
if (thing->IsFriend(tm.thing->target))
|
||||||
{
|
{
|
||||||
// Friends never harm each other
|
// Friends never harm each other, unless the shooter has the HARMFRIENDS set.
|
||||||
return false;
|
if (!(thing->flags7 & MF7_HARMFRIENDS)) return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (thing->TIDtoHate != 0 && thing->TIDtoHate == tm.thing->target->TIDtoHate)
|
if (thing->TIDtoHate != 0 && thing->TIDtoHate == tm.thing->target->TIDtoHate)
|
||||||
{
|
{
|
||||||
// [RH] Don't hurt monsters that hate the same thing as you do
|
// [RH] Don't hurt monsters that hate the same thing as you do
|
||||||
|
@ -1133,6 +1135,7 @@ bool PIT_CheckThing(AActor *thing, FCheckPosition &tm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// else if (infight==1) any shot hurts anything - no further tests
|
// else if (infight==1) any shot hurts anything - no further tests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,6 +241,7 @@ static FFlagDef ActorFlags[]=
|
||||||
DEFINE_FLAG(MF7, NOTELESTOMP, AActor, flags7),
|
DEFINE_FLAG(MF7, NOTELESTOMP, AActor, flags7),
|
||||||
DEFINE_FLAG(MF7, ALWAYSTELEFRAG, AActor, flags7),
|
DEFINE_FLAG(MF7, ALWAYSTELEFRAG, AActor, flags7),
|
||||||
DEFINE_FLAG(MF7, WEAPONSPAWN, AActor, flags7),
|
DEFINE_FLAG(MF7, WEAPONSPAWN, AActor, flags7),
|
||||||
|
DEFINE_FLAG(MF7, HARMFRIENDS, AActor, flags7),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
|
Loading…
Reference in a new issue