- added PERSISTENTPOWER and TRANSFERPOINTERS submissions by Gez.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@343 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2009-06-07 20:15:36 +00:00
parent 0f42c39184
commit 63e67d4a29
6 changed files with 14 additions and 2 deletions

View file

@ -1317,6 +1317,7 @@ enum SIX_Flags
// 128 is used by Skulltag!
SIXF_TRANSFERAMBUSHFLAG=256,
SIXF_TRANSFERPITCH=512,
SIXF_TRANSFERPOINTERS=1024,
};
@ -1330,6 +1331,12 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
{
mo->Translation = self->Translation;
}
if (flags & SIXF_TRANSFERPOINTERS)
{
mo->target = self->target;
mo->master = self->master; // This will be overridden later if SIXF_SETMASTER is set
mo->tracer = self->tracer;
}
mo->angle=self->angle;
if (flags & SIXF_TRANSFERPITCH) mo->pitch = self->pitch;
@ -1378,7 +1385,7 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
}
}
}
else
else if (!(flags & SIXF_TRANSFERPOINTERS))
{
// If this is a missile or something else set the target to the originator
mo->target=originator? originator : self;