From e4455c293f4283f8a322d996f4d0ee4688238050 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 13 Jun 2011 10:43:07 +0000 Subject: [PATCH] - added DavidPH's DOHARMSPECIES submission. SVN r3236 (trunk) --- src/actor.h | 1 + src/p_map.cpp | 2 +- src/thingdef/thingdef_data.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actor.h b/src/actor.h index 74516301a..d9d1dbcfe 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 73b17e7d1..943852526 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 24b0200f9..f82b45374 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