From 5e227b8f7931c8e205e982c575f9a6d55237d4be Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 2 Jun 2020 10:18:59 +0200 Subject: [PATCH] Unset damagedbycontents for respawn ghosts --- qcsrc/server/client.qc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index c7ba841e6..9632397f5 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1323,12 +1323,14 @@ void UpdateChatBubble(entity this) void respawn(entity this) { + int damagedbycontents_prev = this.damagedbycontents; if(this.alpha >= 0) { if(autocvar_g_respawn_ghosts) { this.solid = SOLID_NOT; this.takedamage = DAMAGE_NO; + this.damagedbycontents = false; set_movetype(this, MOVETYPE_FLY); this.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed; this.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3; @@ -1343,6 +1345,7 @@ void respawn(entity this) } CopyBody(this, 1); + this.damagedbycontents = damagedbycontents_prev; this.effects |= EF_NODRAW; // prevent another CopyBody PutClientInServer(this); -- 2.39.2