From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 04:35:02 +0000 (+0200) Subject: use last frame time instead of a counter for respawn delay X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df1a62ae4fe792d1c6e3466bae2ef44960e9c0aa;p=xonotic%2Fxonotic-data.pk3dir.git use last frame time instead of a counter for respawn delay --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 609f309d6..2bbaf2490 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1439,6 +1439,7 @@ void calculate_player_respawn_time(entity this) else if (c == 13) this.colormod = '0.10 0.10 1.73'; else this.colormod = '1 1 1'; }*/ + void delay_respawn(entity this); void respawn(entity this) { @@ -1469,7 +1470,7 @@ void respawn(entity this) this.effects |= EF_NODRAW; // prevent another CopyBody entity e = spawn(); e.enemy = this; - e.count = 0; + e.count = time; setthink(e, delay_respawn); e.nextthink = time; } @@ -1477,10 +1478,9 @@ void respawn(entity this) // prevent darkplaces from interpolating the respawn angle by delaying respawn by one frame void delay_respawn(entity this) { - if(!this.count) + if(this.count <= time) { this.nextthink = time; - ++this.count; return; }