]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Replace autocvar_g_respawn_delay_max check with a more correct one
authorterencehill <piuntn@gmail.com>
Tue, 3 May 2016 22:32:07 +0000 (00:32 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 3 May 2016 22:32:07 +0000 (00:32 +0200)
qcsrc/server/cl_client.qc

index c157530fa7d39b9cbbb1e7597ce03aba5db0aa58..208f53723d95925f06c0efea3b393b56f258b2b1 100644 (file)
@@ -2222,7 +2222,7 @@ void PlayerPreThink ()
                                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));
 
                                if (this.deadflag == DEAD_DYING) {
-                                       if ((this.respawn_flags & RESPAWN_FORCE) && !autocvar_g_respawn_delay_max) {
+                                       if ((this.respawn_flags & RESPAWN_FORCE) && !(this.respawn_time < this.respawn_time_max)) {
                                                this.deadflag = DEAD_RESPAWNING;
                                        } else if (!button_pressed) {
                                                this.deadflag = DEAD_DEAD;
@@ -2249,7 +2249,7 @@ void PlayerPreThink ()
 
                                if (this.respawn_flags & RESPAWN_SILENT)
                                        STAT(RESPAWN_TIME, this) = 0;
-                               else if ((this.respawn_flags & RESPAWN_FORCE) && autocvar_g_respawn_delay_max)
+                               else if ((this.respawn_flags & RESPAWN_FORCE) && this.respawn_time < this.respawn_time_max)
                                        STAT(RESPAWN_TIME, this) = this.respawn_time_max;
                                else
                                        STAT(RESPAWN_TIME, this) = this.respawn_time;