mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Make render m_Sixup an array for dummy
This commit is contained in:
parent
7cffdf40b6
commit
933a43bd0f
|
@ -390,7 +390,7 @@ public:
|
||||||
|
|
||||||
virtual int ClientVersion7() const = 0;
|
virtual int ClientVersion7() const = 0;
|
||||||
|
|
||||||
virtual void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId, int Conn) = 0;
|
virtual void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId) = 0;
|
||||||
virtual int OnDemoRecSnap7(class CSnapshot *pFrom, class CSnapshot *pTo, int Conn) = 0;
|
virtual int OnDemoRecSnap7(class CSnapshot *pFrom, class CSnapshot *pTo, int Conn) = 0;
|
||||||
virtual int TranslateSnap(class CSnapshot *pSnapDstSix, class CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) = 0;
|
virtual int TranslateSnap(class CSnapshot *pSnapDstSix, class CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -839,13 +839,13 @@ void CChat::AddLine(int ClientId, int Team, const char *pLine)
|
||||||
pCurrentLine->m_Sixup.m_aColors[Part] = vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
pCurrentLine->m_Sixup.m_aColors[Part] = vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LineAuthor.m_SkinInfo.m_Sixup.m_HatTexture.IsValid())
|
if(LineAuthor.m_SkinInfo.m_Sixup[g_Config.m_ClDummy].m_HatTexture.IsValid())
|
||||||
{
|
{
|
||||||
if(Part == protocol7::SKINPART_BODY && str_comp(pPartName, "standard"))
|
if(Part == protocol7::SKINPART_BODY && str_comp(pPartName, "standard"))
|
||||||
pCurrentLine->m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
pCurrentLine->m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
||||||
if(Part == protocol7::SKINPART_DECORATION && str_comp(pPartName, "twinbopp"))
|
if(Part == protocol7::SKINPART_DECORATION && str_comp(pPartName, "twinbopp"))
|
||||||
pCurrentLine->m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
pCurrentLine->m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
||||||
pCurrentLine->m_Sixup.m_HatTexture = LineAuthor.m_SkinInfo.m_Sixup.m_HatTexture;
|
pCurrentLine->m_Sixup.m_HatTexture = LineAuthor.m_SkinInfo.m_Sixup[g_Config.m_ClDummy].m_HatTexture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1303,10 +1303,10 @@ void CChat::OnRender()
|
||||||
{
|
{
|
||||||
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
||||||
{
|
{
|
||||||
RenderInfo.m_Sixup.m_aColors[Part] = Line.m_Sixup.m_aColors[Part];
|
RenderInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = Line.m_Sixup.m_aColors[Part];
|
||||||
RenderInfo.m_Sixup.m_aTextures[Part] = Line.m_Sixup.m_aTextures[Part];
|
RenderInfo.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = Line.m_Sixup.m_aTextures[Part];
|
||||||
RenderInfo.m_Sixup.m_HatSpriteIndex = Line.m_Sixup.m_HatSpriteIndex;
|
RenderInfo.m_Sixup[g_Config.m_ClDummy].m_HatSpriteIndex = Line.m_Sixup.m_HatSpriteIndex;
|
||||||
RenderInfo.m_Sixup.m_HatTexture = Line.m_Sixup.m_HatTexture;
|
RenderInfo.m_Sixup[g_Config.m_ClDummy].m_HatTexture = Line.m_Sixup.m_HatTexture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,13 +117,13 @@ void CMenus::RenderSettingsTee7(CUIRect MainView)
|
||||||
const CSkins7::CSkinPart *pSkinPart = m_pClient->m_Skins7.GetSkinPart(Part, SkinPart);
|
const CSkins7::CSkinPart *pSkinPart = m_pClient->m_Skins7.GetSkinPart(Part, SkinPart);
|
||||||
if(aUCCVars[Part])
|
if(aUCCVars[Part])
|
||||||
{
|
{
|
||||||
OwnSkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
OwnSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
||||||
OwnSkinInfo.m_Sixup.m_aColors[Part] = m_pClient->m_Skins7.GetColor(aColorVars[Part], Part == protocol7::SKINPART_MARKING);
|
OwnSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = m_pClient->m_Skins7.GetColor(aColorVars[Part], Part == protocol7::SKINPART_MARKING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OwnSkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
OwnSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
||||||
OwnSkinInfo.m_Sixup.m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
OwnSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,13 +169,13 @@ void CMenus::RenderSettingsTee7(CUIRect MainView)
|
||||||
const CSkins7::CSkinPart *pSkinPart = m_pClient->m_Skins7.GetSkinPart(Part, SkinPart);
|
const CSkins7::CSkinPart *pSkinPart = m_pClient->m_Skins7.GetSkinPart(Part, SkinPart);
|
||||||
if(aUCCVars[Part])
|
if(aUCCVars[Part])
|
||||||
{
|
{
|
||||||
TeamSkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
||||||
TeamSkinInfo.m_Sixup.m_aColors[Part] = m_pClient->m_Skins7.GetColor(aColorVars[Part], Part == protocol7::SKINPART_MARKING);
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = m_pClient->m_Skins7.GetColor(aColorVars[Part], Part == protocol7::SKINPART_MARKING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TeamSkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
||||||
TeamSkinInfo.m_Sixup.m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ void CMenus::RenderSettingsTee7(CUIRect MainView)
|
||||||
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
||||||
{
|
{
|
||||||
ColorRGBA TeamColor = m_pClient->m_Skins7.GetTeamColor(aUCCVars[Part], aColorVars[Part], TEAM_RED, Part);
|
ColorRGBA TeamColor = m_pClient->m_Skins7.GetTeamColor(aUCCVars[Part], aColorVars[Part], TEAM_RED, Part);
|
||||||
TeamSkinInfo.m_Sixup.m_aColors[Part] = TeamColor;
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = TeamColor;
|
||||||
}
|
}
|
||||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeamSkinInfo, 0, vec2(1, 0), vec2(TeeLeft.x + TeeLeft.w / 2.0f, TeeLeft.y + TeeLeft.h / 2.0f + 6.0f));
|
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeamSkinInfo, 0, vec2(1, 0), vec2(TeeLeft.x + TeeLeft.w / 2.0f, TeeLeft.y + TeeLeft.h / 2.0f + 6.0f));
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ void CMenus::RenderSettingsTee7(CUIRect MainView)
|
||||||
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
||||||
{
|
{
|
||||||
ColorRGBA TeamColor = m_pClient->m_Skins7.GetTeamColor(aUCCVars[Part], aColorVars[Part], TEAM_BLUE, Part);
|
ColorRGBA TeamColor = m_pClient->m_Skins7.GetTeamColor(aUCCVars[Part], aColorVars[Part], TEAM_BLUE, Part);
|
||||||
TeamSkinInfo.m_Sixup.m_aColors[Part] = TeamColor;
|
TeamSkinInfo.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = TeamColor;
|
||||||
}
|
}
|
||||||
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeamSkinInfo, 0, vec2(-1, 0), vec2(TeeRight.x + TeeRight.w / 2.0f, TeeRight.y + TeeRight.h / 2.0f + 6.0f));
|
RenderTools()->RenderTee(CAnimState::GetIdle(), &TeamSkinInfo, 0, vec2(-1, 0), vec2(TeeRight.x + TeeRight.w / 2.0f, TeeRight.y + TeeRight.h / 2.0f + 6.0f));
|
||||||
}
|
}
|
||||||
|
@ -409,13 +409,13 @@ void CMenus::RenderSkinSelection7(CUIRect MainView)
|
||||||
{
|
{
|
||||||
if(s->m_aUseCustomColors[Part])
|
if(s->m_aUseCustomColors[Part])
|
||||||
{
|
{
|
||||||
Info.m_Sixup.m_aTextures[Part] = s->m_apParts[Part]->m_ColorTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = s->m_apParts[Part]->m_ColorTexture;
|
||||||
Info.m_Sixup.m_aColors[Part] = m_pClient->m_Skins7.GetColor(s->m_aPartColors[Part], Part == protocol7::SKINPART_MARKING);
|
Info.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = m_pClient->m_Skins7.GetColor(s->m_aPartColors[Part], Part == protocol7::SKINPART_MARKING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info.m_Sixup.m_aTextures[Part] = s->m_apParts[Part]->m_OrgTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[Part] = s->m_apParts[Part]->m_OrgTexture;
|
||||||
Info.m_Sixup.m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
Info.m_Sixup[g_Config.m_ClDummy].m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,18 +498,18 @@ void CMenus::RenderSkinPartSelection7(CUIRect MainView)
|
||||||
if(*CSkins7::ms_apUCCVariables[(int)m_Dummy][j])
|
if(*CSkins7::ms_apUCCVariables[(int)m_Dummy][j])
|
||||||
{
|
{
|
||||||
if(m_TeePartSelected == j)
|
if(m_TeePartSelected == j)
|
||||||
Info.m_Sixup.m_aTextures[j] = s->m_ColorTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[j] = s->m_ColorTexture;
|
||||||
else
|
else
|
||||||
Info.m_Sixup.m_aTextures[j] = pSkinPart->m_ColorTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[j] = pSkinPart->m_ColorTexture;
|
||||||
Info.m_Sixup.m_aColors[j] = m_pClient->m_Skins7.GetColor(*CSkins7::ms_apColorVariables[(int)m_Dummy][j], j == protocol7::SKINPART_MARKING);
|
Info.m_Sixup[g_Config.m_ClDummy].m_aColors[j] = m_pClient->m_Skins7.GetColor(*CSkins7::ms_apColorVariables[(int)m_Dummy][j], j == protocol7::SKINPART_MARKING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(m_TeePartSelected == j)
|
if(m_TeePartSelected == j)
|
||||||
Info.m_Sixup.m_aTextures[j] = s->m_OrgTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[j] = s->m_OrgTexture;
|
||||||
else
|
else
|
||||||
Info.m_Sixup.m_aTextures[j] = pSkinPart->m_OrgTexture;
|
Info.m_Sixup[g_Config.m_ClDummy].m_aTextures[j] = pSkinPart->m_OrgTexture;
|
||||||
Info.m_Sixup.m_aColors[j] = vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
Info.m_Sixup[0].m_aColors[j] = vec4(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Info.m_Size = 50.0f;
|
Info.m_Size = 50.0f;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
void CPlayers::RenderHand(const CTeeRenderInfo *pInfo, vec2 CenterPos, vec2 Dir, float AngleOffset, vec2 PostRotOffset, float Alpha)
|
void CPlayers::RenderHand(const CTeeRenderInfo *pInfo, vec2 CenterPos, vec2 Dir, float AngleOffset, vec2 PostRotOffset, float Alpha)
|
||||||
{
|
{
|
||||||
if(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_BODY].IsValid())
|
if(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_BODY].IsValid())
|
||||||
RenderHand7(pInfo, CenterPos, Dir, AngleOffset, PostRotOffset, Alpha);
|
RenderHand7(pInfo, CenterPos, Dir, AngleOffset, PostRotOffset, Alpha);
|
||||||
else
|
else
|
||||||
RenderHand6(pInfo, CenterPos, Dir, AngleOffset, PostRotOffset, Alpha);
|
RenderHand6(pInfo, CenterPos, Dir, AngleOffset, PostRotOffset, Alpha);
|
||||||
|
@ -56,12 +56,12 @@ void CPlayers::RenderHand7(const CTeeRenderInfo *pInfo, vec2 CenterPos, vec2 Dir
|
||||||
HandPos += DirX * PostRotOffset.x;
|
HandPos += DirX * PostRotOffset.x;
|
||||||
HandPos += DirY * PostRotOffset.y;
|
HandPos += DirY * PostRotOffset.y;
|
||||||
|
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_aColors[protocol7::SKINPART_HANDS];
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_HANDS];
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
IGraphics::CQuadItem QuadOutline(HandPos.x, HandPos.y, 2 * BaseSize, 2 * BaseSize);
|
IGraphics::CQuadItem QuadOutline(HandPos.x, HandPos.y, 2 * BaseSize, 2 * BaseSize);
|
||||||
IGraphics::CQuadItem QuadHand = QuadOutline;
|
IGraphics::CQuadItem QuadHand = QuadOutline;
|
||||||
|
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_HANDS]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_HANDS]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
Graphics()->QuadsSetRotation(Angle);
|
Graphics()->QuadsSetRotation(Angle);
|
||||||
|
@ -842,7 +842,7 @@ void CPlayers::OnRender()
|
||||||
const auto *pSkin = m_pClient->m_Skins.FindOrNullptr("x_ninja");
|
const auto *pSkin = m_pClient->m_Skins.FindOrNullptr("x_ninja");
|
||||||
if(pSkin != nullptr)
|
if(pSkin != nullptr)
|
||||||
{
|
{
|
||||||
aRenderInfo[i].m_Sixup.Reset();
|
aRenderInfo[i].m_Sixup[g_Config.m_ClDummy].Reset();
|
||||||
|
|
||||||
aRenderInfo[i].m_OriginalRenderSkin = pSkin->m_OriginalSkin;
|
aRenderInfo[i].m_OriginalRenderSkin = pSkin->m_OriginalSkin;
|
||||||
aRenderInfo[i].m_ColorableRenderSkin = pSkin->m_ColorableSkin;
|
aRenderInfo[i].m_ColorableRenderSkin = pSkin->m_ColorableSkin;
|
||||||
|
|
|
@ -1527,7 +1527,7 @@ void CGameClient::OnNewSnapshot()
|
||||||
pClient->m_SkinInfo.m_ColorFeet = ColorRGBA(1, 1, 1);
|
pClient->m_SkinInfo.m_ColorFeet = ColorRGBA(1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
pClient->UpdateRenderInfo(IsTeamPlay());
|
pClient->UpdateRenderInfo(IsTeamPlay(), g_Config.m_ClDummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(Item.m_Type == NETOBJTYPE_PLAYERINFO)
|
else if(Item.m_Type == NETOBJTYPE_PLAYERINFO)
|
||||||
|
@ -2324,7 +2324,7 @@ void CGameClient::CClientStats::Reset()
|
||||||
m_FlagCaptures = 0;
|
m_FlagCaptures = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameClient::CClientData::UpdateRenderInfo(bool IsTeamPlay)
|
void CGameClient::CClientData::UpdateRenderInfo(bool IsTeamPlay, int Conn)
|
||||||
{
|
{
|
||||||
m_RenderInfo = m_SkinInfo;
|
m_RenderInfo = m_SkinInfo;
|
||||||
|
|
||||||
|
@ -2346,18 +2346,18 @@ void CGameClient::CClientData::UpdateRenderInfo(bool IsTeamPlay)
|
||||||
const ColorRGBA aMarkingColorsSixup[2] = {
|
const ColorRGBA aMarkingColorsSixup[2] = {
|
||||||
ColorRGBA(0.824f, 0.345f, 0.345f, 1.0f),
|
ColorRGBA(0.824f, 0.345f, 0.345f, 1.0f),
|
||||||
ColorRGBA(0.345f, 0.514f, 0.824f, 1.0f)};
|
ColorRGBA(0.345f, 0.514f, 0.824f, 1.0f)};
|
||||||
float MarkingAlpha = m_RenderInfo.m_Sixup.m_aColors[protocol7::SKINPART_MARKING].a;
|
float MarkingAlpha = m_RenderInfo.m_Sixup[Conn].m_aColors[protocol7::SKINPART_MARKING].a;
|
||||||
for(auto &Color : m_RenderInfo.m_Sixup.m_aColors)
|
for(auto &Color : m_RenderInfo.m_Sixup[Conn].m_aColors)
|
||||||
Color = aTeamColorsSixup[m_Team];
|
Color = aTeamColorsSixup[m_Team];
|
||||||
if(MarkingAlpha > 0.1f)
|
if(MarkingAlpha > 0.1f)
|
||||||
m_RenderInfo.m_Sixup.m_aColors[protocol7::SKINPART_MARKING] = aMarkingColorsSixup[m_Team];
|
m_RenderInfo.m_Sixup[Conn].m_aColors[protocol7::SKINPART_MARKING] = aMarkingColorsSixup[m_Team];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_RenderInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
m_RenderInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
||||||
m_RenderInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
m_RenderInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
||||||
for(auto &Color : m_RenderInfo.m_Sixup.m_aColors)
|
for(auto &Color : m_RenderInfo.m_Sixup[Conn].m_aColors)
|
||||||
Color = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
Color = color_cast<ColorRGBA>(ColorHSLA(12829350));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3692,7 +3692,8 @@ void CGameClient::RefreshSkins()
|
||||||
Client.m_SkinInfo.m_OriginalRenderSkin.Reset();
|
Client.m_SkinInfo.m_OriginalRenderSkin.Reset();
|
||||||
Client.m_SkinInfo.m_ColorableRenderSkin.Reset();
|
Client.m_SkinInfo.m_ColorableRenderSkin.Reset();
|
||||||
}
|
}
|
||||||
Client.UpdateRenderInfo(IsTeamPlay());
|
for(int Dummy = 0; Dummy < NUM_DUMMIES; Dummy++)
|
||||||
|
Client.UpdateRenderInfo(IsTeamPlay(), Dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto &pComponent : m_vpAll)
|
for(auto &pComponent : m_vpAll)
|
||||||
|
|
|
@ -438,7 +438,7 @@ public:
|
||||||
bool m_SpecCharPresent;
|
bool m_SpecCharPresent;
|
||||||
vec2 m_SpecChar;
|
vec2 m_SpecChar;
|
||||||
|
|
||||||
void UpdateRenderInfo(bool IsTeamPlay);
|
void UpdateRenderInfo(bool IsTeamPlay, int Conn);
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
class CSixup
|
class CSixup
|
||||||
|
@ -511,7 +511,7 @@ public:
|
||||||
void OnStateChange(int NewState, int OldState) override;
|
void OnStateChange(int NewState, int OldState) override;
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Conn);
|
void ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Conn);
|
||||||
void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId, int Conn) override;
|
void ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId) override;
|
||||||
int OnDemoRecSnap7(class CSnapshot *pFrom, class CSnapshot *pTo, int Conn) override;
|
int OnDemoRecSnap7(class CSnapshot *pFrom, class CSnapshot *pTo, int Conn) override;
|
||||||
void *TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn);
|
void *TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn);
|
||||||
int TranslateSnap(CSnapshot *pSnapDstSix, CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) override;
|
int TranslateSnap(CSnapshot *pSnapDstSix, CSnapshot *pSnapSrcSeven, int Conn, bool Dummy) override;
|
||||||
|
|
|
@ -272,7 +272,7 @@ void CRenderTools::GetRenderTeeOffsetToRenderedTee(const CAnimState *pAnim, cons
|
||||||
|
|
||||||
void CRenderTools::RenderTee(const CAnimState *pAnim, const CTeeRenderInfo *pInfo, int Emote, vec2 Dir, vec2 Pos, float Alpha) const
|
void CRenderTools::RenderTee(const CAnimState *pAnim, const CTeeRenderInfo *pInfo, int Emote, vec2 Dir, vec2 Pos, float Alpha) const
|
||||||
{
|
{
|
||||||
if(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_BODY].IsValid())
|
if(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_BODY].IsValid())
|
||||||
RenderTee7(pAnim, pInfo, Emote, Dir, Pos, Alpha);
|
RenderTee7(pAnim, pInfo, Emote, Dir, Pos, Alpha);
|
||||||
else
|
else
|
||||||
RenderTee6(pAnim, pInfo, Emote, Dir, Pos, Alpha);
|
RenderTee6(pAnim, pInfo, Emote, Dir, Pos, Alpha);
|
||||||
|
@ -307,7 +307,7 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
// draw bot visuals (background)
|
// draw bot visuals (background)
|
||||||
if(IsBot && !OutLine)
|
if(IsBot && !OutLine)
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_BotTexture);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_BotTexture);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_BOT_BACKGROUND, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_BOT_BACKGROUND, 0, 0, 0);
|
||||||
|
@ -319,13 +319,13 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
// draw bot visuals (foreground)
|
// draw bot visuals (foreground)
|
||||||
if(IsBot && !OutLine)
|
if(IsBot && !OutLine)
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_BotTexture);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_BotTexture);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_BOT_FOREGROUND, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_BOT_FOREGROUND, 0, 0, 0);
|
||||||
Item = BotItem;
|
Item = BotItem;
|
||||||
Graphics()->QuadsDraw(&Item, 1);
|
Graphics()->QuadsDraw(&Item, 1);
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_BotColor;
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_BotColor;
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_BOT_GLOW, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_BOT_GLOW, 0, 0, 0);
|
||||||
|
@ -335,12 +335,12 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw decoration
|
// draw decoration
|
||||||
if(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_DECORATION].IsValid())
|
if(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_DECORATION].IsValid())
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_DECORATION]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_DECORATION]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_aColors[protocol7::SKINPART_DECORATION];
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_DECORATION];
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
SelectSprite7(OutLine ? client_data7::SPRITE_TEE_DECORATION_OUTLINE : client_data7::SPRITE_TEE_DECORATION, 0, 0, 0);
|
SelectSprite7(OutLine ? client_data7::SPRITE_TEE_DECORATION_OUTLINE : client_data7::SPRITE_TEE_DECORATION, 0, 0, 0);
|
||||||
|
@ -350,7 +350,7 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw body (behind marking)
|
// draw body (behind marking)
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_BODY]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_BODY]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
if(OutLine)
|
if(OutLine)
|
||||||
|
@ -360,7 +360,7 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_aColors[protocol7::SKINPART_BODY];
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_BODY];
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_BODY, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_BODY, 0, 0, 0);
|
||||||
|
@ -370,12 +370,12 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
Graphics()->QuadsEnd();
|
Graphics()->QuadsEnd();
|
||||||
|
|
||||||
// draw marking
|
// draw marking
|
||||||
if(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_MARKING].IsValid() && !OutLine)
|
if(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_MARKING].IsValid() && !OutLine)
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_MARKING]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_MARKING]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
ColorRGBA MarkingColor = pInfo->m_Sixup.m_aColors[protocol7::SKINPART_MARKING];
|
ColorRGBA MarkingColor = pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_MARKING];
|
||||||
Graphics()->SetColor(MarkingColor.r * MarkingColor.a, MarkingColor.g * MarkingColor.a, MarkingColor.b * MarkingColor.a, MarkingColor.a * Alpha);
|
Graphics()->SetColor(MarkingColor.r * MarkingColor.a, MarkingColor.g * MarkingColor.a, MarkingColor.b * MarkingColor.a, MarkingColor.a * Alpha);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_MARKING, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_MARKING, 0, 0, 0);
|
||||||
Item = BodyItem;
|
Item = BodyItem;
|
||||||
|
@ -386,7 +386,7 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
// draw body (in front of marking)
|
// draw body (in front of marking)
|
||||||
if(!OutLine)
|
if(!OutLine)
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_BODY]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_BODY]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
||||||
|
@ -400,19 +400,19 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw eyes
|
// draw eyes
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_EYES]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_EYES]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
if(IsBot)
|
if(IsBot)
|
||||||
{
|
{
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_BotColor;
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_BotColor;
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
Emote = EMOTE_SURPRISE;
|
Emote = EMOTE_SURPRISE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ColorRGBA Color = pInfo->m_Sixup.m_aColors[protocol7::SKINPART_EYES];
|
ColorRGBA Color = pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_EYES];
|
||||||
Color.a = Alpha;
|
Color.a = Alpha;
|
||||||
Graphics()->SetColor(Color);
|
Graphics()->SetColor(Color);
|
||||||
}
|
}
|
||||||
|
@ -446,14 +446,14 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
Graphics()->QuadsEnd();
|
Graphics()->QuadsEnd();
|
||||||
|
|
||||||
// draw xmas hat
|
// draw xmas hat
|
||||||
if(!OutLine && pInfo->m_Sixup.m_HatTexture.IsValid())
|
if(!OutLine && pInfo->m_Sixup[g_Config.m_ClDummy].m_HatTexture.IsValid())
|
||||||
{
|
{
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_HatTexture);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_HatTexture);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
Graphics()->QuadsSetRotation(pAnim->GetBody()->m_Angle * pi * 2);
|
||||||
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
Graphics()->SetColor(1.0f, 1.0f, 1.0f, Alpha);
|
||||||
int Flag = Direction.x < 0.0f ? SPRITE_FLAG_FLIP_X : 0;
|
int Flag = Direction.x < 0.0f ? SPRITE_FLAG_FLIP_X : 0;
|
||||||
switch(pInfo->m_Sixup.m_HatSpriteIndex)
|
switch(pInfo->m_Sixup[g_Config.m_ClDummy].m_HatSpriteIndex)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_HATS_TOP1, Flag, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_HATS_TOP1, Flag, 0, 0);
|
||||||
|
@ -474,7 +474,7 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw feet
|
// draw feet
|
||||||
Graphics()->TextureSet(pInfo->m_Sixup.m_aTextures[protocol7::SKINPART_FEET]);
|
Graphics()->TextureSet(pInfo->m_Sixup[g_Config.m_ClDummy].m_aTextures[protocol7::SKINPART_FEET]);
|
||||||
Graphics()->QuadsBegin();
|
Graphics()->QuadsBegin();
|
||||||
const CAnimKeyframe *pFoot = Filling ? pAnim->GetFrontFoot() : pAnim->GetBackFoot();
|
const CAnimKeyframe *pFoot = Filling ? pAnim->GetFrontFoot() : pAnim->GetBackFoot();
|
||||||
|
|
||||||
|
@ -495,10 +495,10 @@ void CRenderTools::RenderTee7(const CAnimState *pAnim, const CTeeRenderInfo *pIn
|
||||||
if(Indicate)
|
if(Indicate)
|
||||||
ColorScale = 0.5f;
|
ColorScale = 0.5f;
|
||||||
Graphics()->SetColor(
|
Graphics()->SetColor(
|
||||||
pInfo->m_Sixup.m_aColors[protocol7::SKINPART_FEET].r * ColorScale,
|
pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_FEET].r * ColorScale,
|
||||||
pInfo->m_Sixup.m_aColors[protocol7::SKINPART_FEET].g * ColorScale,
|
pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_FEET].g * ColorScale,
|
||||||
pInfo->m_Sixup.m_aColors[protocol7::SKINPART_FEET].b * ColorScale,
|
pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_FEET].b * ColorScale,
|
||||||
pInfo->m_Sixup.m_aColors[protocol7::SKINPART_FEET].a * Alpha);
|
pInfo->m_Sixup[g_Config.m_ClDummy].m_aColors[protocol7::SKINPART_FEET].a * Alpha);
|
||||||
SelectSprite7(client_data7::SPRITE_TEE_FOOT, 0, 0, 0);
|
SelectSprite7(client_data7::SPRITE_TEE_FOOT, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
#ifndef GAME_CLIENT_RENDER_H
|
#ifndef GAME_CLIENT_RENDER_H
|
||||||
#define GAME_CLIENT_RENDER_H
|
#define GAME_CLIENT_RENDER_H
|
||||||
|
|
||||||
|
#include <engine/client/enums.h>
|
||||||
|
|
||||||
#include <base/color.h>
|
#include <base/color.h>
|
||||||
#include <base/vmath.h>
|
#include <base/vmath.h>
|
||||||
|
|
||||||
|
@ -50,7 +52,8 @@ public:
|
||||||
m_TeeRenderFlags = 0;
|
m_TeeRenderFlags = 0;
|
||||||
m_FeetFlipped = false;
|
m_FeetFlipped = false;
|
||||||
|
|
||||||
m_Sixup.Reset();
|
for(auto &Sixup : m_Sixup)
|
||||||
|
Sixup.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
CSkin::SSkinTextures m_OriginalRenderSkin;
|
CSkin::SSkinTextures m_OriginalRenderSkin;
|
||||||
|
@ -104,7 +107,7 @@ public:
|
||||||
ColorRGBA m_BotColor;
|
ColorRGBA m_BotColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
CSixup m_Sixup;
|
CSixup m_Sixup[NUM_DUMMIES];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Tee Render Flags
|
// Tee Render Flags
|
||||||
|
|
|
@ -94,11 +94,11 @@ void CGameClient::ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Con
|
||||||
|
|
||||||
if(time_season() == SEASON_XMAS)
|
if(time_season() == SEASON_XMAS)
|
||||||
{
|
{
|
||||||
pClient->m_SkinInfo.m_Sixup.m_HatTexture = m_Skins7.m_XmasHatTexture;
|
pClient->m_SkinInfo.m_Sixup[Conn].m_HatTexture = m_Skins7.m_XmasHatTexture;
|
||||||
pClient->m_SkinInfo.m_Sixup.m_HatSpriteIndex = ClientId % CSkins7::HAT_NUM;
|
pClient->m_SkinInfo.m_Sixup[Conn].m_HatSpriteIndex = ClientId % CSkins7::HAT_NUM;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pClient->m_SkinInfo.m_Sixup.m_HatTexture.Invalidate();
|
pClient->m_SkinInfo.m_Sixup[Conn].m_HatTexture.Invalidate();
|
||||||
|
|
||||||
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
for(int Part = 0; Part < protocol7::NUM_SKINPARTS; Part++)
|
||||||
{
|
{
|
||||||
|
@ -106,25 +106,25 @@ void CGameClient::ApplySkin7InfoFromGameMsg(const T *pMsg, int ClientId, int Con
|
||||||
const CSkins7::CSkinPart *pSkinPart = m_Skins7.GetSkinPart(Part, Id);
|
const CSkins7::CSkinPart *pSkinPart = m_Skins7.GetSkinPart(Part, Id);
|
||||||
if(pClient->m_Sixup[Conn].m_aUseCustomColors[Part])
|
if(pClient->m_Sixup[Conn].m_aUseCustomColors[Part])
|
||||||
{
|
{
|
||||||
pClient->m_SkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
pClient->m_SkinInfo.m_Sixup[Conn].m_aTextures[Part] = pSkinPart->m_ColorTexture;
|
||||||
pClient->m_SkinInfo.m_Sixup.m_aColors[Part] = m_Skins7.GetColor(pMsg->m_aSkinPartColors[Part], Part == protocol7::SKINPART_MARKING);
|
pClient->m_SkinInfo.m_Sixup[Conn].m_aColors[Part] = m_Skins7.GetColor(pMsg->m_aSkinPartColors[Part], Part == protocol7::SKINPART_MARKING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pClient->m_SkinInfo.m_Sixup.m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
pClient->m_SkinInfo.m_Sixup[Conn].m_aTextures[Part] = pSkinPart->m_OrgTexture;
|
||||||
pClient->m_SkinInfo.m_Sixup.m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
pClient->m_SkinInfo.m_Sixup[Conn].m_aColors[Part] = ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
if(pClient->m_SkinInfo.m_Sixup.m_HatTexture.IsValid())
|
if(pClient->m_SkinInfo.m_Sixup[Conn].m_HatTexture.IsValid())
|
||||||
{
|
{
|
||||||
if(Part == protocol7::SKINPART_BODY && str_comp(pClient->m_Sixup[Conn].m_aaSkinPartNames[Part], "standard"))
|
if(Part == protocol7::SKINPART_BODY && str_comp(pClient->m_Sixup[Conn].m_aaSkinPartNames[Part], "standard"))
|
||||||
pClient->m_SkinInfo.m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
pClient->m_SkinInfo.m_Sixup[Conn].m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
||||||
if(Part == protocol7::SKINPART_DECORATION && !str_comp(pClient->m_Sixup[Conn].m_aaSkinPartNames[Part], "twinbopp"))
|
if(Part == protocol7::SKINPART_DECORATION && !str_comp(pClient->m_Sixup[Conn].m_aaSkinPartNames[Part], "twinbopp"))
|
||||||
pClient->m_SkinInfo.m_Sixup.m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
pClient->m_SkinInfo.m_Sixup[Conn].m_HatSpriteIndex = CSkins7::HAT_OFFSET_SIDE + (ClientId % CSkins7::HAT_NUM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameClient::ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId, int Conn)
|
void CGameClient::ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientInfo *pObj, int ClientId)
|
||||||
{
|
{
|
||||||
char aSkinPartNames[protocol7::NUM_SKINPARTS][protocol7::MAX_SKIN_ARRAY_SIZE];
|
char aSkinPartNames[protocol7::NUM_SKINPARTS][protocol7::MAX_SKIN_ARRAY_SIZE];
|
||||||
protocol7::CNetMsg_Sv_SkinChange Msg;
|
protocol7::CNetMsg_Sv_SkinChange Msg;
|
||||||
|
@ -136,7 +136,7 @@ void CGameClient::ApplySkin7InfoFromSnapObj(const protocol7::CNetObj_De_ClientIn
|
||||||
Msg.m_aUseCustomColors[Part] = pObj->m_aUseCustomColors[Part];
|
Msg.m_aUseCustomColors[Part] = pObj->m_aUseCustomColors[Part];
|
||||||
Msg.m_aSkinPartColors[Part] = pObj->m_aSkinPartColors[Part];
|
Msg.m_aSkinPartColors[Part] = pObj->m_aSkinPartColors[Part];
|
||||||
}
|
}
|
||||||
ApplySkin7InfoFromGameMsg(&Msg, ClientId, Conn);
|
ApplySkin7InfoFromGameMsg(&Msg, ClientId, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
|
void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
|
||||||
|
@ -196,7 +196,7 @@ void *CGameClient::TranslateGameMsg(int *pMsgId, CUnpacker *pUnpacker, int Conn)
|
||||||
{
|
{
|
||||||
m_aClients[pMsg7->m_ClientId].m_Team = pMsg7->m_Team;
|
m_aClients[pMsg7->m_ClientId].m_Team = pMsg7->m_Team;
|
||||||
m_pClient->m_TranslationContext.m_aClients[pMsg7->m_ClientId].m_Team = pMsg7->m_Team;
|
m_pClient->m_TranslationContext.m_aClients[pMsg7->m_ClientId].m_Team = pMsg7->m_Team;
|
||||||
m_aClients[pMsg7->m_ClientId].UpdateRenderInfo(IsTeamPlay());
|
m_aClients[pMsg7->m_ClientId].UpdateRenderInfo(IsTeamPlay(), Conn);
|
||||||
|
|
||||||
// if(pMsg7->m_ClientId == m_LocalClientId)
|
// if(pMsg7->m_ClientId == m_LocalClientId)
|
||||||
// {
|
// {
|
||||||
|
|
|
@ -466,7 +466,7 @@ int CGameClient::TranslateSnap(CSnapshot *pSnapDstSix, CSnapshot *pSnapSrcSeven,
|
||||||
IntsToStr(pInfo->m_aClan, 3, Client.m_aClan, std::size(Client.m_aClan));
|
IntsToStr(pInfo->m_aClan, 3, Client.m_aClan, std::size(Client.m_aClan));
|
||||||
Client.m_Country = pInfo->m_Country;
|
Client.m_Country = pInfo->m_Country;
|
||||||
|
|
||||||
ApplySkin7InfoFromSnapObj(pInfo, ClientId, Conn);
|
ApplySkin7InfoFromSnapObj(pInfo, ClientId);
|
||||||
}
|
}
|
||||||
else if(pItem7->Type() == protocol7::NETOBJTYPE_DE_GAMEINFO)
|
else if(pItem7->Type() == protocol7::NETOBJTYPE_DE_GAMEINFO)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue