diff --git a/data/skins/x_spec.png b/data/skins/x_spec.png new file mode 100644 index 000000000..a397e8274 Binary files /dev/null and b/data/skins/x_spec.png differ diff --git a/src/game/client/components/ghost.cpp b/src/game/client/components/ghost.cpp index 2c4595853..874245c24 100644 --- a/src/game/client/components/ghost.cpp +++ b/src/game/client/components/ghost.cpp @@ -340,7 +340,7 @@ void CGhost::OnRender() Player.m_AttackTick += Client()->GameTick(g_Config.m_ClDummy) - GhostTick; m_pClient->m_pPlayers->RenderHook(&Prev, &Player, &pGhost->m_RenderInfo , -2, IntraTick); - m_pClient->m_pPlayers->RenderPlayer(&Prev, &Player, &pGhost->m_RenderInfo, -2, IntraTick); + m_pClient->m_pPlayers->RenderPlayer(&Prev, &Player, &pGhost->m_RenderInfo, -2, true, IntraTick); } } diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp index d54bac789..4967a743d 100644 --- a/src/game/client/components/nameplates.cpp +++ b/src/game/client/components/nameplates.cpp @@ -159,7 +159,7 @@ void CNamePlates::OnRender() for(int i = 0; i < MAX_CLIENTS; i++) { // only render active characters - if(!m_pClient->m_Snap.m_aCharacters[i].m_Active) + if(!m_pClient->m_Snap.m_aCharacters[i].m_Active && !g_Config.m_ClShowSpecTee) continue; const void *pInfo = Client()->SnapFindItem(IClient::SNAP_CURRENT, NETOBJTYPE_PLAYERINFO, i); diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index 5a369dc94..3da9527af 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -164,6 +164,7 @@ void CPlayers::RenderPlayer( const CNetObj_Character *pPlayerChar, const CTeeRenderInfo *pRenderInfo, int ClientID, + bool Active, float Intra ) { @@ -278,6 +279,7 @@ void CPlayers::RenderPlayer( } // draw gun + if(Active) { #if defined(CONF_VIDEORECORDER) if(ClientID >= 0 && ((GameClient()->m_GameInfo.m_AllowHookColl && g_Config.m_ClShowHookCollAlways) || (Player.m_PlayerFlags&PLAYERFLAG_AIM && ((!Local && ((!IVideo::Current()&&g_Config.m_ClShowHookCollOther)||(IVideo::Current()&&g_Config.m_ClVideoShowHookCollOther))) || (Local && g_Config.m_ClShowHookCollOwn))))) @@ -657,7 +659,7 @@ void CPlayers::OnRender() for(int i = 0; i < MAX_CLIENTS; i++) { // only render active characters - if(!m_pClient->m_Snap.m_aCharacters[i].m_Active) + if(!m_pClient->m_Snap.m_aCharacters[i].m_Active && !g_Config.m_ClShowSpecTee) continue; const void *pPrevInfo = Client()->SnapFindItem(IClient::SNAP_PREV, NETOBJTYPE_PLAYERINFO, i); @@ -665,7 +667,6 @@ void CPlayers::OnRender() if(pPrevInfo && pInfo) { - // bool Local = m_pClient->m_Snap.m_LocalClientID == i; if((p % 2) == 0 && Local) continue; if((p % 2) == 1 && !Local) continue; @@ -673,6 +674,22 @@ void CPlayers::OnRender() CNetObj_Character PrevChar = m_pClient->m_aClients[i].m_RenderPrev; CNetObj_Character CurChar = m_pClient->m_aClients[i].m_RenderCur; + if(!m_pClient->m_Snap.m_aCharacters[i].m_Active) + { + int Skin = m_pClient->m_pSkins->Find("x_spec"); + if(Skin != -1) + { + if(IsTeamplay) + m_aRenderInfo[i].m_Texture = m_pClient->m_pSkins->Get(Skin)->m_ColorTexture; + else + { + m_aRenderInfo[i].m_Texture = m_pClient->m_pSkins->Get(Skin)->m_OrgTexture; + m_aRenderInfo[i].m_ColorBody = ColorRGBA(1,1,1); + m_aRenderInfo[i].m_ColorFeet = ColorRGBA(1,1,1); + } + } + } + if(p<2) { RenderHook( @@ -688,7 +705,8 @@ void CPlayers::OnRender() &PrevChar, &CurChar, &m_aRenderInfo[i], - i + i, + m_pClient->m_Snap.m_aCharacters[i].m_Active ); } } diff --git a/src/game/client/components/players.h b/src/game/client/components/players.h index 4a73e4f12..a7c159671 100644 --- a/src/game/client/components/players.h +++ b/src/game/client/components/players.h @@ -15,6 +15,7 @@ class CPlayers : public CComponent const CNetObj_Character *pPlayerChar, const CTeeRenderInfo *pRenderInfo, int ClientID, + bool Active, float Intra = 0.f ); void RenderHook( diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp index fb8265776..9723cd9f2 100644 --- a/src/game/client/components/skins.cpp +++ b/src/game/client/components/skins.cpp @@ -15,7 +15,7 @@ static const char *VANILLA_SKINS[] = {"bluekitty", "bluestripe", "brownbear", "cammo", "cammostripes", "coala", "default", "limekitty", "pinky", "redbopp", "redstripe", "saddo", "toptri", - "twinbop", "twintri", "warpaint", "x_ninja"}; + "twinbop", "twintri", "warpaint", "x_ninja", "x_spec"}; static bool IsVanillaSkin(const char *pName) { diff --git a/src/game/variables.h b/src/game/variables.h index a8f9840f1..a5e88a111 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -90,6 +90,8 @@ MACRO_CONFIG_STR(ClPlayerSkin, player_skin, 24, "default", CFGFLAG_CLIENT|CFGFLA MACRO_CONFIG_STR(ClSkinPrefix, cl_skin_prefix, 100, "", CFGFLAG_CLIENT|CFGFLAG_SAVE, "Replace the skins by skins with this prefix (e.g. kitty, coala, santa)") MACRO_CONFIG_INT(ClFatSkins, cl_fat_skins, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Enable fat skins") +MACRO_CONFIG_INT(ClShowSpecTee, cl_show_spec_tee, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Whether to show a tee in /spec with a dashed skin.") + MACRO_CONFIG_INT(UiPage, ui_page, 9, 0, 12, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface page") MACRO_CONFIG_INT(UiSettingsPage, ui_settings_page, 0, 0, 8, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Interface settings page") MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")