From 4cbf2f47d4f2efdf12ea4526dec0befbdcb04c78 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 4 Jun 2012 11:06:37 +0200 Subject: [PATCH] break "defer" command while connected (still works when idle or in demo playback) --- cmd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index 4d615f1a..095f8f22 100644 --- a/cmd.c +++ b/cmd.c @@ -93,7 +93,11 @@ static void Cmd_Defer_f (void) Mem_Free(cmd->value); Mem_Free(cmd); } - } else if(Cmd_Argc() == 3) + } else if(Cmd_Argc() == 3 +#ifdef ANTICHEAT + && (cls.state != ca_connected || cls.demoplayback) +#endif + ) { const char *value = Cmd_Argv(2); cmddeferred_t *defcmd = (cmddeferred_t*)Mem_Alloc(tempmempool, sizeof(*defcmd)); @@ -117,6 +121,9 @@ static void Cmd_Defer_f (void) cmd_deferred_list = defcmd;*/ } else { Con_Printf("usage: defer \n" +#ifdef ANTICHEAT + " (only works while not connected)\n" +#endif " defer clear\n"); return; } @@ -379,6 +386,9 @@ void Cbuf_Execute (void) void Cbuf_Frame(void) { +#ifdef ANTICHEAT + if(cls.state != ca_connected || cls.demoplayback) +#endif Cbuf_Execute_Deferred(); if (cmd_text.cursize) { -- 2.39.2