This commit is contained in:
Rachael Alexanderson 2017-01-27 11:33:05 -05:00
commit 5cbe829c05
5 changed files with 29 additions and 16 deletions

View File

@ -142,11 +142,14 @@ void DCorpsePointer::OnDestroy ()
TThinkerIterator<DCorpsePointer> iterator (STAT_CORPSEPOINTER);
DCorpsePointer *first = iterator.Next ();
// During a serialization unwind the thinker list won't be available.
if (first != nullptr)
{
int prevCount = first->Count;
if (first == this)
{
first = iterator.Next ();
first = iterator.Next();
}
if (first != NULL)
@ -154,9 +157,10 @@ void DCorpsePointer::OnDestroy ()
first->Count = prevCount - 1;
}
}
if (Corpse != NULL)
{
Corpse->Destroy ();
Corpse->Destroy();
}
Super::OnDestroy();
}

View File

@ -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);
}
//==========================================================================

View File

@ -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;

View File

@ -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;
}

View File

@ -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);
}
}