r5437 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 7 07:48:49 EST 2009
Author: div0
Date: 2009-01-07 07:48:48 -0500 (Wed, 07 Jan 2009)
New Revision: 5437
Modified:
trunk/data/qcsrc/server/clientcommands.qc
Log:
try to make it use the default value of a cvar if it is not defined (sentcvar)
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2009-01-07 11:43:20 UTC (rev 5436)
+++ trunk/data/qcsrc/server/clientcommands.qc 2009-01-07 12:48:48 UTC (rev 5437)
@@ -265,8 +265,18 @@
stuffcmd(self,"menu_showteamselect\n");
}
} else if(argv(0) == "reportcvar") { // old system
+ if(substring(argv(2), 0, 1) == "$") // undefined cvar: use the default value on the server then
+ {
+ s = strcat(substring(s, argv_start_index(0), argv_end_index(1)), " \"", cvar_defstring(argv(1)), "\"");
+ tokens = tokenize_sane(s);
+ }
GetCvars(1);
} else if(argv(0) == "sentcvar") { // new system
+ if(tokens == 2) // undefined cvar: use the default value on the server then
+ {
+ s = strcat(substring(s, argv_start_index(0), argv_end_index(1)), " \"", cvar_defstring(argv(1)), "\"");
+ tokens = tokenize_sane(s);
+ }
GetCvars(1);
} else if(argv(0) == "spectate") {
if not(self.flags & FL_CLIENT)
More information about the nexuiz-commits
mailing list