Change Cvar_Cycle_f to use Q_atof to be consistent with other cvar code. Q_atof("0.3"), a float, does not == atof("0.3"), a double.

Fixes "cycle r_wateralpha 0.3 0.6 1" not working reported by AAS.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@969 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2014-08-18 17:12:39 +00:00
parent 0824c53967
commit 28134aca63

View file

@ -145,14 +145,14 @@ void Cvar_Cycle_f (void)
//zero is assumed to be a string, even though it could actually be zero. The worst case
//is that the first time you call this command, it won't match on zero when it should, but after that,
//it will be comparing strings that all had the same source (the user) so it will work.
if (atof(Cmd_Argv(i)) == 0)
if (Q_atof(Cmd_Argv(i)) == 0)
{
if (!strcmp(Cmd_Argv(i), Cvar_VariableString(Cmd_Argv(1))))
break;
}
else
{
if (atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1)))
if (Q_atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1)))
break;
}
}