]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 9d5be4c80f3cb432d32fd3939aedd59327bbb6e8..a2e5caab1fcc4d86271288aa75590c8cfdc4d43d 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 c8717f0058afdbf92e8bd703edb5f8c20d8a7fed..86ed86da1d9e7b73f77e2baa77a9f69a87265b40 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)