Merge remote-tracking branch 'remotes/zdoom/master'

This commit is contained in:
Christoph Oelckers 2015-02-08 10:58:59 +01:00
commit 20036a907a
33 changed files with 156 additions and 133 deletions

View file

@ -1234,9 +1234,16 @@ void AM_initVariables ()
for (pnum=0;pnum<MAXPLAYERS;pnum++)
if (playeringame[pnum])
break;
m_x = (players[pnum].camera->x >> FRACTOMAPBITS) - m_w/2;
m_y = (players[pnum].camera->y >> FRACTOMAPBITS) - m_h/2;
// [ZzZombo] no access out of bounds.
if(pnum>=MAXPLAYERS)
{
m_x=m_y=0;
}
else
{
m_x = (players[pnum].camera->x >> FRACTOMAPBITS) - m_w/2;
m_y = (players[pnum].camera->y >> FRACTOMAPBITS) - m_h/2;
}
AM_changeWindowLoc();
// for saving & restoring

View file

@ -61,8 +61,8 @@ void DBot::Serialize (FArchive &arc)
if (SaveVersion < 4515)
{
angle_t savedyaw;
int savedpitch;
angle_t savedyaw=0;
int savedpitch=0;
arc << savedyaw
<< savedpitch;
}

View file

@ -513,7 +513,7 @@ angle_t DBot::FireRox (AActor *enemy, ticcmd_t *cmd)
bglobal.SetBodyAt (enemy->x + FixedMul(enemy->velx, (m+2*FRACUNIT)),
enemy->y + FixedMul(enemy->vely, (m+2*FRACUNIT)), ONFLOORZ, 1);
dist = P_AproxDistance(actor->x-bglobal.body1->x, actor->y-bglobal.body1->y);
//try the predicted location
if (P_CheckSight (actor, bglobal.body1, SF_IGNOREVISIBILITY)) //See the predicted location, so give a test missile
{

View file

@ -1028,8 +1028,7 @@ CCMD(nextsecret)
TEXTCOLOR_NORMAL " is for single-player only.\n");
return;
}
char *next = NULL;
if (level.NextSecretMap.Len() > 0 && level.NextSecretMap.Compare("enDSeQ", 6))
{
G_DeferedInitNew(level.NextSecretMap);

View file

@ -856,11 +856,10 @@ void C_DrawConsole (bool hw2d)
}
else if (ConBottom)
{
int visheight, realheight;
int visheight;
FTexture *conpic = TexMan[conback];
visheight = ConBottom;
realheight = (visheight * conpic->GetHeight()) / SCREENHEIGHT;
screen->DrawTexture (conpic, 0, visheight - screen->GetHeight(),
DTA_DestWidth, screen->GetWidth(),

View file

@ -439,7 +439,7 @@ static BYTE HexToByte (const char *hex)
UCVarValue FBaseCVar::FromString (const char *value, ECVarType type)
{
UCVarValue ret;
int i;
int i=0;
switch (type)
{
@ -475,39 +475,29 @@ UCVarValue FBaseCVar::FromString (const char *value, ECVarType type)
// 0 1 2 3
ret.pGUID = NULL;
for (i = 0; i < 38; ++i)
if(value)
for (; i < 38; i++)
{
if (value[i] == 0)
{
break;
}
bool goodv = true;
switch (i)
{
case 0:
if (value[i] != '{')
goodv = false;
break;
break;
case 9:
case 14:
case 19:
case 24:
if (value[i] != '-')
goodv = false;
break;
break;
case 37:
if (value[i] != '}')
goodv = false;
break;
break;
default:
if (value[i] < '0' ||
(value[i] > '9' && value[i] < 'A') ||
(value[i] > 'F' && value[i] < 'a') ||
value[i] > 'f')
{
goodv = false;
}
break;
break;
}
}
if (i == 38 && value[i] == 0)
@ -1673,9 +1663,6 @@ void FBaseCVar::ListVars (const char *filter, bool plain)
if (CheckWildcards (filter, var->GetName()))
{
DWORD flags = var->GetFlags();
UCVarValue val;
val = var->GetGenericRep (CVAR_String);
if (plain)
{ // plain formatting does not include user-defined cvars
if (!(flags & CVAR_UNSETTABLE))

View file

@ -694,7 +694,7 @@ void C_DoCommand (const char *cmd, int keynum)
}
else
{
Printf ("Unknown command \"%.*s\"\n", len, beg);
Printf ("Unknown command \"%.*s\"\n", (int)len, beg);
}
}
}
@ -1336,7 +1336,7 @@ CCMD (alias)
}
else
{
alias = new FConsoleAlias (argv[1], argv[2], ParsingKeyConf);
new FConsoleAlias (argv[1], argv[2], ParsingKeyConf);
}
}
}

View file

@ -448,7 +448,7 @@ void SetCompatibilityParams()
{
unsigned i = ii_compatparams;
while (CompatParams[i] != CP_END && i < CompatParams.Size())
while (i < CompatParams.Size() && CompatParams[i] != CP_END)
{
switch (CompatParams[i])
{

View file

@ -20,11 +20,11 @@ struct FCompatValues
struct FMD5HashTraits
{
hash_t Hash(const FMD5Holder key)
hash_t Hash(const FMD5Holder &key)
{
return key.Hash;
}
int Compare(const FMD5Holder left, const FMD5Holder right)
int Compare(const FMD5Holder &left, const FMD5Holder &right)
{
return left.DWords[0] != right.DWords[0] ||
left.DWords[1] != right.DWords[1] ||

View file

@ -50,12 +50,11 @@ static FRandom pr_endtag;
//
//====================================================================
FConfigFile::FConfigFile ()
FConfigFile::FConfigFile () : PathName(NAME_None)
{
Sections = CurrentSection = NULL;
LastSectionPtr = &Sections;
CurrentEntry = NULL;
PathName = "";
OkayToWrite = true;
FileExisted = true;
}
@ -836,7 +835,7 @@ const char *FConfigFile::GenerateEndTag(const char *value)
for (int i = 0; i < 5; ++i)
{
DWORD three_bytes = (rand_bytes[i*3] << 16) | (rand_bytes[i*3+1] << 8) | (rand_bytes[i*3+2]);
//DWORD three_bytes = (rand_bytes[i*3] << 16) | (rand_bytes[i*3+1] << 8) | (rand_bytes[i*3+2]); // ???
EndTag[4+i*4 ] = Base64Table[rand_bytes[i*3] >> 2];
EndTag[4+i*4+1] = Base64Table[((rand_bytes[i*3] & 3) << 4) | (rand_bytes[i*3+1] >> 4)];
EndTag[4+i*4+2] = Base64Table[((rand_bytes[i*3+1] & 15) << 2) | (rand_bytes[i*3+2] >> 6)];

View file

@ -2455,6 +2455,12 @@ static bool DoDehPatch()
Printf (PRINT_BOLD, "\"%s\" is an old and unsupported DeHackEd patch\n", PatchFile);
return false;
}
// fix for broken WolfenDoom patches which contain \0 characters in some places.
for (int i = 0; i < PatchSize; i++)
{
if (PatchFile[i] == 0) PatchFile[i] = ' ';
}
PatchPt = strchr (PatchFile, '\n');
while ((cont = GetLine()) == 1)
{

View file

@ -2048,14 +2048,14 @@ void FDynamicBuffer::SetData (const BYTE *data, int len)
m_BufferLen = (len + 255) & ~255;
m_Data = (BYTE *)M_Realloc (m_Data, m_BufferLen);
}
if (data)
if (data != NULL)
{
m_Len = len;
memcpy (m_Data, data, len);
}
else
{
len = 0;
m_Len = 0;
}
}
@ -2668,7 +2668,9 @@ void Net_SkipCommand (int type, BYTE **stream)
case DEM_SUMMONFOE2:
skip = strlen ((char *)(*stream)) + 26;
break;
case DEM_CHANGEMAP2:
skip = strlen((char *)(*stream + 1)) + 2;
break;
case DEM_MUSICCHANGE:
case DEM_PRINT:
case DEM_CENTERPRINT:

View file

@ -500,5 +500,5 @@ void SkipChunk (BYTE **stream)
int len;
len = ReadLong (stream);
stream += len + (len & 1);
*stream += len + (len & 1);
}

View file

@ -443,7 +443,6 @@ void FDecalLib::ParseDecal (FScanner &sc)
FString decalName;
WORD decalNum;
FDecalTemplate newdecal;
int code;
FTextureID picnum;
int lumpnum;
@ -467,7 +466,7 @@ void FDecalLib::ParseDecal (FScanner &sc)
AddDecal (decalName, decalNum, newdecal);
break;
}
switch ((code = sc.MustMatchString (DecalKeywords)))
switch (sc.MustMatchString (DecalKeywords))
{
case DECAL_XSCALE:
newdecal.ScaleX = ReadScale (sc);
@ -763,8 +762,7 @@ void FDecalLib::ParseSlider (FScanner &sc)
}
else if (sc.Compare ("DistX"))
{
sc.MustGetFloat ();
distX = (fixed_t)(sc.Float * FRACUNIT);
sc.MustGetFloat (); // must remain to avoid breaking definitions that accidentally used DistX
Printf ("DistX in slider decal %s is unsupported\n", sliderName.GetChars());
}
else if (sc.Compare ("DistY"))
@ -1024,9 +1022,8 @@ FDecalLib::FTranslation *FDecalLib::GenerateTranslation (DWORD start, DWORD end)
return trans;
}
FDecalBase::FDecalBase ()
FDecalBase::FDecalBase () : Name(NAME_None)
{
Name = NAME_None;
}
FDecalBase::~FDecalBase ()
@ -1139,9 +1136,8 @@ const FDecalTemplate *FDecalGroup::GetDecal () const
return static_cast<const FDecalTemplate *>(remember);
}
FDecalAnimator::FDecalAnimator (const char *name)
FDecalAnimator::FDecalAnimator (const char *name) : Name(name)
{
Name = name;
}
FDecalAnimator::~FDecalAnimator ()

View file

@ -24,7 +24,7 @@ struct PSymbol
FName SymbolName;
protected:
PSymbol(FName name, ESymbolType type) { SymbolType = type; SymbolName = name; }
PSymbol(FName name, ESymbolType type):SymbolName(name) { SymbolType = type; }
};
// A constant value ---------------------------------------------------------

View file

@ -78,9 +78,8 @@ DMover::DMover ()
}
DMover::DMover (sector_t *sector)
: DSectorEffect (sector)
: DSectorEffect (sector), interpolation(NULL)
{
interpolation = NULL;
}
void DMover::Destroy()

View file

@ -53,7 +53,7 @@
//==========================================================================
FileReader::FileReader ()
: File(NULL), Length(0), StartPos(0), CloseOnDestruct(false)
: File(NULL), Length(0), StartPos(0), FilePos(0), CloseOnDestruct(false)
{
}

View file

@ -2589,6 +2589,12 @@ bool G_ProcessIFFDemo (FString &mapname)
demo_p = nextchunk;
}
if (!headerHit)
{
Printf ("Demo has no header!\n");
return true;
}
if (!numPlayers)
{
Printf ("Demo has no players!\n");

View file

@ -367,7 +367,6 @@ static void InitPlayerClasses ()
void G_InitNew (const char *mapname, bool bTitleLevel)
{
EGameSpeed oldSpeed;
bool wantFast;
int i;
@ -454,7 +453,6 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
I_Error ("Could not find map %s\n", mapname);
}
oldSpeed = GameSpeed;
wantFast = !!G_SkillProperty(SKILLP_FastMonsters);
GameSpeed = wantFast ? SPEED_Fast : SPEED_Normal;

View file

@ -241,7 +241,7 @@ struct FOptionalMapinfoData
{
FOptionalMapinfoData *Next;
FName identifier;
FOptionalMapinfoData() { Next = NULL; identifier = NAME_None; }
FOptionalMapinfoData():identifier(NAME_None) { Next = NULL; }
virtual ~FOptionalMapinfoData() {}
virtual FOptionalMapinfoData *Clone() const = 0;
};

View file

@ -705,8 +705,6 @@ void FMapInfoParser::ParseCluster()
}
else if (sc.Compare("music"))
{
int order = 0;
ParseAssign();
ParseMusic(clusterinfo->MessageMusic, clusterinfo->musicorder);
}

View file

@ -238,7 +238,7 @@ void PacketSend (void)
else
{
// Printf("send %d\n", doomcom.datalength);
c = sendto(mysocket, (char *)doomcom.data, doomcom.datalength,
/*c = */sendto(mysocket, (char *)doomcom.data, doomcom.datalength,
0, (sockaddr *)&sendaddress[doomcom.remotenode],
sizeof(sendaddress[doomcom.remotenode]));
}
@ -800,7 +800,6 @@ bool Guest_WaitForOthers (void *userdata)
{
int node;
packet.NumNodes = packet.NumNodes;
doomcom.numnodes = packet.NumNodes + 2;
sendplayer[0] = packet.ConsoleNum; // My player number
doomcom.consoleplayer = packet.ConsoleNum;

View file

@ -158,7 +158,6 @@ void FActorInfo::StaticSetActorNums ()
void FActorInfo::RegisterIDs ()
{
const PClass *cls = PClass::FindClass(Class->TypeName);
bool set = false;
if (GameFilter == GAME_Any || (GameFilter & gameinfo.gametype))
{
@ -578,17 +577,17 @@ CCMD (summonfoe)
TMap<FName, DamageTypeDefinition> GlobalDamageDefinitions;
void DamageTypeDefinition::Apply(FName const type)
void DamageTypeDefinition::Apply(FName type)
{
GlobalDamageDefinitions[type] = *this;
}
DamageTypeDefinition *DamageTypeDefinition::Get(FName const type)
DamageTypeDefinition *DamageTypeDefinition::Get(FName type)
{
return GlobalDamageDefinitions.CheckKey(type);
}
bool DamageTypeDefinition::IgnoreArmor(FName const type)
bool DamageTypeDefinition::IgnoreArmor(FName type)
{
DamageTypeDefinition *dtd = Get(type);
if (dtd) return dtd->NoArmor;
@ -610,7 +609,7 @@ bool DamageTypeDefinition::IgnoreArmor(FName const type)
//
//==========================================================================
int DamageTypeDefinition::ApplyMobjDamageFactor(int damage, FName const type, DmgFactors const * const factors)
int DamageTypeDefinition::ApplyMobjDamageFactor(int damage, FName type, DmgFactors const * const factors)
{
if (factors)
{

View file

@ -217,7 +217,7 @@ public:
bool ReplaceFactor;
bool NoArmor;
void Apply(FName const type);
void Apply(FName type);
void Clear()
{
DefaultFactor = FRACUNIT;
@ -225,9 +225,9 @@ public:
NoArmor = false;
}
static DamageTypeDefinition *Get(FName const type);
static bool IgnoreArmor(FName const type);
static int ApplyMobjDamageFactor(int damage, FName const type, DmgFactors const * const factors);
static DamageTypeDefinition *Get(FName type);
static bool IgnoreArmor(FName type);
static int ApplyMobjDamageFactor(int damage, FName type, DmgFactors const * const factors);
};

View file

@ -55,10 +55,9 @@ DArgs::DArgs()
//
//===========================================================================
DArgs::DArgs(const DArgs &other)
: DObject()
DArgs::DArgs(const DArgs &other):Argv(other.Argv),
DObject()
{
Argv = other.Argv;
}
//===========================================================================
@ -263,7 +262,6 @@ void DArgs::RemoveArgs(const char *check)
const char *DArgs::GetArg(int arg) const
{
return ((unsigned)arg < Argv.Size()) ? Argv[arg].GetChars() : NULL;
return Argv[arg];
}
//===========================================================================
@ -351,7 +349,6 @@ void DArgs::RemoveArg(int argindex)
void DArgs::CollectFiles(const char *param, const char *extension)
{
TArray<FString> work;
DArgs *out = new DArgs;
unsigned int i;
size_t extlen = extension == NULL ? 0 : strlen(extension);

View file

@ -1023,7 +1023,6 @@ bool M_SaveBitmap(const BYTE *from, ESSType color_type, int width, int height, i
}
}
y = sizeof(buffer) - stream.avail_out;
deflateEnd (&stream);
if (err != Z_STREAM_END)

View file

@ -261,11 +261,10 @@ protected:
public:
bool mEnabled;
FListMenuItem(int xpos = 0, int ypos = 0, FName action = NAME_None)
FListMenuItem(int xpos = 0, int ypos = 0, FName action = NAME_None):mAction(action)
{
mXpos = xpos;
mYpos = ypos;
mAction = action;
mEnabled = true;
}

View file

@ -670,33 +670,39 @@ bool P_TryWalk (AActor *actor)
void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
{
dirtype_t d[3];
dirtype_t d[2];
int tdir;
dirtype_t olddir, turnaround;
bool attempts[NUMDIRS-1]; // We don't need to attempt DI_NODIR.
memset(&attempts, false, sizeof(attempts));
olddir = (dirtype_t)actor->movedir;
turnaround = opposite[olddir];
if (deltax>10*FRACUNIT)
d[1]= DI_EAST;
d[0]= DI_EAST;
else if (deltax<-10*FRACUNIT)
d[1]= DI_WEST;
d[0]= DI_WEST;
else
d[0]=DI_NODIR;
if (deltay<-10*FRACUNIT)
d[1]= DI_SOUTH;
else if (deltay>10*FRACUNIT)
d[1]= DI_NORTH;
else
d[1]=DI_NODIR;
if (deltay<-10*FRACUNIT)
d[2]= DI_SOUTH;
else if (deltay>10*FRACUNIT)
d[2]= DI_NORTH;
else
d[2]=DI_NODIR;
// try direct route
if (d[1] != DI_NODIR && d[2] != DI_NODIR)
if (d[0] != DI_NODIR && d[1] != DI_NODIR)
{
actor->movedir = diags[((deltay<0)<<1) + (deltax>0)];
if (actor->movedir != turnaround && P_TryWalk(actor))
return;
if (actor->movedir != turnaround)
{
attempts[actor->movedir] = true;
if (P_TryWalk(actor))
return;
}
}
// try other directions
@ -704,18 +710,19 @@ void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
{
if ((pr_newchasedir() > 200 || abs(deltay) > abs(deltax)))
{
swapvalues (d[1], d[2]);
swapvalues (d[0], d[1]);
}
if (d[0] == turnaround)
d[0] = DI_NODIR;
if (d[1] == turnaround)
d[1] = DI_NODIR;
if (d[2] == turnaround)
d[2] = DI_NODIR;
}
if (d[1] != DI_NODIR)
if (d[0] != DI_NODIR && attempts[d[0]] == false)
{
actor->movedir = d[1];
actor->movedir = d[0];
attempts[d[0]] = true;
if (P_TryWalk (actor))
{
// either moved forward or attacked
@ -723,9 +730,10 @@ void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
}
}
if (d[2] != DI_NODIR)
if (d[1] != DI_NODIR && attempts[d[1]] == false)
{
actor->movedir = d[2];
actor->movedir = d[1];
attempts[d[1]] = true;
if (P_TryWalk (actor))
return;
}
@ -733,9 +741,10 @@ void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
if (!(actor->flags5 & MF5_AVOIDINGDROPOFF))
{
// there is no direct path to the player, so pick another direction.
if (olddir != DI_NODIR)
if (olddir != DI_NODIR && attempts[olddir] == false)
{
actor->movedir = olddir;
attempts[olddir] = true;
if (P_TryWalk (actor))
return;
}
@ -746,9 +755,10 @@ void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
{
for (tdir = DI_EAST; tdir <= DI_SOUTHEAST; tdir++)
{
if (tdir != turnaround)
if (tdir != turnaround && attempts[tdir] == false)
{
actor->movedir = tdir;
attempts[tdir] = true;
if ( P_TryWalk(actor) )
return;
}
@ -758,16 +768,17 @@ void P_DoNewChaseDir (AActor *actor, fixed_t deltax, fixed_t deltay)
{
for (tdir = DI_SOUTHEAST; tdir != (DI_EAST-1); tdir--)
{
if (tdir != turnaround)
if (tdir != turnaround && attempts[tdir] == false)
{
actor->movedir = tdir;
attempts[tdir] = true;
if ( P_TryWalk(actor) )
return;
}
}
}
if (turnaround != DI_NODIR)
if (turnaround != DI_NODIR && attempts[turnaround] == false)
{
actor->movedir =turnaround;
if ( P_TryWalk(actor) )
@ -2803,7 +2814,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();
if (flags & FAF_TOP)
target_z = other->z + (other->height) + other->GetBobOffset();
if (!flags & FAF_NODISTFACTOR)
if (!(flags & FAF_NODISTFACTOR))
target_z += pitch_offset;
double dist_z = target_z - source_z;

View file

@ -679,10 +679,6 @@ void DPolyDoor::Tick ()
if (m_Dist <= 0 || poly->RotatePolyobj (m_Speed))
{
absSpeed = abs (m_Speed);
if (m_Dist == -1)
{ // perpetual polyobj
return;
}
m_Dist -= absSpeed;
if (m_Dist <= 0)
{

View file

@ -2993,3 +2993,23 @@ CCMD (cachesound)
}
}
}
CCMD(listsoundchannels)
{
FSoundChan *chan;
int count = 0;
for (chan = Channels; chan != NULL; chan = chan->NextChan)
{
if (!(chan->ChanFlags & CHAN_EVICTED))
{
FVector3 chanorigin;
CalcPosVel(chan, &chanorigin, NULL);
Printf("%s at (%1.5f, %1.5f, %1.5f)\n", (const char*)chan->SoundID, chanorigin.X, chanorigin.Y, chanorigin.Z);
count++;
}
}
Printf("%d sounds playing\n", count);
}

View file

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

View file

@ -152,10 +152,9 @@ struct ExpVal
class FxExpression
{
protected:
FxExpression(const FScriptPosition &pos)
FxExpression(const FScriptPosition &pos):ScriptPosition(pos)
{
isresolved = false;
ScriptPosition = pos;
}
public:
virtual ~FxExpression() {}

View file

@ -72,6 +72,7 @@ const int SXF_SETTARGET = 1 << 20;
const int SXF_SETTRACER = 1 << 21;
const int SXF_NOPOINTERS = 1 << 22;
const int SXF_ORIGINATOR = 1 << 23;
const int SIXF_TRANSFERSPRITEFRAME = 1 << 24;
// Flags for A_Chase
const int CHF_FASTCHASE = 1;