]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Unset damagedbycontents for respawn ghosts
authorterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 08:18:59 +0000 (10:18 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 2 Jun 2020 08:18:59 +0000 (10:18 +0200)
qcsrc/server/client.qc

index c7ba841e6f92ee0e694ab53f3ca9ac406037de03..9632397f50e9898c2f2e3ad3b2b4eac3180ade42 100644 (file)
@@ -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);