From: Samual Date: Tue, 12 Jul 2011 04:31:55 +0000 (-0400) Subject: Merge remote branch 'origin/master' into samual/updatecommands X-Git-Tag: xonotic-v0.6.0~188^2~28^2~328 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=8b3142364603ea77d9514d20be020370102da9fc;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/master' into samual/updatecommands --- 8b3142364603ea77d9514d20be020370102da9fc diff --cc qcsrc/server/gamecommand.qc index ff7231395,9fce6368c..839703132 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@@ -626,18 -627,77 +627,87 @@@ void make_mapinfo_Think( } } + void changematchtime(float delta, float mi, float ma) + { + float cur; + float new; + float lim; + + if(delta == 0) + return; + if(autocvar_timelimit < 0) + return; + + if(mi <= 10) + mi = 10; // at least ten sec in the future + cur = time - game_starttime; + if(cur > 0) + mi += cur; // from current time! + + lim = autocvar_timelimit * 60; + + if(delta > 0) + { + if(lim == 0) + return; // cannot increase any further + else if(lim < ma) + new = min(ma, lim + delta); + else // already above maximum: FAIL + return; + } + else + { + if(lim == 0) // infinite: try reducing to max, if we are allowed to + new = max(mi, ma); + else if(lim > mi) // above minimum: decrease + new = max(mi, lim + delta); + else // already below minimum: FAIL + return; + } + + cvar_set("timelimit", ftos(new / 60)); + } + + float g_clientmodel_genericsendentity (entity to, float sf); + void modelbug_make_svqc(); + void modelbug_make_csqc() + { + Net_LinkEntity(self, TRUE, 0, g_clientmodel_genericsendentity); + self.think = modelbug_make_svqc; + self.nextthink = time + 1; + setorigin(self, self.origin - '0 0 8'); + } + void modelbug_make_svqc() + { + self.SendEntity = func_null; + self.think = modelbug_make_csqc; + self.nextthink = time + 1; + setorigin(self, self.origin + '0 0 8'); + } + + void modelbug() + { + entity e; + e = spawn(); + setorigin(e, nextent(world).origin); + precache_model("models_portal.md3"); + setmodel(e, "models/portal.md3"); + e.think = modelbug_make_svqc; + e.nextthink = time + 1; + } + void GameCommand(string command) { + // ===== TODO list ===== + // Update the help/command list to actually show all the commands + + // Re-order all the commands in alphabetical order -- or in some other easily recognizable order ;3 (if possible) + + // Add extra help to each command when used improperly + + // Add ifdef to stuffto so that is can only be used when the game code is compiled for it + //(this way it's more obscure and harder to abuse on normal servers) + float argc; entity client, e; vector v;