mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-05 23:58:19 +00:00
Show /spec tees with a dashed skin
This commit is contained in:
parent
80f19b789a
commit
f3466e05ba
BIN
data/skins/x_spec.png
Normal file
BIN
data/skins/x_spec.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -340,7 +340,7 @@ void CGhost::OnRender()
|
||||||
Player.m_AttackTick += Client()->GameTick(g_Config.m_ClDummy) - GhostTick;
|
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->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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ void CNamePlates::OnRender()
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
{
|
{
|
||||||
// only render active characters
|
// 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;
|
continue;
|
||||||
|
|
||||||
const void *pInfo = Client()->SnapFindItem(IClient::SNAP_CURRENT, NETOBJTYPE_PLAYERINFO, i);
|
const void *pInfo = Client()->SnapFindItem(IClient::SNAP_CURRENT, NETOBJTYPE_PLAYERINFO, i);
|
||||||
|
|
|
@ -164,6 +164,7 @@ void CPlayers::RenderPlayer(
|
||||||
const CNetObj_Character *pPlayerChar,
|
const CNetObj_Character *pPlayerChar,
|
||||||
const CTeeRenderInfo *pRenderInfo,
|
const CTeeRenderInfo *pRenderInfo,
|
||||||
int ClientID,
|
int ClientID,
|
||||||
|
bool Active,
|
||||||
float Intra
|
float Intra
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -278,6 +279,7 @@ void CPlayers::RenderPlayer(
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw gun
|
// draw gun
|
||||||
|
if(Active)
|
||||||
{
|
{
|
||||||
#if defined(CONF_VIDEORECORDER)
|
#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)))))
|
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++)
|
for(int i = 0; i < MAX_CLIENTS; i++)
|
||||||
{
|
{
|
||||||
// only render active characters
|
// 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;
|
continue;
|
||||||
|
|
||||||
const void *pPrevInfo = Client()->SnapFindItem(IClient::SNAP_PREV, NETOBJTYPE_PLAYERINFO, i);
|
const void *pPrevInfo = Client()->SnapFindItem(IClient::SNAP_PREV, NETOBJTYPE_PLAYERINFO, i);
|
||||||
|
@ -665,7 +667,6 @@ void CPlayers::OnRender()
|
||||||
|
|
||||||
if(pPrevInfo && pInfo)
|
if(pPrevInfo && pInfo)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
bool Local = m_pClient->m_Snap.m_LocalClientID == i;
|
bool Local = m_pClient->m_Snap.m_LocalClientID == i;
|
||||||
if((p % 2) == 0 && Local) continue;
|
if((p % 2) == 0 && Local) continue;
|
||||||
if((p % 2) == 1 && !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 PrevChar = m_pClient->m_aClients[i].m_RenderPrev;
|
||||||
CNetObj_Character CurChar = m_pClient->m_aClients[i].m_RenderCur;
|
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)
|
if(p<2)
|
||||||
{
|
{
|
||||||
RenderHook(
|
RenderHook(
|
||||||
|
@ -688,7 +705,8 @@ void CPlayers::OnRender()
|
||||||
&PrevChar,
|
&PrevChar,
|
||||||
&CurChar,
|
&CurChar,
|
||||||
&m_aRenderInfo[i],
|
&m_aRenderInfo[i],
|
||||||
i
|
i,
|
||||||
|
m_pClient->m_Snap.m_aCharacters[i].m_Active
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ class CPlayers : public CComponent
|
||||||
const CNetObj_Character *pPlayerChar,
|
const CNetObj_Character *pPlayerChar,
|
||||||
const CTeeRenderInfo *pRenderInfo,
|
const CTeeRenderInfo *pRenderInfo,
|
||||||
int ClientID,
|
int ClientID,
|
||||||
|
bool Active,
|
||||||
float Intra = 0.f
|
float Intra = 0.f
|
||||||
);
|
);
|
||||||
void RenderHook(
|
void RenderHook(
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
static const char *VANILLA_SKINS[] = {"bluekitty", "bluestripe", "brownbear",
|
static const char *VANILLA_SKINS[] = {"bluekitty", "bluestripe", "brownbear",
|
||||||
"cammo", "cammostripes", "coala", "default", "limekitty",
|
"cammo", "cammostripes", "coala", "default", "limekitty",
|
||||||
"pinky", "redbopp", "redstripe", "saddo", "toptri",
|
"pinky", "redbopp", "redstripe", "saddo", "toptri",
|
||||||
"twinbop", "twintri", "warpaint", "x_ninja"};
|
"twinbop", "twintri", "warpaint", "x_ninja", "x_spec"};
|
||||||
|
|
||||||
static bool IsVanillaSkin(const char *pName)
|
static bool IsVanillaSkin(const char *pName)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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_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(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(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(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")
|
MACRO_CONFIG_INT(UiToolboxPage, ui_toolbox_page, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Toolbox page")
|
||||||
|
|
Loading…
Reference in a new issue