Add HITOWNER flag, when set, allows a projectile to collide with its shooter.

This commit is contained in:
Marisa Kirisame 2018-08-17 19:03:50 +02:00 committed by Christoph Oelckers
parent 02926a5567
commit 155afebb65
3 changed files with 4 additions and 2 deletions

View file

@ -403,6 +403,7 @@ enum ActorFlag8
MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector
MF8_BLOCKASPLAYER = 0x00000004, // actor is blocked by player-blocking lines even if not a player
MF8_DONTFACETALKER = 0x00000008, // don't alter the angle to face the player in conversations
MF8_HITOWNER = 0x00000010, // projectile can hit the actor that fired it
};
// --- mobj.renderflags ---

View file

@ -1554,8 +1554,8 @@ bool PIT_CheckThing(FMultiBlockThingsIterator &it, FMultiBlockThingsIterator::Ch
if (tm.thing->target != NULL)
{
if (thing == tm.thing->target)
{ // Don't missile self
if (thing == tm.thing->target && !(tm.thing->flags8 & MF8_HITOWNER))
{ // Don't missile self -- [MK] unless explicitly allowed
return true;
}

View file

@ -318,6 +318,7 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(MF8, FRIGHTENING, AActor, flags8),
DEFINE_FLAG(MF8, BLOCKASPLAYER, AActor, flags8),
DEFINE_FLAG(MF8, DONTFACETALKER, AActor, flags8),
DEFINE_FLAG(MF8, HITOWNER, AActor, flags8),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),