mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
e49572b713
27 changed files with 119 additions and 93 deletions
|
@ -1234,16 +1234,9 @@ void AM_initVariables ()
|
|||
for (pnum=0;pnum<MAXPLAYERS;pnum++)
|
||||
if (playeringame[pnum])
|
||||
break;
|
||||
// [ZzZombo] no access out of bounds.
|
||||
if(pnum>=MAXPLAYERS)
|
||||
{
|
||||
m_x=m_y=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(pnum >= 0 && pnum < MAXPLAYERS);
|
||||
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
|
||||
|
|
|
@ -61,8 +61,8 @@ void DBot::Serialize (FArchive &arc)
|
|||
|
||||
if (SaveVersion < 4515)
|
||||
{
|
||||
angle_t savedyaw=0;
|
||||
int savedpitch=0;
|
||||
angle_t savedyaw;
|
||||
int savedpitch;
|
||||
arc << savedyaw
|
||||
<< savedpitch;
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ static BYTE HexToByte (const char *hex)
|
|||
UCVarValue FBaseCVar::FromString (const char *value, ECVarType type)
|
||||
{
|
||||
UCVarValue ret;
|
||||
int i=0;
|
||||
int i;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
@ -475,8 +475,11 @@ UCVarValue FBaseCVar::FromString (const char *value, ECVarType type)
|
|||
// 0 1 2 3
|
||||
|
||||
ret.pGUID = NULL;
|
||||
if(value)
|
||||
for (; i < 38; i++)
|
||||
if (value == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
for (i = 0; value[i] != 0 && i < 38; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
|
|
|
@ -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] ||
|
||||
|
|
|
@ -50,11 +50,12 @@ static FRandom pr_endtag;
|
|||
//
|
||||
//====================================================================
|
||||
|
||||
FConfigFile::FConfigFile () : PathName(NAME_None)
|
||||
FConfigFile::FConfigFile ()
|
||||
{
|
||||
Sections = CurrentSection = NULL;
|
||||
LastSectionPtr = &Sections;
|
||||
CurrentEntry = NULL;
|
||||
PathName = "";
|
||||
OkayToWrite = true;
|
||||
FileExisted = true;
|
||||
}
|
||||
|
|
|
@ -2190,23 +2190,24 @@ static int PatchText (int oldSize)
|
|||
}
|
||||
}
|
||||
|
||||
if (!good)
|
||||
{
|
||||
// Search through most other texts
|
||||
const char *str;
|
||||
do
|
||||
{
|
||||
str = EnglishStrings->MatchString(oldStr);
|
||||
if (str != NULL)
|
||||
{
|
||||
GStrings.SetString(str, newStr);
|
||||
EnglishStrings->SetString(str, "~~"); // set to something invalid so that it won't get found again by the next iteration or by another replacement later
|
||||
good = true;
|
||||
}
|
||||
}
|
||||
while (str != NULL); // repeat search until the text can no longer be found
|
||||
|
||||
if (!good)
|
||||
{
|
||||
DPrintf (" (Unmatched)\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
donewithtext:
|
||||
if (newStr)
|
||||
|
|
|
@ -1022,8 +1022,9 @@ FDecalLib::FTranslation *FDecalLib::GenerateTranslation (DWORD start, DWORD end)
|
|||
return trans;
|
||||
}
|
||||
|
||||
FDecalBase::FDecalBase () : Name(NAME_None)
|
||||
FDecalBase::FDecalBase ()
|
||||
{
|
||||
Name = NAME_None;
|
||||
}
|
||||
|
||||
FDecalBase::~FDecalBase ()
|
||||
|
@ -1136,8 +1137,9 @@ const FDecalTemplate *FDecalGroup::GetDecal () const
|
|||
return static_cast<const FDecalTemplate *>(remember);
|
||||
}
|
||||
|
||||
FDecalAnimator::FDecalAnimator (const char *name) : Name(name)
|
||||
FDecalAnimator::FDecalAnimator (const char *name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
FDecalAnimator::~FDecalAnimator ()
|
||||
|
|
|
@ -24,7 +24,7 @@ struct PSymbol
|
|||
FName SymbolName;
|
||||
|
||||
protected:
|
||||
PSymbol(FName name, ESymbolType type):SymbolName(name) { SymbolType = type; }
|
||||
PSymbol(FName name, ESymbolType type) { SymbolType = type; SymbolName = name; }
|
||||
};
|
||||
|
||||
// A constant value ---------------------------------------------------------
|
||||
|
|
|
@ -78,8 +78,9 @@ DMover::DMover ()
|
|||
}
|
||||
|
||||
DMover::DMover (sector_t *sector)
|
||||
: DSectorEffect (sector), interpolation(NULL)
|
||||
: DSectorEffect (sector)
|
||||
{
|
||||
interpolation = NULL;
|
||||
}
|
||||
|
||||
void DMover::Destroy()
|
||||
|
|
|
@ -241,7 +241,7 @@ struct FOptionalMapinfoData
|
|||
{
|
||||
FOptionalMapinfoData *Next;
|
||||
FName identifier;
|
||||
FOptionalMapinfoData():identifier(NAME_None) { Next = NULL; }
|
||||
FOptionalMapinfoData() { Next = NULL; identifier = NAME_None; }
|
||||
virtual ~FOptionalMapinfoData() {}
|
||||
virtual FOptionalMapinfoData *Clone() const = 0;
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ class FWeaponSlot
|
|||
{
|
||||
public:
|
||||
FWeaponSlot() { Clear(); }
|
||||
FWeaponSlot(const FWeaponSlot &other):Weapons(other.Weapons) {}
|
||||
FWeaponSlot(const FWeaponSlot &other) { Weapons = other.Weapons; }
|
||||
FWeaponSlot &operator= (const FWeaponSlot &other) { Weapons = other.Weapons; return *this; }
|
||||
void Clear() { Weapons.Clear(); }
|
||||
bool AddWeapon (const char *type);
|
||||
|
|
|
@ -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]));
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@ DArgs::DArgs()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
DArgs::DArgs(const DArgs &other):Argv(other.Argv),
|
||||
DObject()
|
||||
DArgs::DArgs(const DArgs &other)
|
||||
: DObject(), Argv(other.Argv)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -261,10 +261,11 @@ protected:
|
|||
public:
|
||||
bool mEnabled;
|
||||
|
||||
FListMenuItem(int xpos = 0, int ypos = 0, FName action = NAME_None):mAction(action)
|
||||
FListMenuItem(int xpos = 0, int ypos = 0, FName action = NAME_None)
|
||||
{
|
||||
mXpos = xpos;
|
||||
mYpos = ypos;
|
||||
mAction = action;
|
||||
mEnabled = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -937,10 +937,13 @@ void FNodeBuilder::SetNodeFromSeg (node_t &node, const FPrivSeg *pseg) const
|
|||
|
||||
DWORD FNodeBuilder::SplitSeg (DWORD segnum, int splitvert, int v1InFront)
|
||||
{
|
||||
double dx, dy;
|
||||
FPrivSeg newseg;
|
||||
int newnum = (int)Segs.Size();
|
||||
|
||||
newseg = Segs[segnum];
|
||||
dx = double(Vertices[splitvert].x - Vertices[newseg.v1].x);
|
||||
dy = double(Vertices[splitvert].y - Vertices[newseg.v1].y);
|
||||
if (v1InFront > 0)
|
||||
{
|
||||
newseg.v1 = splitvert;
|
||||
|
@ -1126,7 +1129,8 @@ int ClassifyLineBackpatchC (node_t &node, const FSimpleVert *v1, const FSimpleVe
|
|||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
char *callerpage = (char *)((intptr_t)calleroffset & ~(pagesize - 1));
|
||||
size_t protectlen = (intptr_t)calleroffset + sizeof(void*) - (intptr_t)callerpage;
|
||||
if (!mprotect(callerpage, protectlen, PROT_READ|PROT_WRITE|PROT_EXEC))
|
||||
int ptect;
|
||||
if (!(ptect = mprotect(callerpage, protectlen, PROT_READ|PROT_WRITE|PROT_EXEC)))
|
||||
#endif
|
||||
{
|
||||
*calleroffset = diff;
|
||||
|
|
|
@ -317,6 +317,7 @@ int FNodeBuilder::CloseSubsector (TArray<glseg_t> &segs, int subsector, vertex_t
|
|||
{
|
||||
angle_t bestdiff = ANGLE_MAX;
|
||||
FPrivSeg *bestseg = NULL;
|
||||
DWORD bestj = DWORD_MAX;
|
||||
j = first;
|
||||
do
|
||||
{
|
||||
|
@ -327,12 +328,14 @@ int FNodeBuilder::CloseSubsector (TArray<glseg_t> &segs, int subsector, vertex_t
|
|||
{
|
||||
bestdiff = diff;
|
||||
bestseg = seg;
|
||||
bestj = j;
|
||||
break;
|
||||
}
|
||||
if (diff < bestdiff && diff > 0)
|
||||
{
|
||||
bestdiff = diff;
|
||||
bestseg = seg;
|
||||
bestj = j;
|
||||
}
|
||||
}
|
||||
while (++j < max);
|
||||
|
|
|
@ -176,7 +176,7 @@ void FNodeBuilder::AddMinisegs (const node_t &node, DWORD splitseg, DWORD &fset,
|
|||
{
|
||||
if (prev != NULL)
|
||||
{
|
||||
DWORD fseg1, bseg1;
|
||||
DWORD fseg1, bseg1, fseg2, bseg2;
|
||||
DWORD fnseg, bnseg;
|
||||
|
||||
// Minisegs should only be added when they can create valid loops on both the front and
|
||||
|
@ -186,8 +186,8 @@ void FNodeBuilder::AddMinisegs (const node_t &node, DWORD splitseg, DWORD &fset,
|
|||
|
||||
if ((fseg1 = CheckLoopStart (node.dx, node.dy, prev->Info.Vertex, event->Info.Vertex)) != DWORD_MAX &&
|
||||
(bseg1 = CheckLoopStart (-node.dx, -node.dy, event->Info.Vertex, prev->Info.Vertex)) != DWORD_MAX &&
|
||||
(CheckLoopEnd (node.dx, node.dy, event->Info.Vertex)) != DWORD_MAX &&
|
||||
(CheckLoopEnd (-node.dx, -node.dy, prev->Info.Vertex)) != DWORD_MAX)
|
||||
(fseg2 = CheckLoopEnd (node.dx, node.dy, event->Info.Vertex)) != DWORD_MAX &&
|
||||
(bseg2 = CheckLoopEnd (-node.dx, -node.dy, prev->Info.Vertex)) != DWORD_MAX)
|
||||
{
|
||||
// Add miniseg on the front side
|
||||
fnseg = AddMiniseg (prev->Info.Vertex, event->Info.Vertex, DWORD_MAX, fseg1, splitseg);
|
||||
|
|
|
@ -217,7 +217,7 @@ FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
|
|||
//
|
||||
// When the string table needs to grow to hold more strings, a garbage
|
||||
// collection is first attempted to see if more room can be made to store
|
||||
// strings without growing. A string is concidered in use if any value
|
||||
// strings without growing. A string is considered in use if any value
|
||||
// in any of these variable blocks contains a valid ID in the global string
|
||||
// table:
|
||||
// * The active area of the ACS stack
|
||||
|
@ -226,7 +226,7 @@ FWorldGlobalArray ACS_GlobalArrays[NUM_GLOBALVARS];
|
|||
// * All world variables
|
||||
// * All global variables
|
||||
// It's not important whether or not they are really used as strings, only
|
||||
// that they might be. A string is also concidered in use if its lock count
|
||||
// that they might be. A string is also considered in use if its lock count
|
||||
// is non-zero, even if none of the above variable blocks referenced it.
|
||||
//
|
||||
// To keep track of local and map variables for nonresident maps in a hub,
|
||||
|
@ -660,7 +660,10 @@ void ACSStringPool::ReadStrings(PNGHandle *png, DWORD id)
|
|||
i++;
|
||||
j = arc.ReadCount();
|
||||
}
|
||||
if (str != NULL)
|
||||
{
|
||||
delete[] str;
|
||||
}
|
||||
FindFirstFreeEntry(0);
|
||||
}
|
||||
}
|
||||
|
@ -1062,16 +1065,9 @@ static void DoGiveInv (AActor *actor, const PClass *info, int amount)
|
|||
// This shouldn't count for the item statistics!
|
||||
item->ClearCounters();
|
||||
if (info->IsDescendantOf (RUNTIME_CLASS(ABasicArmorPickup)))
|
||||
{
|
||||
if (static_cast<ABasicArmorPickup*>(item)->SaveAmount != 0)
|
||||
{
|
||||
static_cast<ABasicArmorPickup*>(item)->SaveAmount *= amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
static_cast<ABasicArmorPickup*>(item)->SaveAmount *= amount;
|
||||
}
|
||||
}
|
||||
else if (info->IsDescendantOf (RUNTIME_CLASS(ABasicArmorBonus)))
|
||||
{
|
||||
static_cast<ABasicArmorBonus*>(item)->SaveAmount *= amount;
|
||||
|
@ -5845,7 +5841,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
bool canraiseall = true;
|
||||
while ((actor = iterator.Next()))
|
||||
{
|
||||
canraiseall = P_Thing_CanRaise(actor) && canraiseall;
|
||||
canraiseall = P_Thing_CanRaise(actor) & canraiseall;
|
||||
}
|
||||
|
||||
return canraiseall;
|
||||
|
|
|
@ -924,7 +924,7 @@ public:
|
|||
{
|
||||
const char *speakerName;
|
||||
int x, y, linesize;
|
||||
int width=screen->GetWidth(), height=screen->GetHeight(), fontheight;
|
||||
int width, fontheight;
|
||||
|
||||
player_t *cp = &players[consoleplayer];
|
||||
|
||||
|
@ -949,8 +949,8 @@ public:
|
|||
{
|
||||
screen->DrawTexture (TexMan(CurNode->Backdrop), 0, 0, DTA_320x200, true, TAG_DONE);
|
||||
}
|
||||
x = 16 * width / 320;
|
||||
y = 16 * height / 200;
|
||||
x = 16 * screen->GetWidth() / 320;
|
||||
y = 16 * screen->GetHeight() / 200;
|
||||
linesize = 10 * CleanYfac;
|
||||
|
||||
// Who is talking to you?
|
||||
|
@ -970,16 +970,16 @@ public:
|
|||
int i;
|
||||
for (i = 0; mDialogueLines[i].Width >= 0; ++i)
|
||||
{ }
|
||||
screen->Dim (0, 0.45f, 14 * width / 320, 13 * height / 200,
|
||||
308 * width / 320 - 14 * width / 320,
|
||||
screen->Dim (0, 0.45f, 14 * screen->GetWidth() / 320, 13 * screen->GetHeight() / 200,
|
||||
308 * screen->GetWidth() / 320 - 14 * screen->GetWidth () / 320,
|
||||
speakerName == NULL ? linesize * i + 6 * CleanYfac
|
||||
: linesize * i + 6 * CleanYfac + linesize * 3/2);
|
||||
}
|
||||
|
||||
// Dim the screen behind the PC's choices.
|
||||
|
||||
screen->Dim (0, 0.45f, (24-160) * CleanXfac + width/2,
|
||||
(mYpos - 2 - 100) * CleanYfac + height/2,
|
||||
screen->Dim (0, 0.45f, (24-160) * CleanXfac + screen->GetWidth()/2,
|
||||
(mYpos - 2 - 100) * CleanYfac + screen->GetHeight()/2,
|
||||
272 * CleanXfac,
|
||||
MIN<int>(mResponseLines.Size() * OptionSettings.mLinespacing + 4, 200 - mYpos) * CleanYfac);
|
||||
|
||||
|
@ -989,7 +989,7 @@ public:
|
|||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
y += linesize * 3 / 2;
|
||||
}
|
||||
x = 24 * width / 320;
|
||||
x = 24 * screen->GetWidth() / 320;
|
||||
for (int i = 0; mDialogueLines[i].Width >= 0; ++i)
|
||||
{
|
||||
screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, mDialogueLines[i].Text,
|
||||
|
@ -1019,6 +1019,7 @@ public:
|
|||
int response = 0;
|
||||
for (unsigned i = 0; i < mResponseLines.Size(); i++, y += fontheight)
|
||||
{
|
||||
width = SmallFont->StringWidth(mResponseLines[i]);
|
||||
x = 64;
|
||||
|
||||
screen->DrawText (SmallFont, CR_GREEN, x, y, mResponseLines[i], DTA_Clean, true, TAG_DONE);
|
||||
|
@ -1036,8 +1037,8 @@ public:
|
|||
{
|
||||
int color = ((DMenu::MenuTime%8) < 4) || DMenu::CurrentMenu != this ? CR_RED:CR_GREY;
|
||||
|
||||
x = (50 + 3 - 160) * CleanXfac + width / 2;
|
||||
int yy = (y + fontheight/2 - 5 - 100) * CleanYfac + height / 2;
|
||||
x = (50 + 3 - 160) * CleanXfac + screen->GetWidth() / 2;
|
||||
int yy = (y + fontheight/2 - 5 - 100) * CleanYfac + screen->GetHeight() / 2;
|
||||
screen->DrawText (ConFont, color, x, yy, "\xd",
|
||||
DTA_CellX, 8 * CleanXfac,
|
||||
DTA_CellY, 8 * CleanYfac,
|
||||
|
|
|
@ -900,12 +900,12 @@ DElevator::DElevator ()
|
|||
}
|
||||
|
||||
DElevator::DElevator (sector_t *sec)
|
||||
: m_Interp_Floor(sec->SetInterpolation(sector_t::FloorMove, true)),
|
||||
m_Interp_Ceiling(sec->SetInterpolation(sector_t::CeilingMove, true)),
|
||||
Super (sec)
|
||||
: Super (sec)
|
||||
{
|
||||
sec->floordata = this;
|
||||
sec->ceilingdata = this;
|
||||
m_Interp_Floor = sec->SetInterpolation(sector_t::FloorMove, true);
|
||||
m_Interp_Ceiling = sec->SetInterpolation(sector_t::CeilingMove, true);
|
||||
}
|
||||
|
||||
void DElevator::Serialize (FArchive &arc)
|
||||
|
|
|
@ -1977,7 +1977,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
|||
{
|
||||
bool tg = (mo->target != NULL);
|
||||
bool blockingtg = (BlockingMobj->target != NULL);
|
||||
if (BlockingMobj->flags7 & MF7_AIMREFLECT && (tg || blockingtg))
|
||||
if ((BlockingMobj->flags7 & MF7_AIMREFLECT) && (tg | blockingtg))
|
||||
{
|
||||
AActor *origin = tg ? mo->target : BlockingMobj->target;
|
||||
|
||||
|
@ -1991,7 +1991,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (BlockingMobj->flags7 & MF7_MIRRORREFLECT && (tg || blockingtg))
|
||||
if ((BlockingMobj->flags7 & MF7_MIRRORREFLECT) && (tg | blockingtg))
|
||||
{
|
||||
mo->angle += ANGLE_180;
|
||||
mo->velx = -mo->velx / 2;
|
||||
|
@ -5629,24 +5629,30 @@ static fixed_t GetDefaultSpeed(const PClass *type)
|
|||
|
||||
AActor *P_SpawnMissile (AActor *source, AActor *dest, const PClass *type, AActor *owner)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return P_SpawnMissileXYZ (source->x, source->y, source->z + 32*FRACUNIT + source->GetBobOffset(),
|
||||
source, dest, type, true, owner);
|
||||
}
|
||||
|
||||
AActor *P_SpawnMissileZ (AActor *source, fixed_t z, AActor *dest, const PClass *type)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return P_SpawnMissileXYZ (source->x, source->y, z, source, dest, type);
|
||||
}
|
||||
|
||||
AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z,
|
||||
AActor *source, AActor *dest, const PClass *type, bool checkspawn, AActor *owner)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dest == NULL)
|
||||
{
|
||||
|
@ -5717,8 +5723,10 @@ AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z,
|
|||
|
||||
AActor * P_OldSpawnMissile(AActor * source, AActor * owner, AActor * dest, const PClass *type)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
angle_t an;
|
||||
fixed_t dist;
|
||||
AActor *th = Spawn (type, source->x, source->y, source->z + 4*8*FRACUNIT, ALLOW_REPLACE);
|
||||
|
@ -5760,8 +5768,10 @@ AActor * P_OldSpawnMissile(AActor * source, AActor * owner, AActor * dest, const
|
|||
AActor *P_SpawnMissileAngle (AActor *source, const PClass *type,
|
||||
angle_t angle, fixed_t velz)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return P_SpawnMissileAngleZSpeed (source, source->z + 32*FRACUNIT + source->GetBobOffset(),
|
||||
type, angle, velz, GetDefaultSpeed (type));
|
||||
}
|
||||
|
@ -5769,16 +5779,16 @@ AActor *P_SpawnMissileAngle (AActor *source, const PClass *type,
|
|||
AActor *P_SpawnMissileAngleZ (AActor *source, fixed_t z,
|
||||
const PClass *type, angle_t angle, fixed_t velz)
|
||||
{
|
||||
if(!source)
|
||||
return NULL;
|
||||
return P_SpawnMissileAngleZSpeed (source, z, type, angle, velz,
|
||||
GetDefaultSpeed (type));
|
||||
}
|
||||
|
||||
AActor *P_SpawnMissileZAimed (AActor *source, fixed_t z, AActor *dest, const PClass *type)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
angle_t an;
|
||||
fixed_t dist;
|
||||
fixed_t speed;
|
||||
|
@ -5809,8 +5819,10 @@ AActor *P_SpawnMissileZAimed (AActor *source, fixed_t z, AActor *dest, const PCl
|
|||
AActor *P_SpawnMissileAngleSpeed (AActor *source, const PClass *type,
|
||||
angle_t angle, fixed_t velz, fixed_t speed)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return P_SpawnMissileAngleZSpeed (source, source->z + 32*FRACUNIT + source->GetBobOffset(),
|
||||
type, angle, velz, speed);
|
||||
}
|
||||
|
@ -5818,11 +5830,13 @@ AActor *P_SpawnMissileAngleSpeed (AActor *source, const PClass *type,
|
|||
AActor *P_SpawnMissileAngleZSpeed (AActor *source, fixed_t z,
|
||||
const PClass *type, angle_t angle, fixed_t velz, fixed_t speed, AActor *owner, bool checkspawn)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
AActor *mo;
|
||||
|
||||
if (z != ONFLOORZ && z != ONCEILINGZ && source != NULL)
|
||||
if (z != ONFLOORZ && z != ONCEILINGZ)
|
||||
{
|
||||
z -= source->floorclip;
|
||||
}
|
||||
|
@ -5857,8 +5871,10 @@ AActor *P_SpawnMissileAngleZSpeed (AActor *source, fixed_t z,
|
|||
|
||||
AActor *P_SpawnPlayerMissile (AActor *source, const PClass *type)
|
||||
{
|
||||
if(!source)
|
||||
if (source == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return P_SpawnPlayerMissile (source, 0, 0, 0, type, source->angle);
|
||||
}
|
||||
|
||||
|
|
|
@ -3042,14 +3042,13 @@ void P_LoadBlockMap (MapData * map)
|
|||
blockmap = blockmaplump+4;
|
||||
}
|
||||
|
||||
line_t** linebuffer;
|
||||
|
||||
//
|
||||
// P_GroupLines
|
||||
// Builds sector line lists and subsector sector numbers.
|
||||
// Finds block bounding boxes for sectors.
|
||||
// [RH] Handles extra lights.
|
||||
// [RH] Handles extra lights
|
||||
//
|
||||
line_t** linebuffer;
|
||||
|
||||
static void P_GroupLines (bool buildmap)
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
|||
// Spawn teleport fog at source and destination
|
||||
if (sourceFog && !predicting)
|
||||
{
|
||||
P_SpawnTeleportFog(thing, oldx, oldy, oldz, true, true); //Passes the actor through then pulls the TeleFog metadata types based on properties.
|
||||
P_SpawnTeleportFog(thing, oldx, oldy, oldz, true, true); //Passes the actor through which then pulls the TeleFog metadata types based on properties.
|
||||
}
|
||||
if (useFog)
|
||||
{
|
||||
|
|
|
@ -101,10 +101,11 @@ FPlayerClass::FPlayerClass ()
|
|||
Flags = 0;
|
||||
}
|
||||
|
||||
FPlayerClass::FPlayerClass (const FPlayerClass &other) : Skins(other.Skins)
|
||||
FPlayerClass::FPlayerClass (const FPlayerClass &other)
|
||||
{
|
||||
Type = other.Type;
|
||||
Flags = other.Flags;
|
||||
Skins = other.Skins;
|
||||
}
|
||||
|
||||
FPlayerClass::~FPlayerClass ()
|
||||
|
@ -1011,7 +1012,7 @@ void APlayerPawn::FilterCoopRespawnInventory (APlayerPawn *oldplayer)
|
|||
else if ((dmflags & DF_COOP_LOSE_ARMOR) &&
|
||||
item->IsKindOf(RUNTIME_CLASS(AArmor)))
|
||||
{
|
||||
if (defitem != NULL)
|
||||
if (defitem == NULL)
|
||||
{
|
||||
item->Destroy();
|
||||
}
|
||||
|
|
|
@ -152,9 +152,11 @@ struct ExpVal
|
|||
class FxExpression
|
||||
{
|
||||
protected:
|
||||
FxExpression(const FScriptPosition &pos):ScriptPosition(pos)
|
||||
FxExpression(const FScriptPosition &pos)
|
||||
: ScriptPosition(pos)
|
||||
{
|
||||
isresolved = false;
|
||||
ScriptPosition = pos;
|
||||
}
|
||||
public:
|
||||
virtual ~FxExpression() {}
|
||||
|
|
|
@ -1576,6 +1576,7 @@ FxExpression *FxAbs::Resolve(FCompileContext &ctx)
|
|||
|
||||
case VAL_Float:
|
||||
value.Float = fabs(value.Float);
|
||||
break;
|
||||
|
||||
default:
|
||||
// shouldn't happen
|
||||
|
@ -2052,6 +2053,7 @@ FxExpression *FxGlobalVariable::Resolve(FCompileContext&)
|
|||
case VAL_Fixed:
|
||||
case VAL_Angle:
|
||||
ValueType = VAL_Float;
|
||||
break;
|
||||
|
||||
case VAL_Object:
|
||||
case VAL_Class:
|
||||
|
|
|
@ -72,7 +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;
|
||||
const int SXF_TRANSFERSPRITEFRAME = 1 << 24;
|
||||
|
||||
// Flags for A_Chase
|
||||
const int CHF_FASTCHASE = 1;
|
||||
|
|
Loading…
Reference in a new issue