Add a new respawn flag which denies respawning
authorMario <mario@smbclan.net>
Sat, 25 Mar 2017 15:16:58 +0000 (01:16 +1000)
committerMario <mario@smbclan.net>
Sat, 25 Mar 2017 15:16:58 +0000 (01:16 +1000)
qcsrc/server/client.qc
qcsrc/server/constants.qh

index 9d5be4c..a2e5caa 100644 (file)
@@ -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)
index c8717f0..86ed86d 100644 (file)
@@ -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)