- do not allow sv_gravity to be INF
This commit is contained in:
parent
3780c5910a
commit
0d612553a4
1 changed files with 4 additions and 0 deletions
|
|
@ -149,6 +149,10 @@ FRandom pr_spawnmissile("SpawnMissile");
|
|||
|
||||
CUSTOM_CVAR (Float, sv_gravity, 800.f, CVAR_SERVERINFO|CVAR_NOSAVE|CVAR_NOINITCALL)
|
||||
{
|
||||
// test NAN and INF
|
||||
if (((double)self != (double)self) || isinf((double)self))
|
||||
sv_gravity = 800.f;
|
||||
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
Level->gravity = self;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue