mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 03:11:03 +00:00
Prevent just anyone from skipping credits but allow admins
exitlevel works too
This commit is contained in:
parent
b5a1030722
commit
d00cc7cddb
2 changed files with 9 additions and 2 deletions
|
@ -4015,7 +4015,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);
|
||||
|
|
|
@ -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"
|
||||
|
@ -1873,7 +1874,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;
|
||||
}
|
||||
}
|
||||
|
@ -2690,6 +2693,10 @@ void G_ExitLevel(void)
|
|||
// Remove CEcho text on round end.
|
||||
HU_ClearCEcho();
|
||||
}
|
||||
else if (gamestate == GS_CREDITS)
|
||||
{
|
||||
F_StartGameEvaluation();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue