From: Mario Date: Sat, 25 Mar 2017 15:16:58 +0000 (+1000) Subject: Add a new respawn flag which denies respawning X-Git-Tag: xonotic-v0.8.2~26 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=648b5476cb51084b9c629c001dee126da64a717c;p=xonotic%2Fxonotic-data.pk3dir.git Add a new respawn flag which denies respawning --- 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)