mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1774
1774: Remove the unused Skinstealaction r=heinrich5991 a=fokkonaut As far as I know it was never in use and the only punishment is to force pinky skin, which doesnt really seem useful. Skin stealing is a very harmless kind of 'bots', which doesnt need punishment imo Co-authored-by: fokkonaut <35420825+fokkonaut@users.noreply.github.com>
This commit is contained in:
commit
cffd9b0ba6
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -154,8 +154,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")
|
||||
|
|
Loading…
Reference in a new issue