mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
sv_show_other the ability to use the command showothers
This commit is contained in:
parent
0d0f72b059
commit
ed5c9c1d92
|
@ -207,5 +207,6 @@ MACRO_CONFIG_INT(SvResetPickus, sv_reset_pickups, 0, 0, 1, CFGFLAG_SERVER, "Whet
|
|||
MACRO_CONFIG_INT(ClShowOthers, cl_show_others, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show players in other teams", IConsole::CONSOLELEVEL_USER)
|
||||
MACRO_CONFIG_INT(ClShowEntities, cl_show_entities, 0, 0, 1, CFGFLAG_CLIENT, "Cheat to show game tiles", IConsole::CONSOLELEVEL_USER)
|
||||
MACRO_CONFIG_INT(ClPredictOldHookthrough, cl_predict_oldht, 0, 0, 1, CFGFLAG_CLIENT, "Client predicts old Hookthrough", IConsole::CONSOLELEVEL_USER)
|
||||
MACRO_CONFIG_INT(SvShowOthers, sv_show_others, 1, 0, 1, CFGFLAG_SERVER, "Whether players can user the command showothers or not", IConsole::CONSOLELEVEL_ADMIN)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -967,16 +967,20 @@ void CGameContext::ConShowOthers(IConsole::IResult *pResult, void *pUserData, in
|
|||
CPlayer *pPlayer = pSelf->m_apPlayers[ClientID];
|
||||
if(!pPlayer)
|
||||
return;
|
||||
|
||||
if(pPlayer->m_IsUsingDDRaceClient)
|
||||
if(g_Config.m_SvShowOthers)
|
||||
{
|
||||
if(pResult->NumArguments())
|
||||
pPlayer->m_ShowOthers = pResult->GetInteger(0);
|
||||
if(pPlayer->m_IsUsingDDRaceClient)
|
||||
{
|
||||
if(pResult->NumArguments())
|
||||
pPlayer->m_ShowOthers = pResult->GetInteger(0);
|
||||
else
|
||||
pPlayer->m_ShowOthers = !pPlayer->m_ShowOthers;
|
||||
}
|
||||
else
|
||||
pPlayer->m_ShowOthers = !pPlayer->m_ShowOthers;
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Showing players from other teams is only available with DDRace Client, http://DDRace.info");
|
||||
}
|
||||
else
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Showing players from other teams is only available with DDRace Client, http://DDRace.info");
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "Showing players from other teams is disabled by the server admin");
|
||||
}
|
||||
|
||||
void CGameContext::Mute(NETADDR *Addr, int Secs, const char *pDisplayName)
|
||||
|
|
Loading…
Reference in a new issue