Don't try cheater warning if NULL netvar

This commit is contained in:
Sally Coolatta 2022-09-27 16:16:04 -04:00
parent 6a37c1962f
commit b7bfa5a5c7

View file

@ -1773,11 +1773,13 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
cvar = ReadNetVar(p, &svalue, &stealth);
if (cvar)
{
Setvalue(cvar, svalue, stealth);
if ((cvar->flags & CV_CHEAT) && stricmp(cvar->string, cvar->defaultvalue) != 0) // use cvar->string to compare what it is now
{
CV_CheaterWarning(playernum, va("%s %s", cvar->name, svalue)); // but use svalue to show what they inputted
if ((cvar->flags & CV_CHEAT) && stricmp(cvar->string, cvar->defaultvalue) != 0) // use cvar->string to compare what it is now
{
CV_CheaterWarning(playernum, va("%s %s", cvar->name, svalue)); // but use svalue to show what they inputted
}
}
}