Merge branch 'public_next'

This commit is contained in:
Monster Iestyn 2019-06-22 22:44:42 +01:00
commit ce6db1cc9c
3 changed files with 16 additions and 6 deletions

View File

@ -4100,7 +4100,7 @@ static void Command_ExitLevel_f(void)
CONS_Printf(M_GetText("This only works in a netgame.\n"));
else if (!(server || (IsPlayerAdmin(consoleplayer))))
CONS_Printf(M_GetText("Only the server or a remote admin can use this.\n"));
else if (gamestate != GS_LEVEL || demoplayback)
else if (( gamestate != GS_LEVEL && gamestate != GS_CREDITS ) || demoplayback)
CONS_Printf(M_GetText("You must be in a level to use this.\n"));
else
SendNetXCmd(XD_EXITLEVEL, NULL, 0);

View File

@ -15,6 +15,7 @@
#include "console.h"
#include "d_main.h"
#include "d_player.h"
#include "d_clisrv.h"
#include "f_finale.h"
#include "p_setup.h"
#include "p_saveg.h"
@ -1847,7 +1848,9 @@ boolean G_Responder(event_t *ev)
if (F_CreditResponder(ev))
{
F_StartGameEvaluation();
// Skip credits for everyone
if (!netgame || server || IsPlayerAdmin(consoleplayer))
SendNetXCmd(XD_EXITLEVEL, NULL, 0);
return true;
}
}
@ -2843,6 +2846,10 @@ void G_ExitLevel(void)
// Remove CEcho text on round end.
HU_ClearCEcho();
}
else if (gamestate == GS_CREDITS)
{
F_StartGameEvaluation();
}
}
// See also the enum GameType in doomstat.h

View File

@ -578,14 +578,14 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
{
CONS_Alert(CONS_ERROR, "Failed to read central directory (%s)\n", strerror(ferror(handle)));
Z_Free(lumpinfo);
free(zentry);
free(zentries);
return NULL;
}
if (memcmp(zentry->signature, pat_central, 4))
{
CONS_Alert(CONS_ERROR, "Central directory is corrupt\n");
Z_Free(lumpinfo);
free(zentry);
free(zentries);
return NULL;
}
@ -598,7 +598,7 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
{
CONS_Alert(CONS_ERROR, "Unable to read lumpname (%s)\n", strerror(ferror(handle)));
Z_Free(lumpinfo);
free(zentry);
free(zentries);
free(fullname);
return NULL;
}
@ -640,6 +640,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp)
}
}
free(zentries);
*nlmp = numlumps;
return lumpinfo;
}
@ -1306,8 +1308,9 @@ size_t W_ReadLumpHeaderPwad(UINT16 wad, UINT16 lump, void *dest, size_t size, si
{
size = 0;
zerr(zErr);
(void)inflateEnd(&strm);
}
(void)inflateEnd(&strm);
}
else
{