MCPcopy Create free account
hub / github.com/ZDoom/Raze / InitSpriteLists

Function InitSpriteLists

source/core/actorlist.cpp:461–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459//==========================================================================
460
461void InitSpriteLists()
462{
463 // Do not mass-destroy from the iterator. This may fail if destroying one actor results in further destructions.
464 TArray<DCoreActor*> allActors;
465 TSpriteIterator<DCoreActor> it;
466 while (auto actor = it.Next())
467 allActors.Push(actor);
468
469 // clear all lists manually before doing any mass destruction.
470 // This may also be called in error situations where the list has become corrupted,
471 // so we should not depend on its consistency anymore.
472 for (auto& stat : statList)
473 {
474 stat.firstEntry = stat.lastEntry = nullptr;
475 }
476 for (auto& sect: sector)
477 {
478 sect.firstEntry = sect.lastEntry = nullptr;
479 }
480
481 for (auto& act : allActors)
482 {
483 if (!(act->ObjectFlags & OF_EuthanizeMe))
484 {
485 act->link_stat = INT_MAX;
486 act->prevStat = act->nextStat = act->prevSect = act->nextSect = nullptr;
487 act->Destroy();
488 }
489 }
490 Numsprites = 0;
491}
492
493//==========================================================================
494//

Callers 5

spawnactorsFunction · 0.85
spawnactorsFunction · 0.85
spawnactorsFunction · 0.85
SpawnActorsFunction · 0.85
FreeLevelDataMethod · 0.85

Calls 3

NextMethod · 0.45
PushMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected