mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-15 01:56:51 +00:00
Revert netvars after demo finishes playback
(Demos do not call CL_Reset BTW.)
This commit is contained in:
parent
e07fb31f72
commit
4c9c54e44e
2 changed files with 5 additions and 2 deletions
|
|
@ -1679,6 +1679,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 || demo.playback);
|
||||
|
||||
consvar_t *cvar;
|
||||
UINT16 count;
|
||||
|
||||
|
|
@ -1692,7 +1694,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 );
|
||||
|
|
|
|||
|
|
@ -2409,7 +2409,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;
|
||||
|
|
@ -3184,6 +3183,8 @@ void SV_ResetServer(void)
|
|||
// clear server_context
|
||||
memset(server_context, '-', 8);
|
||||
|
||||
CV_RevertNetVars();
|
||||
|
||||
DEBFILE("\n-=-=-=-=-=-=-= Server Reset =-=-=-=-=-=-=-\n\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue