mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 11:11:16 +00:00
- fixed: The GC must mark the SprInSect actor lists
This commit is contained in:
parent
2b3b7f880f
commit
d03e890833
2 changed files with 12 additions and 0 deletions
|
@ -73,6 +73,7 @@ IMPLEMENT_POINTERS_END
|
|||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
void MarkSprInSect();
|
||||
|
||||
size_t DBloodActor::PropagateMark()
|
||||
{
|
||||
|
@ -90,6 +91,7 @@ static void markgcroots()
|
|||
GC::MarkArray(gSightSpritesList, gSightSpritesCount);
|
||||
GC::MarkArray(gPhysSpritesList, gPhysSpritesCount);
|
||||
GC::MarkArray(gImpactSpritesList, gImpactSpritesCount);
|
||||
MarkSprInSect();
|
||||
for (auto& pl : gPlayer)
|
||||
{
|
||||
GC::Mark(pl.actor);
|
||||
|
@ -594,6 +596,7 @@ void GameInterface::loadPalette(void)
|
|||
void GameInterface::app_init()
|
||||
{
|
||||
GC::AddMarkerFunc(markgcroots);
|
||||
|
||||
InitCheats();
|
||||
memcpy(&gGameOptions, &gSingleGameOptions, sizeof(GAMEOPTIONS));
|
||||
gGameOptions.nMonsterSettings = !userConfig.nomonsters;
|
||||
|
|
|
@ -55,6 +55,10 @@ public:
|
|||
void Init(int nDist = kWallDist); // used in trInit to collect the sprites before translation
|
||||
void Serialize(FSerializer& pSave);
|
||||
TArray<TObjPtr<DBloodActor*>>* GetSprPtr(int nSector);
|
||||
void Mark()
|
||||
{
|
||||
for (auto& entry : db) GC::MarkArray(entry.pActors);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
@ -65,6 +69,11 @@ public:
|
|||
// --------------------------------------------------------------------------
|
||||
SPRINSECT gSprNSect;
|
||||
|
||||
void MarkSprInSect()
|
||||
{
|
||||
gSprNSect.Mark();
|
||||
}
|
||||
|
||||
void SPRINSECT::Init(int nDist)
|
||||
{
|
||||
Free();
|
||||
|
|
Loading…
Reference in a new issue