mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-22 15:47:19 +00:00
- fixed: The wbstartstruct that gets passed to the level summary screen needs to be static
This variable is needed long after the function which sets it up will be exited. So this either needs to be dynamically allocated or static, and in this case using a static variable is simpler. However, unlike before, it is only being accessed in the one function that needs to initialize it and pass to the summary screen and nowhere else. # Conflicts: # src/g_level.cpp
This commit is contained in:
parent
2b51e8d5dd
commit
4a563f449d
2 changed files with 4 additions and 2 deletions
|
@ -736,6 +736,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, SecretExitLevel, G_SecretExitLevel)
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
static wbstartstruct_t wminfo;
|
||||
|
||||
void G_DoCompleted (void)
|
||||
{
|
||||
|
@ -766,7 +767,6 @@ void G_DoCompleted (void)
|
|||
if (automapactive)
|
||||
AM_Stop ();
|
||||
|
||||
wbstartstruct_t wminfo; // parms for world map / intermission
|
||||
|
||||
uint32_t langtable[2] = {};
|
||||
wminfo.finished_ep = level.cluster - 1;
|
||||
|
@ -780,6 +780,7 @@ void G_DoCompleted (void)
|
|||
{
|
||||
wminfo.next = level.MapName;
|
||||
wminfo.LName1 = wminfo.LName0;
|
||||
wminfo.nextname = wminfo.thisname;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -794,7 +795,7 @@ void G_DoCompleted (void)
|
|||
{
|
||||
wminfo.next = nextinfo->MapName;
|
||||
wminfo.LName1 = TexMan.CheckForTexture(nextinfo->PName, ETextureType::MiscPatch);
|
||||
wminfo.nextname = info->LookupLevelName(&langtable[1]);
|
||||
wminfo.nextname = nextinfo->LookupLevelName(&langtable[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ struct wbstartstruct_t
|
|||
int pnum;
|
||||
|
||||
wbplayerstruct_t plyr[MAXPLAYERS];
|
||||
|
||||
};
|
||||
|
||||
// Intermission stats.
|
||||
|
|
Loading…
Reference in a new issue