Update of /cvsroot/jake2/jake2/src/jake2/qcommon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20033/src/jake2/qcommon
Modified Files:
Tag: r_0_9_4
Cvar.java
Log Message:
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.
Index: Cvar.java
===================================================================
RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Cvar.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -d -r1.7 -r1.7.2.1
*** Cvar.java 8 Feb 2005 18:00:02 -0000 1.7
--- Cvar.java 24 May 2005 23:43:38 -0000 1.7.2.1
***************
*** 295,298 ****
--- 295,305 ----
* ============ 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);
|