Merge branch 'transferspriteframe' of https://github.com/MajorCooke/zdoom

This commit is contained in:
Christoph Oelckers 2015-02-07 17:13:21 +01:00
commit 7c567979d9
3 changed files with 33 additions and 25 deletions

View file

@ -2803,7 +2803,7 @@ void A_Face (AActor *self, AActor *other, angle_t max_turn, angle_t max_pitch, a
target_z = other->z + (other->height / 2) + other->GetBobOffset(); target_z = other->z + (other->height / 2) + other->GetBobOffset();
if (flags & FAF_TOP) if (flags & FAF_TOP)
target_z = other->z + (other->height) + other->GetBobOffset(); target_z = other->z + (other->height) + other->GetBobOffset();
if (!flags & FAF_NODISTFACTOR) if (!(flags & FAF_NODISTFACTOR))
target_z += pitch_offset; target_z += pitch_offset;
double dist_z = target_z - source_z; double dist_z = target_z - source_z;

View file

@ -1850,30 +1850,31 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TakeFromSiblings)
enum SIX_Flags enum SIX_Flags
{ {
SIXF_TRANSFERTRANSLATION = 1 << 0, SIXF_TRANSFERTRANSLATION = 0x00000001,
SIXF_ABSOLUTEPOSITION = 1 << 1, SIXF_ABSOLUTEPOSITION = 0x00000002,
SIXF_ABSOLUTEANGLE = 1 << 2, SIXF_ABSOLUTEANGLE = 0x00000004,
SIXF_ABSOLUTEVELOCITY = 1 << 3, SIXF_ABSOLUTEVELOCITY = 0x00000008,
SIXF_SETMASTER = 1 << 4, SIXF_SETMASTER = 0x00000010,
SIXF_NOCHECKPOSITION = 1 << 5, SIXF_NOCHECKPOSITION = 0x00000020,
SIXF_TELEFRAG = 1 << 6, SIXF_TELEFRAG = 0x00000040,
SIXF_CLIENTSIDE = 1 << 7, // only used by Skulldronum SIXF_CLIENTSIDE = 0x00000080, // only used by Skulldronum
SIXF_TRANSFERAMBUSHFLAG = 1 << 8, SIXF_TRANSFERAMBUSHFLAG = 0x00000100,
SIXF_TRANSFERPITCH = 1 << 9, SIXF_TRANSFERPITCH = 0x00000200,
SIXF_TRANSFERPOINTERS = 1 << 10, SIXF_TRANSFERPOINTERS = 0x00000400,
SIXF_USEBLOODCOLOR = 1 << 11, SIXF_USEBLOODCOLOR = 0x00000800,
SIXF_CLEARCALLERTID = 1 << 12, SIXF_CLEARCALLERTID = 0x00001000,
SIXF_MULTIPLYSPEED = 1 << 13, SIXF_MULTIPLYSPEED = 0x00002000,
SIXF_TRANSFERSCALE = 1 << 14, SIXF_TRANSFERSCALE = 0x00004000,
SIXF_TRANSFERSPECIAL = 1 << 15, SIXF_TRANSFERSPECIAL = 0x00008000,
SIXF_CLEARCALLERSPECIAL = 1 << 16, SIXF_CLEARCALLERSPECIAL = 0x00010000,
SIXF_TRANSFERSTENCILCOL = 1 << 17, SIXF_TRANSFERSTENCILCOL = 0x00020000,
SIXF_TRANSFERALPHA = 1 << 18, SIXF_TRANSFERALPHA = 0x00040000,
SIXF_TRANSFERRENDERSTYLE = 1 << 19, SIXF_TRANSFERRENDERSTYLE = 0x00080000,
SIXF_SETTARGET = 1 << 20, SIXF_SETTARGET = 0x00100000,
SIXF_SETTRACER = 1 << 21, SIXF_SETTRACER = 0x00200000,
SIXF_NOPOINTERS = 1 << 22, SIXF_NOPOINTERS = 0x00400000,
SIXF_ORIGINATOR = 1 << 23, SIXF_ORIGINATOR = 0x00800000,
SIXF_TRANSFERSPRITEFRAME = 0x01000000,
}; };
static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
@ -2019,6 +2020,12 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags)
{ {
mo->RenderStyle = self->RenderStyle; mo->RenderStyle = self->RenderStyle;
} }
if (flags & SIXF_TRANSFERSPRITEFRAME)
{
mo->sprite = self->sprite;
mo->frame = self->frame;
}
return true; return true;
} }

View file

@ -72,6 +72,7 @@ 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; const int SXF_ORIGINATOR = 1 << 23;
const int SIXF_TRANSFERSPRITEFRAME = 1 << 24;
// Flags for A_Chase // Flags for A_Chase
const int CHF_FASTCHASE = 1; const int CHF_FASTCHASE = 1;