- added Xaser's SXF_USEBLOODCOLOR for A_SpawnItemEx submission

SVN r4181 (trunk)
This commit is contained in:
Christoph Oelckers 2013-03-13 11:27:30 +00:00
parent 8410ac760a
commit b0203c9f1d
2 changed files with 14 additions and 2 deletions

View file

@ -68,6 +68,7 @@
#include "g_shared/a_specialspot.h"
#include "actorptrselect.h"
#include "m_bbox.h"
#include "r_data/r_translate.h"
static FRandom pr_camissile ("CustomActorfire");
@ -1729,6 +1730,7 @@ enum SIX_Flags
SIXF_TRANSFERAMBUSHFLAG=256,
SIXF_TRANSFERPITCH=512,
SIXF_TRANSFERPOINTERS=1024,
SIXF_USEBLOODCOLOR=2048,
};
@ -1738,9 +1740,18 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
{
AActor * originator = self;
if ((flags & SIXF_TRANSFERTRANSLATION) && !(mo->flags2 & MF2_DONTTRANSLATE))
if (!(mo->flags2 & MF2_DONTTRANSLATE))
{
mo->Translation = self->Translation;
if (flags & SIXF_TRANSFERTRANSLATION)
{
mo->Translation = self->Translation;
}
else if (flags & SIXF_USEBLOODCOLOR)
{
// [XA] Use the spawning actor's BloodColor to translate the newly-spawned object.
PalEntry bloodcolor = self->GetBloodColor();
mo->Translation = TRANSLATION(TRANSLATION_Blood, bloodcolor.a);
}
}
if (flags & SIXF_TRANSFERPOINTERS)
{

View file

@ -53,6 +53,7 @@ const int SXF_CLIENTSIDE=128; // only used by Skulltag
const int SXF_TRANSFERAMBUSHFLAG=256;
const int SXF_TRANSFERPITCH=512;
const int SXF_TRANSFERPOINTERS=1024;
const int SXF_USEBLOODCOLOR=2048;
// Flags for A_Chase
const int CHF_FASTCHASE = 1;