From 648b5476cb51084b9c629c001dee126da64a717c Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 26 Mar 2017 01:16:58 +1000 Subject: [PATCH] Add a new respawn flag which denies respawning --- qcsrc/server/client.qc | 7 +++++++ qcsrc/server/constants.qh | 1 + 2 files changed, 8 insertions(+) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 9d5be4c80..a2e5caab1 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2381,6 +2381,13 @@ void PlayerPreThink (entity this) } } else { if (frametime) player_anim(this); + + if (this.respawn_flags & RESPAWN_DENY) + { + STAT(RESPAWN_TIME, this) = 0; + return; + } + bool button_pressed = (PHYS_INPUT_BUTTON_ATCK(this) || PHYS_INPUT_BUTTON_JUMP(this) || PHYS_INPUT_BUTTON_ATCK2(this) || PHYS_INPUT_BUTTON_HOOK(this) || PHYS_INPUT_BUTTON_USE(this)); switch(this.deadflag) diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh index c8717f005..86ed86da1 100644 --- a/qcsrc/server/constants.qh +++ b/qcsrc/server/constants.qh @@ -12,6 +12,7 @@ const int SVC_SETVIEW = 5; const int RESPAWN_FORCE = 1; const int RESPAWN_SILENT = 2; +const int RESPAWN_DENY = 4; #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT) -- 2.39.2