Skip to content

Commit

Permalink
make nosave cvars set their value bypassing network code
Browse files Browse the repository at this point in the history
This may look as a workaround, it is not.

nosave cvars are meant to be used as a storage for statistical data that doesn't
affect gameplay. That's why this data isn't saved to the savefile in the first
place. Therefore, there is no point in sending this data over network. It would
have no meaning on machines other than local.
  • Loading branch information
mmaulwurff authored and coelckers committed Jan 14, 2020
1 parent efd2f8a commit f85e3fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/console/c_cvars.cpp
Expand Up @@ -191,7 +191,14 @@ void FBaseCVar::SetGenericRep (UCVarValue value, ECVarType type)
Flags &= ~CVAR_UNSAFECONTEXT;
return;
}
D_SendServerInfoChange (this, value, type);
if (Flags & CVAR_NOSAVEGAME)
{
ForceSet (value, type);
}
else
{
D_SendServerInfoChange (this, value, type);
}
}
else
{
Expand Down

0 comments on commit f85e3fb

Please sign in to comment.