diff options
author | Carsten Weisse <[email protected]> | 2005-05-24 23:43:38 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-05-24 23:43:38 +0000 |
commit | 5ad2a1ea7113b1c4a9163b9517af1d103fb153a7 (patch) | |
tree | 8af43ac0cd1e018c9675cb2640a7cbec0ce52435 /src/jake2 | |
parent | fe1b511023a0d866979dc8c91c5a2a63ce825d13 (diff) |
bugfix: this simple overloading solves a hidden client-server problem.
The network "rate" string (userinfo) became 0 after parsing an interger,
because 25000 became "25000.0" and that wasn't parseable.
see: Integer.parseInt("25000.0")
The server was dropping a lot of client packages
by setting it's network rate to a minimum.
Diffstat (limited to 'src/jake2')
-rw-r--r-- | src/jake2/qcommon/Cvar.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jake2/qcommon/Cvar.java b/src/jake2/qcommon/Cvar.java index d14cadd..4ad4eb6 100644 --- a/src/jake2/qcommon/Cvar.java +++ b/src/jake2/qcommon/Cvar.java @@ -2,7 +2,7 @@ * Cvar.java * Copyright (C) 2003 * - * $Id: Cvar.java,v 1.7 2005-02-08 18:00:02 cawe Exp $ + * $Id: Cvar.java,v 1.7.2.1 2005-05-24 23:43:38 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -294,6 +294,13 @@ public class Cvar extends Globals { /* * ============ Cvar_SetValue ============ */ + // the overloading is very important + // there was a problem with networt "rate" string + // 10000 became "10000.0" and that wasn't right + public static void SetValue(String var_name, int value) { + Cvar.Set(var_name, "" + value); + } + public static void SetValue(String var_name, float value) { Cvar.Set(var_name, "" + value); } |