r4152 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Aug 23 05:48:16 EDT 2008
Author: div0
Date: 2008-08-23 05:48:04 -0400 (Sat, 23 Aug 2008)
New Revision: 4152
Modified:
trunk/data/qcsrc/client/Main.qc
Log:
new command: cl_cmd settemp cvarname value (sets a cvar; the value is reset on csqc unload, that is, map change or disconnect)
DO NOT USE THIS YET. It is going to be used for replacing the existing mapname.cfg file in the long term.
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-08-23 08:13:53 UTC (rev 4151)
+++ trunk/data/qcsrc/client/Main.qc 2008-08-23 09:48:04 UTC (rev 4152)
@@ -98,6 +98,10 @@
remove(teams);
remove(players);
db_close(configdb);
+
+ entity e;
+ for(e = world; (e = find(e, classname, "saved_cvar_value")); )
+ cvar_set(e.netname, e.message);
}
.float has_team;
@@ -239,6 +243,18 @@
Cmd_MapVote_MapDownload(argc);
return true;
}
+ else if(cmd == "settemp") {
+ entity e;
+ for(e = world; (e = find(e, classname, "saved_cvar_value")); )
+ if(e.netname == argv(1))
+ goto saved;
+ e = spawn();
+ e.classname = "saved_cvar_value";
+ e.netname = strzone(argv(1));
+ e.message = strzone(cvar_string(argv(1)));
+:saved
+ cvar_set(argv(1), argv(2));
+ }
return false;
}
More information about the nexuiz-commits
mailing list