mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-29 07:22:05 +00:00
This commit is contained in:
commit
5cbe829c05
5 changed files with 29 additions and 16 deletions
|
@ -142,21 +142,25 @@ void DCorpsePointer::OnDestroy ()
|
|||
TThinkerIterator<DCorpsePointer> iterator (STAT_CORPSEPOINTER);
|
||||
DCorpsePointer *first = iterator.Next ();
|
||||
|
||||
int prevCount = first->Count;
|
||||
|
||||
if (first == this)
|
||||
// During a serialization unwind the thinker list won't be available.
|
||||
if (first != nullptr)
|
||||
{
|
||||
first = iterator.Next ();
|
||||
}
|
||||
int prevCount = first->Count;
|
||||
|
||||
if (first != NULL)
|
||||
{
|
||||
first->Count = prevCount - 1;
|
||||
}
|
||||
if (first == this)
|
||||
{
|
||||
first = iterator.Next();
|
||||
}
|
||||
|
||||
if (first != NULL)
|
||||
{
|
||||
first->Count = prevCount - 1;
|
||||
}
|
||||
|
||||
}
|
||||
if (Corpse != NULL)
|
||||
{
|
||||
Corpse->Destroy ();
|
||||
Corpse->Destroy();
|
||||
}
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
|
|
@ -156,6 +156,7 @@ FRandom::FRandom ()
|
|||
#endif
|
||||
Next = RNGList;
|
||||
RNGList = this;
|
||||
Init(0);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -199,6 +200,7 @@ FRandom::FRandom (const char *name)
|
|||
|
||||
Next = probe;
|
||||
*prev = this;
|
||||
Init(0);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -3532,7 +3532,14 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|
|||
|| ((mo->flags6 & MF6_NOBOSSRIP) && (BlockingMobj->flags2 & MF2_BOSS))) && (BlockingMobj->flags2 & MF2_REFLECTIVE))
|
||||
|| ((BlockingMobj->player == NULL) && (!(BlockingMobj->flags3 & MF3_ISMONSTER)))))
|
||||
{
|
||||
if (mo->bouncecount > 0 && --mo->bouncecount == 0) return false;
|
||||
if (mo->bouncecount>0 && --mo->bouncecount == 0)
|
||||
{
|
||||
if (mo->flags & MF_MISSILE)
|
||||
P_ExplodeMissile(mo, nullptr, nullptr);
|
||||
else
|
||||
mo->CallDie(nullptr, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mo->flags7 & MF7_HITTARGET) mo->target = BlockingMobj;
|
||||
if (mo->flags7 & MF7_HITMASTER) mo->master = BlockingMobj;
|
||||
|
|
|
@ -63,7 +63,7 @@ static bool R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool
|
|||
|
||||
if (frame >= MAX_SPRITE_FRAMES || rotation > 16)
|
||||
{
|
||||
Printf (TEXTCOLOR_RED"R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars());
|
||||
Printf (TEXTCOLOR_RED "R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1217,9 +1217,8 @@ static void ParseDamageDefinition(FScanner &sc)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ParseDecorate (FScanner &sc)
|
||||
void ParseDecorate (FScanner &sc, PNamespace *ns)
|
||||
{
|
||||
auto ns = Namespaces.NewNamespace(sc.LumpNum);
|
||||
// Get actor class name.
|
||||
for(;;)
|
||||
{
|
||||
|
@ -1245,7 +1244,7 @@ void ParseDecorate (FScanner &sc)
|
|||
}
|
||||
FScanner newscanner;
|
||||
newscanner.Open(sc.String);
|
||||
ParseDecorate(newscanner);
|
||||
ParseDecorate(newscanner, ns);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1308,6 +1307,7 @@ void ParseAllDecorate()
|
|||
while ((lump = Wads.FindLump("DECORATE", &lastlump)) != -1)
|
||||
{
|
||||
FScanner sc(lump);
|
||||
ParseDecorate(sc);
|
||||
auto ns = Namespaces.NewNamespace(sc.LumpNum);
|
||||
ParseDecorate(sc, ns);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue