From fcf1d56b1a239700920cd90f3bd431beed03583b Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 9 Aug 2015 14:06:22 -0500 Subject: [PATCH] - Added SXF_IS. - The spawned actor becomes the calling actor's specified pointers respectively. --- src/thingdef/thingdef_codeptr.cpp | 15 +++++++++++++++ wadsrc/static/actors/constants.txt | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 2ba5fa01a..69dd89cd0 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1857,6 +1857,9 @@ enum SIX_Flags SIXF_ORIGINATOR = 0x00800000, SIXF_TRANSFERSPRITEFRAME = 0x01000000, SIXF_TRANSFERROLL = 0x02000000, + SIXF_ISTARGET = 0x04000000, + SIXF_ISMASTER = 0x08000000, + SIXF_ISTRACER = 0x10000000, }; static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) @@ -2014,6 +2017,18 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) mo->roll = self->roll; } + if (flags & SIXF_ISTARGET) + { + self->target = mo; + } + if (flags & SIXF_ISMASTER) + { + self->master = mo; + } + if (flags & SIXF_ISTRACER) + { + self->tracer = mo; + } return true; } diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 1ee6c96c9..96877a266 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -74,6 +74,9 @@ const int SXF_NOPOINTERS = 1 << 22; const int SXF_ORIGINATOR = 1 << 23; const int SXF_TRANSFERSPRITEFRAME = 1 << 24; const int SXF_TRANSFERROLL = 1 << 25; +const int SXF_ISTARGET = 1 << 26, +const int SXF_ISMASTER = 1 << 27, +const int SXF_ISTRACER = 1 << 28, // Flags for A_Chase const int CHF_FASTCHASE = 1;