Remove the unused Skinstealaction

This commit is contained in:
fokkonaut 2019-06-04 17:23:29 +02:00
parent 75e13550c2
commit e471d4796e
4 changed files with 4 additions and 40 deletions

View file

@ -1817,7 +1817,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
pPlayer->m_TeeInfos.m_UseCustomColor = pMsg->m_UseCustomColor;
pPlayer->m_TeeInfos.m_ColorBody = pMsg->m_ColorBody;
pPlayer->m_TeeInfos.m_ColorFeet = pMsg->m_ColorFeet;
pPlayer->FindDuplicateSkins();
}
else if (MsgID == NETMSGTYPE_CL_EMOTICON && !m_World.m_Paused)
{

View file

@ -282,19 +282,10 @@ void CPlayer::Snap(int SnappingClient)
StrToInts(&pClientInfo->m_Name0, 4, Server()->ClientName(m_ClientID));
StrToInts(&pClientInfo->m_Clan0, 3, Server()->ClientClan(m_ClientID));
pClientInfo->m_Country = Server()->ClientCountry(m_ClientID);
if (m_StolenSkin && SnappingClient != m_ClientID && g_Config.m_SvSkinStealAction == 1)
{
StrToInts(&pClientInfo->m_Skin0, 6, "pinky");
pClientInfo->m_UseCustomColor = 0;
pClientInfo->m_ColorBody = m_TeeInfos.m_ColorBody;
pClientInfo->m_ColorFeet = m_TeeInfos.m_ColorFeet;
} else
{
StrToInts(&pClientInfo->m_Skin0, 6, m_TeeInfos.m_SkinName);
pClientInfo->m_UseCustomColor = m_TeeInfos.m_UseCustomColor;
pClientInfo->m_ColorBody = m_TeeInfos.m_ColorBody;
pClientInfo->m_ColorFeet = m_TeeInfos.m_ColorFeet;
}
StrToInts(&pClientInfo->m_Skin0, 6, m_TeeInfos.m_SkinName);
pClientInfo->m_UseCustomColor = m_TeeInfos.m_UseCustomColor;
pClientInfo->m_ColorBody = m_TeeInfos.m_ColorBody;
pClientInfo->m_ColorFeet = m_TeeInfos.m_ColorFeet;
CNetObj_PlayerInfo *pPlayerInfo = static_cast<CNetObj_PlayerInfo *>(Server()->SnapNewItem(NETOBJTYPE_PLAYERINFO, id, sizeof(CNetObj_PlayerInfo)));
if(!pPlayerInfo)
@ -754,28 +745,6 @@ bool CPlayer::IsPlaying()
return false;
}
void CPlayer::FindDuplicateSkins()
{
if (m_TeeInfos.m_UseCustomColor == 0 && !m_StolenSkin) return;
m_StolenSkin = 0;
for(int i = 0; i < MAX_CLIENTS; ++i)
{
if(i == m_ClientID) continue;
if(GameServer()->m_apPlayers[i])
{
if(GameServer()->m_apPlayers[i]->m_StolenSkin) continue;
if((GameServer()->m_apPlayers[i]->m_TeeInfos.m_UseCustomColor == m_TeeInfos.m_UseCustomColor) &&
(GameServer()->m_apPlayers[i]->m_TeeInfos.m_ColorFeet == m_TeeInfos.m_ColorFeet) &&
(GameServer()->m_apPlayers[i]->m_TeeInfos.m_ColorBody == m_TeeInfos.m_ColorBody) &&
!str_comp(GameServer()->m_apPlayers[i]->m_TeeInfos.m_SkinName, m_TeeInfos.m_SkinName))
{
m_StolenSkin = 1;
return;
}
}
}
}
void CPlayer::SpectatePlayerName(const char *pName)
{
if(!pName)

View file

@ -44,7 +44,6 @@ public:
void KillCharacter(int Weapon = WEAPON_GAME);
CCharacter *GetCharacter();
void FindDuplicateSkins();
void SpectatePlayerName(const char *pName);
//---------------------------------------------------------
@ -97,7 +96,6 @@ public:
int m_JoinTick;
bool m_ForceBalanced;
int m_LastActionTick;
bool m_StolenSkin;
int m_TeamChangeTick;
bool m_SentSemicolonTip;
struct

View file

@ -153,8 +153,6 @@ MACRO_CONFIG_INT(SvDestroyLasersOnDeath, sv_destroy_lasers_on_death, 0, 0, 1, CF
MACRO_CONFIG_INT(SvMapUpdateRate, sv_mapupdaterate, 5, 1, 100, CFGFLAG_SERVER, "64 player id <-> vanilla id players map update rate")
MACRO_CONFIG_INT(SvSkinStealAction, sv_skinstealaction, 0, 0, 1, CFGFLAG_SERVER, "How to punish skin stealing (currently only 1 = force pinky)")
MACRO_CONFIG_STR(SvServerType, sv_server_type, 64, "none", CFGFLAG_SERVER, "Type of the server (novice, moderate, ...)")
MACRO_CONFIG_INT(SvSendVotesPerTick, sv_send_votes_per_tick, 5, 1, 15, CFGFLAG_SERVER, "Number of vote options being send per tick")