From: Rudolf Polzer <divverent@alientrap.org>
Date: Mon, 9 Jan 2012 18:13:33 +0000 (+0100)
Subject: Revert "Fix colormap with copybody (so now, ghost bodies of dead players retain the... 
X-Git-Tag: xonotic-v0.6.0~188^2~10
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c37b5e66493181888bc8c5ec2dfeeb2bdf3794b;p=xonotic%2Fxonotic-data.pk3dir.git

Revert "Fix colormap with copybody (so now, ghost bodies of dead players retain the player color instead of going white)"

This reverts commit a939674ad9b0e6b62ad9c3eb44ebc8b1d91b6792.
---

diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc
index d0001b9d39..78bffdc9e5 100644
--- a/qcsrc/server/cl_client.qc
+++ b/qcsrc/server/cl_client.qc
@@ -1752,6 +1752,7 @@ void UpdateChatBubble()
 	else self.colormod = '1 1 1';
 }*/
 
+.float oldcolormap;
 void respawn(void)
 {
 	if(self.alpha >= 0 && autocvar_g_respawn_ghosts)
@@ -1762,7 +1763,7 @@ void respawn(void)
 		self.velocity = '0 0 1' * autocvar_g_respawn_ghosts_speed;
 		self.avelocity = randomvec() * autocvar_g_respawn_ghosts_speed * 3 - randomvec() * autocvar_g_respawn_ghosts_speed * 3;
 		self.effects |= EF_ADDITIVE;
-		self.oldcolormap = self.colormap; // saved for copybody to use later
+		self.oldcolormap = self.colormap;
 		self.colormap = 0; // this originally was 512, but raises a warning in the engine, so get rid of it
 		pointparticles(particleeffectnum("respawn_ghost"), self.origin, '0 0 0', 1);
 		if(autocvar_g_respawn_ghosts_maxtime)
@@ -1771,13 +1772,11 @@ void respawn(void)
 
 	CopyBody(1);
 	self.effects |= EF_NODRAW; // prevent another CopyBody
-	
-	if(self.oldcolormap) // reset it so that when they respawn it'll be back to normal
+	if(self.oldcolormap)
 	{
 		self.colormap = self.oldcolormap;
 		self.oldcolormap = 0;
 	}
-	
 	PutClientInServer();
 }
 
diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc
index e4415d6314..5de1be4bc3 100644
--- a/qcsrc/server/cl_player.qc
+++ b/qcsrc/server/cl_player.qc
@@ -124,8 +124,6 @@ void WeaponStats_LogKill(float awep, float abot, float vwep, float vbot)
 .entity pusher;
 .float pushltime;
 
-.float oldcolormap; // also used in cl_client.c:void respawn(void)
-
 .float CopyBody_nextthink;
 .void(void) CopyBody_think;
 void CopyBody_Think(void)
@@ -151,7 +149,7 @@ void CopyBody(float keepvelocity)
 	self = spawn();
 	self.enemy = oldself;
 	self.lip = oldself.lip;
-	self.colormap = oldself.oldcolormap;
+	self.colormap = oldself.colormap;
 	self.iscreature = oldself.iscreature;
 	self.damagedbycontents = oldself.damagedbycontents;
 	self.angles = oldself.angles;