Commit e741a7b3 by James R.

Actually save the cvar name in demos

parent 7ec0b6c7
......@@ -1627,7 +1627,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
Setvalue(cvar, svalue, stealth);
void CV_SaveNetVars(UINT8 **p)
void CV_SaveVars(UINT8 **p, boolean in_demo)
consvar_t *cvar;
UINT8 *count_p = *p;
......@@ -1639,7 +1639,10 @@ void CV_SaveNetVars(UINT8 **p)
for (cvar = consvar_vars; cvar; cvar = cvar->next)
if ((cvar->flags & CV_NETVAR) && !CV_IsSetToDefault(cvar))
WRITEUINT16(*p, cvar->netid);
if (in_demo)
WRITESTRING(*p, cvar->name);
WRITEUINT16(*p, cvar->netid);
WRITESTRING(*p, cvar->string);
WRITEUINT8(*p, false);
......@@ -197,9 +197,12 @@ void CV_AddValue(consvar_t *var, INT32 increment);
void CV_SaveVariables(FILE *f);
// load/save gamesate (load and save option and for network join in game)
void CV_SaveNetVars(UINT8 **p);
void CV_SaveVars(UINT8 **p, boolean in_demo);
#define CV_SaveNetVars(p) CV_SaveVars(p, false)
void CV_LoadNetVars(UINT8 **p);
#define CV_SaveDemoVars(p) CV_SaveVars(p, true)
void CV_LoadDemoVars(UINT8 **p);
......@@ -1525,7 +1525,7 @@ void G_BeginRecording(void)
// Save netvar data
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment