]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Improve respawn timer when max respawn delay is higher than respawn delay 319/head
authorterencehill <piuntn@gmail.com>
Wed, 4 May 2016 13:48:59 +0000 (15:48 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 4 May 2016 13:48:59 +0000 (15:48 +0200)
qcsrc/server/cl_client.qc

index 208f53723d95925f06c0efea3b393b56f258b2b1..9c19574f2bbdc8e30d830fd1242772df9345d3af 100644 (file)
@@ -2250,7 +2250,12 @@ void PlayerPreThink ()
                                if (this.respawn_flags & RESPAWN_SILENT)
                                        STAT(RESPAWN_TIME, this) = 0;
                                else if ((this.respawn_flags & RESPAWN_FORCE) && this.respawn_time < this.respawn_time_max)
-                                       STAT(RESPAWN_TIME, this) = this.respawn_time_max;
+                               {
+                                       if (time < this.respawn_time)
+                                               STAT(RESPAWN_TIME, this) = this.respawn_time;
+                                       else if (this.deadflag != DEAD_RESPAWNING)
+                                               STAT(RESPAWN_TIME, this) = -this.respawn_time_max;
+                               }
                                else
                                        STAT(RESPAWN_TIME, this) = this.respawn_time;
                        }