From: Mario Date: Mon, 13 Feb 2017 07:54:14 +0000 (+1000) Subject: Add a hidden option to allow checkpoints to not count as a cheat X-Git-Tag: xonotic-v0.8.2~217 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c83b9028da08927310b92252cc01ccd92860ab87;p=xonotic%2Fxonotic-data.pk3dir.git Add a hidden option to allow checkpoints to not count as a cheat --- diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 631f38227..421de5373 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -131,6 +131,7 @@ spawnfunc(info_autoscreenshot) // this one just has to exist } +bool autocvar_g_allow_checkpoints; float CheatImpulse(entity this, int imp) { BEGIN_CHEAT_FUNCTION(); @@ -185,7 +186,8 @@ float CheatImpulse(entity this, int imp) CheatCommand(this, tokenize_console("give all")); break; // already counted as cheat case CHIMPULSE_SPEEDRUN.impulse: - IS_CHEAT(this, imp, 0, 0); + if(!autocvar_g_allow_checkpoints) + IS_CHEAT(this, imp, 0, 0); if(this.personal) { this.speedrunning = true;