diff --git a/src/actor.h b/src/actor.h index 74516301af..d9d1dbcfe4 100644 --- a/src/actor.h +++ b/src/actor.h @@ -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 --- diff --git a/src/p_map.cpp b/src/p_map.cpp index 73b17e7d15..943852526f 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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. diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 24b0200f90..f82b453741 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -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