From: terencehill Date: Wed, 4 May 2016 13:48:59 +0000 (+0200) Subject: Improve respawn timer when max respawn delay is higher than respawn delay X-Git-Tag: xonotic-v0.8.2~886^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d3c9fbdc6504956f3952f5c9e2def108d6a86b1a;p=xonotic%2Fxonotic-data.pk3dir.git Improve respawn timer when max respawn delay is higher than respawn delay --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 208f53723..9c19574f2 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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; }