- 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
|
|
@ -147,7 +147,10 @@ FRandom pr_spawnmobj ("SpawnActor");
|
|||
|
||||
CUSTOM_CVAR (Float, sv_gravity, 800.f, CVAR_SERVERINFO|CVAR_NOSAVE)
|
||||
{
|
||||
level.gravity = self;
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
Level->gravity = self;
|
||||
}
|
||||
}
|
||||
|
||||
CVAR (Bool, cl_missiledecals, true, CVAR_ARCHIVE)
|
||||
|
|
@ -3021,9 +3024,11 @@ int FLevelLocals::FindUniqueTID(int start_tid, int limit)
|
|||
|
||||
CCMD(utid)
|
||||
{
|
||||
Printf("%d\n",
|
||||
level.FindUniqueTID(argv.argc() > 1 ? atoi(argv[1]) : 0,
|
||||
(argv.argc() > 2 && atoi(argv[2]) >= 0) ? atoi(argv[2]) : 0));
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
Printf("%s, %d\n", Level->MapName.GetChars(), Level->FindUniqueTID(argv.argc() > 1 ? atoi(argv[1]) : 0,
|
||||
(argv.argc() > 2 && atoi(argv[2]) >= 0) ? atoi(argv[2]) : 0));
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue