}
}
+ 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;