mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 06:00:45 +00:00
Revert netvars after demo finishes playback
(Demos do not call CL_Reset BTW.)
This commit is contained in:
parent
e24fe29114
commit
e30d4f954b
2 changed files with 5 additions and 2 deletions
|
@ -1738,6 +1738,8 @@ void CV_SaveVars(UINT8 **p, boolean in_demo)
|
|||
static void CV_LoadVars(UINT8 **p,
|
||||
consvar_t *(*got)(UINT8 **p, char **ret_value, boolean *ret_stealth))
|
||||
{
|
||||
const boolean store = (client || demoplayback);
|
||||
|
||||
consvar_t *cvar;
|
||||
UINT16 count;
|
||||
|
||||
|
@ -1751,7 +1753,7 @@ static void CV_LoadVars(UINT8 **p,
|
|||
{
|
||||
if (cvar->flags & CV_NETVAR)
|
||||
{
|
||||
if (client && cvar->revert.v.string == NULL)
|
||||
if (store && cvar->revert.v.string == NULL)
|
||||
{
|
||||
cvar->revert.v.const_munge = cvar->string;
|
||||
cvar->revert.allocated = ( cvar->zstring != NULL );
|
||||
|
|
|
@ -2599,7 +2599,6 @@ void CL_Reset(void)
|
|||
doomcom->numslots = 1;
|
||||
SV_StopServer();
|
||||
SV_ResetServer();
|
||||
CV_RevertNetVars();
|
||||
|
||||
// make sure we don't leave any fileneeded gunk over from a failed join
|
||||
fileneedednum = 0;
|
||||
|
@ -3231,6 +3230,8 @@ void SV_ResetServer(void)
|
|||
// clear server_context
|
||||
memset(server_context, '-', 8);
|
||||
|
||||
CV_RevertNetVars();
|
||||
|
||||
DEBFILE("\n-=-=-=-=-=-=-= Server Reset =-=-=-=-=-=-=-\n\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue