mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 08:31:14 +00:00
- added Xaser's SXF_USEBLOODCOLOR for A_SpawnItemEx submission
SVN r4181 (trunk)
This commit is contained in:
parent
8410ac760a
commit
b0203c9f1d
2 changed files with 14 additions and 2 deletions
|
@ -68,6 +68,7 @@
|
||||||
#include "g_shared/a_specialspot.h"
|
#include "g_shared/a_specialspot.h"
|
||||||
#include "actorptrselect.h"
|
#include "actorptrselect.h"
|
||||||
#include "m_bbox.h"
|
#include "m_bbox.h"
|
||||||
|
#include "r_data/r_translate.h"
|
||||||
|
|
||||||
|
|
||||||
static FRandom pr_camissile ("CustomActorfire");
|
static FRandom pr_camissile ("CustomActorfire");
|
||||||
|
@ -1729,6 +1730,7 @@ enum SIX_Flags
|
||||||
SIXF_TRANSFERAMBUSHFLAG=256,
|
SIXF_TRANSFERAMBUSHFLAG=256,
|
||||||
SIXF_TRANSFERPITCH=512,
|
SIXF_TRANSFERPITCH=512,
|
||||||
SIXF_TRANSFERPOINTERS=1024,
|
SIXF_TRANSFERPOINTERS=1024,
|
||||||
|
SIXF_USEBLOODCOLOR=2048,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1738,10 +1740,19 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
|
||||||
{
|
{
|
||||||
AActor * originator = self;
|
AActor * originator = self;
|
||||||
|
|
||||||
if ((flags & SIXF_TRANSFERTRANSLATION) && !(mo->flags2 & MF2_DONTTRANSLATE))
|
if (!(mo->flags2 & MF2_DONTTRANSLATE))
|
||||||
|
{
|
||||||
|
if (flags & SIXF_TRANSFERTRANSLATION)
|
||||||
{
|
{
|
||||||
mo->Translation = self->Translation;
|
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)
|
if (flags & SIXF_TRANSFERPOINTERS)
|
||||||
{
|
{
|
||||||
mo->target = self->target;
|
mo->target = self->target;
|
||||||
|
|
|
@ -53,6 +53,7 @@ const int SXF_CLIENTSIDE=128; // only used by Skulltag
|
||||||
const int SXF_TRANSFERAMBUSHFLAG=256;
|
const int SXF_TRANSFERAMBUSHFLAG=256;
|
||||||
const int SXF_TRANSFERPITCH=512;
|
const int SXF_TRANSFERPITCH=512;
|
||||||
const int SXF_TRANSFERPOINTERS=1024;
|
const int SXF_TRANSFERPOINTERS=1024;
|
||||||
|
const int SXF_USEBLOODCOLOR=2048;
|
||||||
|
|
||||||
// Flags for A_Chase
|
// Flags for A_Chase
|
||||||
const int CHF_FASTCHASE = 1;
|
const int CHF_FASTCHASE = 1;
|
||||||
|
|
Loading…
Reference in a new issue