From 99f55e8b8f91037193dfd42e78154cde68a6be7a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 12 May 2008 22:52:13 +0000 Subject: [PATCH] - Added Skulltag's PUFFGETSOWNER flag. SVN r967 (trunk) --- docs/rh-log.txt | 1 + src/actor.h | 1 + src/p_map.cpp | 3 +++ src/thingdef/thingdef_properties.cpp | 2 ++ 4 files changed, 7 insertions(+) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 851c14c26..b1b9c03f6 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ May 12, 2008 (Changes by Graf Zahl) +- Added Skulltag's PUFFGETSOWNER flag. - Fixed: Parsing sector special bit masks must be done backwards so that later definitions take precedence. - Added base translation tables for UDMF compatibility maps which only should diff --git a/src/actor.h b/src/actor.h index 91bd90d45..064a3c3ae 100644 --- a/src/actor.h +++ b/src/actor.h @@ -300,6 +300,7 @@ enum MF5_NOINFIGHTING = 0x00100000, // This actor doesn't switch target when it's hurt MF5_NOINTERACTION = 0x00200000, // Thing is completely excluded from any gameplay related checks MF5_NOTIMEFREEZE = 0x00400000, // Actor is not affected by time freezer + MF5_PUFFGETSOWNER = 0x00800000, // [BB] Sets the owner of the puff to the player who fired it // --- mobj.renderflags --- diff --git a/src/p_map.cpp b/src/p_map.cpp index bdb2e89e5..acb7534d4 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2769,6 +2769,9 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, puff->Destroy(); puff = NULL; } + // [BB] If the puff came from a player, set the target of the puff to this player. + if ( puff && (puff->flags5 & MF5_PUFFGETSOWNER) && t1 && t1->player ) + puff->target = t1; return puff; } diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 17f119820..f3c5c2fc7 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -240,6 +240,7 @@ static flagdef ActorFlags[]= DEFINE_FLAG(MF5, NOINFIGHTING, AActor, flags5), DEFINE_FLAG(MF5, NOINTERACTION, AActor, flags5), DEFINE_FLAG(MF5, NOTIMEFREEZE, AActor, flags5), + DEFINE_FLAG(MF5, PUFFGETSOWNER, AActor, flags5), // [BB] added PUFFGETSOWNER // Effect flags DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), @@ -255,6 +256,7 @@ static flagdef ActorFlags[]= DEFINE_DEPRECATED_FLAG(LOWGRAVITY), DEFINE_DEPRECATED_FLAG(SHORTMISSILERANGE), DEFINE_DEPRECATED_FLAG(LONGMELEERANGE), + DEFINE_DUMMY_FLAG(NONETID), }; static flagdef InventoryFlags[] =