From d3c9fbdc6504956f3952f5c9e2def108d6a86b1a Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 4 May 2016 15:48:59 +0200 Subject: [PATCH] Improve respawn timer when max respawn delay is higher than respawn delay --- qcsrc/server/cl_client.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.2