about summary refs log tree commit diff
path: root/src/game/client/components/effects.cpp
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-11-24 01:11:56 +0100
committeroy <Tom_Adams@web.de>2010-11-24 01:11:56 +0100
commite6698b111873e5c8584343eb511aa40c7052f99b (patch)
treef140b5f801bd65a69adada60b55b3bf34e30a47b /src/game/client/components/effects.cpp
parentbc5f3fc8396c7521bd261bc4ef69e52f6d91af12 (diff)
downloadzcatch-e6698b111873e5c8584343eb511aa40c7052f99b.tar.gz
zcatch-e6698b111873e5c8584343eb511aa40c7052f99b.zip
apply custom colour to blood colour. Closes #314
Diffstat (limited to 'src/game/client/components/effects.cpp')
-rw-r--r--src/game/client/components/effects.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/game/client/components/effects.cpp b/src/game/client/components/effects.cpp
index 79117d30..45dd856e 100644
--- a/src/game/client/components/effects.cpp
+++ b/src/game/client/components/effects.cpp
@@ -1,6 +1,7 @@
 /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
 /* If you are missing that file, acquire a complete release at teeworlds.com.                */
 #include <engine/demo.h>
+#include <engine/shared/config.h>
 
 #include <game/generated/client_data.h>
 
@@ -153,9 +154,14 @@ void CEffects::PlayerDeath(vec2 Pos, int Cid)
 
 	if(Cid >= 0)	
 	{
-		const CSkins::CSkin *s = m_pClient->m_pSkins->Get(m_pClient->m_aClients[Cid].m_SkinId);
-		if(s)
-			BloodColor = s->m_BloodColor;
+		if(g_Config.m_PlayerUseCustomColor)
+			BloodColor = m_pClient->m_pSkins->GetColorV3(g_Config.m_PlayerColorBody);
+		else
+		{
+			const CSkins::CSkin *s = m_pClient->m_pSkins->Get(m_pClient->m_aClients[Cid].m_SkinId);
+			if(s)
+				BloodColor = s->m_BloodColor;
+		}
 	}
 	
 	for(int i = 0; i < 64; i++)