mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 17:11:33 +00:00
Merge remote-tracking branch 'public/master' into next
This commit is contained in:
commit
ef35084d95
6 changed files with 11 additions and 16 deletions
|
@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D)
|
||||||
|
|
||||||
static void DumpString(const TString* s, DumpState* D)
|
static void DumpString(const TString* s, DumpState* D)
|
||||||
{
|
{
|
||||||
if (s==NULL || getstr(s)==NULL)
|
if (s==NULL)
|
||||||
{
|
{
|
||||||
size_t size=0;
|
size_t size=0;
|
||||||
DumpVar(size,D);
|
DumpVar(size,D);
|
||||||
|
|
|
@ -4575,7 +4575,7 @@ void Command_Retry_f(void)
|
||||||
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
|
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
|
||||||
else if (netgame || multiplayer)
|
else if (netgame || multiplayer)
|
||||||
CONS_Printf(M_GetText("This only works in single player.\n"));
|
CONS_Printf(M_GetText("This only works in single player.\n"));
|
||||||
else if (!&players[consoleplayer] || players[consoleplayer].lives <= 1)
|
else if (players[consoleplayer].lives <= 1)
|
||||||
CONS_Printf(M_GetText("You can't retry without any lives remaining!\n"));
|
CONS_Printf(M_GetText("You can't retry without any lives remaining!\n"));
|
||||||
else if (G_IsSpecialStage(gamemap))
|
else if (G_IsSpecialStage(gamemap))
|
||||||
CONS_Printf(M_GetText("You can't retry special stages!\n"));
|
CONS_Printf(M_GetText("You can't retry special stages!\n"));
|
||||||
|
|
|
@ -712,9 +712,9 @@ lumpinfo_t *getdirectoryfiles(const char *path, UINT16 *nlmp, UINT16 *nfolders)
|
||||||
// Close any open directories and return if something went wrong.
|
// Close any open directories and return if something went wrong.
|
||||||
if (failure)
|
if (failure)
|
||||||
{
|
{
|
||||||
|
for (; depthleft < maxdirdepth; closedir(dirhandle[depthleft++]));
|
||||||
free(dirpathindex);
|
free(dirpathindex);
|
||||||
free(dirhandle);
|
free(dirhandle);
|
||||||
for (; depthleft < maxdirdepth; closedir(dirhandle[depthleft++]));
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
src/m_menu.c
15
src/m_menu.c
|
@ -3686,17 +3686,12 @@ void M_StartControlPanel(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT32 numlives = 2;
|
INT32 numlives = players[consoleplayer].lives;
|
||||||
|
if (players[consoleplayer].playerstate != PST_LIVE)
|
||||||
|
++numlives;
|
||||||
|
|
||||||
SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA) && !marathonmode) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
|
SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA) && !marathonmode) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
|
||||||
|
|
||||||
if (&players[consoleplayer])
|
|
||||||
{
|
|
||||||
numlives = players[consoleplayer].lives;
|
|
||||||
if (players[consoleplayer].playerstate != PST_LIVE)
|
|
||||||
++numlives;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The list of things that can disable retrying is (was?) a little too complex
|
// The list of things that can disable retrying is (was?) a little too complex
|
||||||
// for me to want to use the short if statement syntax
|
// for me to want to use the short if statement syntax
|
||||||
if (numlives <= 1 || G_IsSpecialStage(gamemap))
|
if (numlives <= 1 || G_IsSpecialStage(gamemap))
|
||||||
|
@ -3754,7 +3749,7 @@ void M_StartControlPanel(void)
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
MPauseMenu[mpause_switchteam].status = IT_STRING | IT_SUBMENU;
|
MPauseMenu[mpause_switchteam].status = IT_STRING | IT_SUBMENU;
|
||||||
else if (G_GametypeHasSpectators())
|
else if (G_GametypeHasSpectators())
|
||||||
MPauseMenu[((&players[consoleplayer] && players[consoleplayer].spectator) ? mpause_entergame : mpause_spectate)].status = IT_STRING | IT_CALL;
|
MPauseMenu[players[consoleplayer].spectator ? mpause_entergame : mpause_spectate].status = IT_STRING | IT_CALL;
|
||||||
else // in this odd case, we still want something to be on the menu even if it's useless
|
else // in this odd case, we still want something to be on the menu even if it's useless
|
||||||
MPauseMenu[mpause_spectate].status = IT_GRAYEDOUT;
|
MPauseMenu[mpause_spectate].status = IT_GRAYEDOUT;
|
||||||
}
|
}
|
||||||
|
@ -7014,7 +7009,7 @@ static void M_RetryResponse(INT32 ch)
|
||||||
if (ch != 'y' && ch != KEY_ENTER)
|
if (ch != 'y' && ch != KEY_ENTER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!&players[consoleplayer] || netgame || multiplayer) // Should never happen!
|
if (netgame || multiplayer) // Should never happen!
|
||||||
return;
|
return;
|
||||||
|
|
||||||
M_ClearMenus(true);
|
M_ClearMenus(true);
|
||||||
|
|
|
@ -836,7 +836,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
|
||||||
else
|
else
|
||||||
snprintf(lvlttltext, 48, "Unknown");
|
snprintf(lvlttltext, 48, "Unknown");
|
||||||
|
|
||||||
if (gamestate == GS_LEVEL && &players[displayplayer] && players[displayplayer].mo)
|
if (gamestate == GS_LEVEL && players[displayplayer].mo)
|
||||||
snprintf(locationtxt, 40, "X:%d Y:%d Z:%d A:%d",
|
snprintf(locationtxt, 40, "X:%d Y:%d Z:%d A:%d",
|
||||||
players[displayplayer].mo->x>>FRACBITS,
|
players[displayplayer].mo->x>>FRACBITS,
|
||||||
players[displayplayer].mo->y>>FRACBITS,
|
players[displayplayer].mo->y>>FRACBITS,
|
||||||
|
|
|
@ -644,8 +644,6 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
||||||
lump_p->fullname = Z_Calloc(zentry.namelen + 1, PU_STATIC, NULL);
|
lump_p->fullname = Z_Calloc(zentry.namelen + 1, PU_STATIC, NULL);
|
||||||
strncpy(lump_p->fullname, fullname, zentry.namelen);
|
strncpy(lump_p->fullname, fullname, zentry.namelen);
|
||||||
|
|
||||||
free(fullname);
|
|
||||||
|
|
||||||
switch(zentry.compression)
|
switch(zentry.compression)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -665,6 +663,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(fullname);
|
||||||
|
|
||||||
// skip and ignore comments/extra fields
|
// skip and ignore comments/extra fields
|
||||||
if (fseek(handle, zentry.xtralen + zentry.commlen, SEEK_CUR) != 0)
|
if (fseek(handle, zentry.xtralen + zentry.commlen, SEEK_CUR) != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue