- added DavidPH's DOHARMSPECIES submission.

SVN r3236 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-13 10:43:07 +00:00
parent 44921297d3
commit e4455c293f
3 changed files with 3 additions and 1 deletions

View file

@ -329,6 +329,7 @@ enum
MF6_SEEINVISIBLE = 0x01000000, // Monsters can see invisible player.
MF6_DONTCORPSE = 0x02000000, // [RC] Don't autoset MF_CORPSE upon death and don't force Crash state change.
MF6_POISONALWAYS = 0x04000000, // Always apply poison, even when target can't take the damage.
MF6_DOHARMSPECIES = 0x08000000, // Do hurt one's own species with projectiles.
// --- mobj.renderflags ---

View file

@ -1074,7 +1074,7 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
// [RH] Don't hurt monsters that hate the same thing as you do
return false;
}
if (thing->GetSpecies() == tm.thing->target->GetSpecies())
if (thing->GetSpecies() == tm.thing->target->GetSpecies() && !(thing->flags6 & MF6_DOHARMSPECIES))
{
// Don't hurt same species or any relative -
// but only if the target isn't one's hostile.

View file

@ -231,6 +231,7 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF6, NOMENU, AActor, flags6),
DEFINE_FLAG(MF6, SEEINVISIBLE, AActor, flags6),
DEFINE_FLAG(MF6, DONTCORPSE, AActor, flags6),
DEFINE_FLAG(MF6, DOHARMSPECIES, AActor, flags6),
DEFINE_FLAG(MF6, POISONALWAYS, AActor, flags6),
// Effect flags