- added a level iterator for operations that need to make changes to all open levels.
Since currently there is only one level, this will obvciously only run once on that level for the time being. This is mainly used for CCMDs and CVARs which either print some diagnostics or change some user-settable configuration.
This commit is contained in:
parent
64e9f7e43b
commit
d941dea005
23 changed files with 198 additions and 126 deletions
|
|
@ -813,9 +813,10 @@ public:
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
void PrintSections(FSectionContainer &container)
|
||||
void PrintSections(FLevelLocals *Level)
|
||||
{
|
||||
auto Level = &level;
|
||||
FSectionContainer &container = Level->sections;
|
||||
Printf("Sections for %s\n", Level->MapName.GetChars());
|
||||
for (unsigned i = 0; i < container.allSections.Size(); i++)
|
||||
{
|
||||
auto §ion = container.allSections[i];
|
||||
|
|
@ -852,7 +853,7 @@ void PrintSections(FSectionContainer &container)
|
|||
}
|
||||
}
|
||||
}
|
||||
Printf(PRINT_LOG, "%d sectors, %d subsectors, %d sections\n", Level->sectors.Size(), Level->subsectors.Size(), container.allSections.Size());
|
||||
Printf(PRINT_LOG, "%d sectors, %d subsectors, %d sections\n\n", Level->sectors.Size(), Level->subsectors.Size(), container.allSections.Size());
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -876,7 +877,10 @@ void CreateSections(FLevelLocals *Level)
|
|||
|
||||
CCMD(printsections)
|
||||
{
|
||||
PrintSections(level.sections);
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
PrintSections(Level);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue