From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 04:25:58 +0000 (+0200) Subject: prevent darkplaces from interpolating the respawn angle by delaying respawn by one... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94c9f0e9fbda44bd324e489628f813a320799dd7;p=xonotic%2Fxonotic-data.pk3dir.git prevent darkplaces from interpolating the respawn angle by delaying respawn by one frame --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 0a8846d5d..609f309d6 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1439,7 +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) { bool damagedbycontents_prev = this.damagedbycontents; @@ -1467,7 +1467,25 @@ void respawn(entity this) this.damagedbycontents = damagedbycontents_prev; this.effects |= EF_NODRAW; // prevent another CopyBody - PutClientInServer(this); + entity e = spawn(); + e.enemy = this; + e.count = 0; + setthink(e, delay_respawn); + e.nextthink = time; +} + +// prevent darkplaces from interpolating the respawn angle by delaying respawn by one frame +void delay_respawn(entity this) +{ + if(!this.count) + { + this.nextthink = time; + ++this.count; + return; + } + + PutClientInServer(this.enemy); + delete(this); } void play_countdown(entity this, float finished, Sound samp)