From: Rudolf Polzer Date: Thu, 27 Oct 2011 08:00:48 +0000 (+0200) Subject: CopyBody: unlink the color from the player slot when cloning X-Git-Tag: xonotic-v0.6.0~35^2~78^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85c3ccb68b2ca1d79c378ffba18f505da1b06637;p=xonotic%2Fxonotic-data.pk3dir.git CopyBody: unlink the color from the player slot when cloning --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 4e302e364..71bf53a61 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1968,7 +1968,9 @@ void respawn(void) self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3; self.effects |= EF_ADDITIVE; self.oldcolormap = self.colormap; - self.colormap = 512; + self.colormap = 512; // FIXME this colormap value is ILLEGAL: + // Con_DPrintf("CL_ValidateState: colormap (%i) > cl.maxclients (%i)\n", s->colormap, cl.maxclients); + // I think you want to use 0 pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1); if(autocvar_g_respawn_ghosts_maxtime) SUB_SetFade (self, time + autocvar_g_respawn_ghosts_maxtime / 2 + random () * (autocvar_g_respawn_ghosts_maxtime - autocvar_g_respawn_ghosts_maxtime / 2), 1.5); diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index f9fb0aa61..532b67aef 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -186,6 +186,9 @@ void CopyBody(float keepvelocity) Drag_MoveDrag(oldself, self); + if(self.colormap <= maxclients && self.colormap > 0) + self.colormap = 1024 + self.clientcolors; + self = oldself; }