mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-10 17:50:48 +00:00
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:
parent
0824c53967
commit
28134aca63
1 changed files with 2 additions and 2 deletions
|
@ -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
|
//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,
|
//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.
|
//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))))
|
if (!strcmp(Cmd_Argv(i), Cvar_VariableString(Cmd_Argv(1))))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1)))
|
if (Q_atof(Cmd_Argv(i)) == Cvar_VariableValue(Cmd_Argv(1)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue