From: terencehill Date: Tue, 2 Jun 2020 08:18:59 +0000 (+0200) Subject: Unset damagedbycontents for respawn ghosts X-Git-Tag: xonotic-v0.8.5~966 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5e227b8f7931c8e205e982c575f9a6d55237d4be;p=xonotic%2Fxonotic-data.pk3dir.git Unset damagedbycontents for respawn ghosts --- 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);