0
0
Fork 0
mirror of https://github.com/ZDoom/qzdoom.git synced 2025-02-25 21:31:09 +00:00

- Added SXF_ORIGINATOR.

- Only useful for missiles.

By default, missiles cannot set themselves as the master when spawning
actors.
This commit is contained in:
MajorCooke 2014-10-11 16:15:42 -05:00
parent 47029a3efc
commit f766a1ab38
2 changed files with 406 additions and 402 deletions
src/thingdef
wadsrc/static/actors

View file

@ -1768,6 +1768,7 @@ enum SIX_Flags
SIXF_SETTARGET = 1 << 20, SIXF_SETTARGET = 1 << 20,
SIXF_SETTRACER = 1 << 21, SIXF_SETTRACER = 1 << 21,
SIXF_NOPOINTERS = 1 << 22, SIXF_NOPOINTERS = 1 << 22,
SIXF_ORIGINATOR = 1 << 23,
}; };
static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
@ -1803,11 +1804,13 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
{ {
mo->pitch = self->pitch; mo->pitch = self->pitch;
} }
if (!(flags & SIXF_ORIGINATOR))
{
while (originator && originator->isMissile()) while (originator && originator->isMissile())
{ {
originator = originator->target; originator = originator->target;
} }
}
if (flags & SIXF_TELEFRAG) if (flags & SIXF_TELEFRAG)
{ {
P_TeleportMove(mo, mo->x, mo->y, mo->z, true); P_TeleportMove(mo, mo->x, mo->y, mo->z, true);

View file

@ -70,6 +70,7 @@ const int SXF_TRANSFERRENDERSTYLE = 1 << 19;
const int SXF_SETTARGET = 1 << 20; const int SXF_SETTARGET = 1 << 20;
const int SXF_SETTRACER = 1 << 21; const int SXF_SETTRACER = 1 << 21;
const int SXF_NOPOINTERS = 1 << 22; const int SXF_NOPOINTERS = 1 << 22;
const int SXF_ORIGINATOR = 1 << 23;
// Flags for A_Chase // Flags for A_Chase
const int CHF_FASTCHASE = 1; const int CHF_FASTCHASE = 1;
@ -388,7 +389,7 @@ enum
RMVF_MISSILES = 1 << 0, RMVF_MISSILES = 1 << 0,
RMVF_NOMONSTERS = 1 << 1, RMVF_NOMONSTERS = 1 << 1,
RMVF_MISC = 1 << 2, RMVF_MISC = 1 << 2,
RMVF_EVERYTHING = 1 << 3 RMVF_EVERYTHING = 1 << 3,
}; };