mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-22 01:11:49 +00:00
- removed a few missed references in FLevelLocals's member functions.
This commit is contained in:
parent
4af5ea25c1
commit
1b37d85ac3
3 changed files with 9 additions and 7 deletions
|
@ -1410,7 +1410,7 @@ FPlayerStart *FLevelLocals::SelectFarthestDeathmatchSpot (size_t selections)
|
|||
if (distance > bestdistance)
|
||||
{
|
||||
bestdistance = distance;
|
||||
bestspot = &level.deathmatchstarts[i];
|
||||
bestspot = &deathmatchstarts[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1425,7 +1425,7 @@ FPlayerStart *FLevelLocals::SelectRandomDeathmatchSpot (int playernum, unsigned
|
|||
for (j = 0; j < 20; j++)
|
||||
{
|
||||
i = pr_dmspawn() % selections;
|
||||
if (CheckSpot (playernum, &level.deathmatchstarts[i]) )
|
||||
if (CheckSpot (playernum, &deathmatchstarts[i]) )
|
||||
{
|
||||
return &deathmatchstarts[i];
|
||||
}
|
||||
|
@ -1526,7 +1526,7 @@ FPlayerStart *FLevelLocals::PickPlayerStart(int playernum, int flags)
|
|||
unsigned int i;
|
||||
|
||||
// Find all unblocked player starts.
|
||||
for (i = 0; i < level.AllPlayerStarts.Size(); ++i)
|
||||
for (i = 0; i < AllPlayerStarts.Size(); ++i)
|
||||
{
|
||||
if (CheckSpot(playernum, &AllPlayerStarts[i]))
|
||||
{
|
||||
|
@ -1539,7 +1539,7 @@ FPlayerStart *FLevelLocals::PickPlayerStart(int playernum, int flags)
|
|||
}
|
||||
}
|
||||
// Pick a spot at random, whether it's open or not.
|
||||
return &level.AllPlayerStarts[pr_pspawn(AllPlayerStarts.Size())];
|
||||
return &AllPlayerStarts[pr_pspawn(AllPlayerStarts.Size())];
|
||||
}
|
||||
return &playerstarts[playernum];
|
||||
}
|
||||
|
@ -1568,7 +1568,7 @@ DEFINE_ACTION_FUNCTION(FLevelLocals, PickPlayerStart)
|
|||
void FLevelLocals::QueueBody (AActor *body)
|
||||
{
|
||||
// flush an old corpse if needed
|
||||
int modslot = bodyqueslot%level.BODYQUESIZE;
|
||||
int modslot = bodyqueslot % BODYQUESIZE;
|
||||
bodyqueslot = modslot + 1;
|
||||
|
||||
if (bodyqueslot >= BODYQUESIZE && bodyque[modslot] != NULL)
|
||||
|
@ -1620,7 +1620,7 @@ void FLevelLocals::DoReborn (int playernum, bool freshbot)
|
|||
{ // Reload the level from scratch
|
||||
bool indemo = demoplayback;
|
||||
BackupSaveName = "";
|
||||
G_InitNew (level.MapName, false);
|
||||
G_InitNew (MapName, false);
|
||||
demoplayback = indemo;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ CUSTOM_CVAR(Int, gl_lightmode, 3, CVAR_ARCHIVE | CVAR_NOINITCALL)
|
|||
if (self != newself) self = newself;
|
||||
else for (auto Level : AllLevels())
|
||||
{
|
||||
if ((level.info == nullptr || level.info->lightmode == ELightMode::NotSet)) level.lightMode = (ELightMode)*self;
|
||||
if ((Level->info == nullptr || Level->info->lightmode == ELightMode::NotSet)) Level->lightMode = (ELightMode)*self;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,8 @@ typedef TMap<FName, int> FDialogueMap; // maps actor class names to dialogue
|
|||
|
||||
struct FLevelLocals
|
||||
{
|
||||
void *level;
|
||||
void *Level; // bug catchers.
|
||||
FLevelLocals() : Behaviors(this), tagManager(this) {}
|
||||
|
||||
friend class MapLoader;
|
||||
|
|
Loading…
Reference in a new issue