From c54ea7f6b7efac877ddf3e6d4e3285831153b7b0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 23 Mar 2013 01:22:37 +0000 Subject: [PATCH] - Added SXF_TRANSFERSPECIAL and SXF_CLEARCALLERSPECIAL flags for A_SpawnItemEx. SVN r4199 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 12 ++++++++++++ wadsrc/static/actors/constants.txt | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index d201f41a6..2bbb796d8 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1736,6 +1736,8 @@ enum SIX_Flags SIXF_CLEARCALLERTID = 1 << 12, SIXF_MULTIPLYSPEED = 1 << 13, SIXF_TRANSFERSCALE = 1 << 14, + SIXF_TRANSFERSPECIAL = 1 << 15, + SIXF_CLEARCALLERSPECIAL = 1 << 16, }; static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) @@ -1838,6 +1840,16 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) self->RemoveFromHash(); self->tid = 0; } + if (flags & SIXF_TRANSFERSPECIAL) + { + mo->special = self->special; + memcpy(mo->args, self->args, sizeof(self->args)); + } + if (flags & SIXF_CLEARCALLERSPECIAL) + { + self->special = 0; + memset(self->args, 0, sizeof(self->args)); + } return true; } diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index db4e9abbe..b26fae9c7 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -57,6 +57,8 @@ const int SXF_USEBLOODCOLOR = 2048; const int SXF_CLEARCALLERTID = 4096; const int SXF_MULTIPLYSPEED = 8192; const int SXF_TRANSFERSCALE = 16384; +const int SXF_TRANSFERSPECIAL = 32768; +const int SXF_CLEARCALLERSPECIAL = 65536; // Flags for A_Chase const int CHF_FASTCHASE = 1;