mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix clang-format
This commit is contained in:
parent
35fc180559
commit
cfd32c357b
|
@ -45,16 +45,16 @@ CHAT_COMMAND("lock", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConLockTeam, th
|
|||
CHAT_COMMAND("unlock", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConUnlockTeam, this, "Unlock a team")
|
||||
CHAT_COMMAND("invite", "r[player name]", CFGFLAG_CHAT|CFGFLAG_SERVER, ConInviteTeam, this, "Invite a person to a locked team")
|
||||
|
||||
CHAT_COMMAND("showothers", "?i['0'|'1'|'2']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConShowOthers, this, "Whether to show players from other teams or not (off by default), optional i = 0 for off, i = 1 for on, i = 2 for own team only")
|
||||
CHAT_COMMAND("showall", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConShowAll, this, "Whether to show players at any distance (off by default), optional i = 0 for off else for on")
|
||||
CHAT_COMMAND("specteam", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConSpecTeam, this, "Whether to show players from other teams when spectating (on by default), optional i = 0 for off else for on")
|
||||
CHAT_COMMAND("ninjajetpack", "?i['0'|'1']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConNinjaJetpack, this, "Whether to use ninja jetpack or not. Makes jetpack look more awesome")
|
||||
CHAT_COMMAND("saytime", "?r[player name]", CFGFLAG_CHAT|CFGFLAG_SERVER|CFGFLAG_NONTEEHISTORIC, ConSayTime, this, "Privately messages someone's current time in this current running race (your time by default)")
|
||||
CHAT_COMMAND("saytimeall", "", CFGFLAG_CHAT|CFGFLAG_SERVER|CFGFLAG_NONTEEHISTORIC, ConSayTimeAll, this, "Publicly messages everyone your current time in this current running race")
|
||||
CHAT_COMMAND("time", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConTime, this, "Privately shows you your current time in this current running race in the broadcast message")
|
||||
CHAT_COMMAND("timer", "?s['gametimer'|'broadcast'|'both'|'none'|'cycle']", CFGFLAG_CHAT|CFGFLAG_SERVER, ConSetTimerType, this, "Personal Setting of showing time in either broadcast or game/round timer, timer s, where s = broadcast for broadcast, gametimer for game/round timer, cycle for cycle, both for both, none for no timer and nothing to show current status")
|
||||
CHAT_COMMAND("r", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConRescue, this, "Teleport yourself out of freeze (use sv_rescue 1 to enable this feature)")
|
||||
CHAT_COMMAND("rescue", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConRescue, this, "Teleport yourself out of freeze (use sv_rescue 1 to enable this feature)")
|
||||
CHAT_COMMAND("showothers", "?i['0'|'1'|'2']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConShowOthers, this, "Whether to show players from other teams or not (off by default), optional i = 0 for off, i = 1 for on, i = 2 for own team only")
|
||||
CHAT_COMMAND("showall", "?i['0'|'1']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConShowAll, this, "Whether to show players at any distance (off by default), optional i = 0 for off else for on")
|
||||
CHAT_COMMAND("specteam", "?i['0'|'1']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConSpecTeam, this, "Whether to show players from other teams when spectating (on by default), optional i = 0 for off else for on")
|
||||
CHAT_COMMAND("ninjajetpack", "?i['0'|'1']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConNinjaJetpack, this, "Whether to use ninja jetpack or not. Makes jetpack look more awesome")
|
||||
CHAT_COMMAND("saytime", "?r[player name]", CFGFLAG_CHAT | CFGFLAG_SERVER | CFGFLAG_NONTEEHISTORIC, ConSayTime, this, "Privately messages someone's current time in this current running race (your time by default)")
|
||||
CHAT_COMMAND("saytimeall", "", CFGFLAG_CHAT | CFGFLAG_SERVER | CFGFLAG_NONTEEHISTORIC, ConSayTimeAll, this, "Publicly messages everyone your current time in this current running race")
|
||||
CHAT_COMMAND("time", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConTime, this, "Privately shows you your current time in this current running race in the broadcast message")
|
||||
CHAT_COMMAND("timer", "?s['gametimer'|'broadcast'|'both'|'none'|'cycle']", CFGFLAG_CHAT | CFGFLAG_SERVER, ConSetTimerType, this, "Personal Setting of showing time in either broadcast or game/round timer, timer s, where s = broadcast for broadcast, gametimer for game/round timer, cycle for cycle, both for both, none for no timer and nothing to show current status")
|
||||
CHAT_COMMAND("r", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRescue, this, "Teleport yourself out of freeze (use sv_rescue 1 to enable this feature)")
|
||||
CHAT_COMMAND("rescue", "", CFGFLAG_CHAT | CFGFLAG_SERVER, ConRescue, this, "Teleport yourself out of freeze (use sv_rescue 1 to enable this feature)")
|
||||
|
||||
CHAT_COMMAND("kill", "", CFGFLAG_CHAT|CFGFLAG_SERVER, ConProtectedKill, this, "Kill yourself when kill-protected during a long game (use f1, kill for regular kill)")
|
||||
|
||||
|
|
|
@ -225,8 +225,7 @@ void CDragger::Snap(int SnappingClient)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (Char && Char->IsAlive() && Target && Target->IsAlive() && Target->GetPlayer()->GetCID() != Char->GetPlayer()->GetCID() && (Char->GetPlayer()->m_ShowOthers == 0 || (Char->GetPlayer()->m_ShowOthers == 2 &&
|
||||
(Char->Teams()->m_Core.GetSolo(SnappingClient) || Char->Teams()->m_Core.GetSolo(Target->GetPlayer()->GetCID())))))
|
||||
if(Char && Char->IsAlive() && Target && Target->IsAlive() && Target->GetPlayer()->GetCID() != Char->GetPlayer()->GetCID() && (Char->GetPlayer()->m_ShowOthers == 0 || (Char->GetPlayer()->m_ShowOthers == 2 && (Char->Teams()->m_Core.GetSolo(SnappingClient) || Char->Teams()->m_Core.GetSolo(Target->GetPlayer()->GetCID())))))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -96,15 +96,10 @@ void CPlasma::Snap(int SnappingClient)
|
|||
&& (!Tick))
|
||||
return;
|
||||
|
||||
if(SnapPlayer && (SnapPlayer->GetTeam() == TEAM_SPECTATORS || SnapPlayer->IsPaused()) && SnapPlayer->m_SpectatorID != -1
|
||||
&& GameServer()->GetPlayerChar(SnapPlayer->m_SpectatorID)
|
||||
&& GameServer()->GetPlayerChar(SnapPlayer->m_SpectatorID)->Team() != m_ResponsibleTeam
|
||||
&& SnapPlayer->m_ShowOthers != 1)
|
||||
if(SnapPlayer && (SnapPlayer->GetTeam() == TEAM_SPECTATORS || SnapPlayer->IsPaused()) && SnapPlayer->m_SpectatorID != -1 && GameServer()->GetPlayerChar(SnapPlayer->m_SpectatorID) && GameServer()->GetPlayerChar(SnapPlayer->m_SpectatorID)->Team() != m_ResponsibleTeam && SnapPlayer->m_ShowOthers != 1)
|
||||
return;
|
||||
|
||||
if(SnapPlayer && SnapPlayer->GetTeam() != TEAM_SPECTATORS && !SnapPlayer->IsPaused() && SnapChar
|
||||
&& SnapChar && SnapChar->Team() != m_ResponsibleTeam
|
||||
&& SnapPlayer->m_ShowOthers != 1)
|
||||
if(SnapPlayer && SnapPlayer->GetTeam() != TEAM_SPECTATORS && !SnapPlayer->IsPaused() && SnapChar && SnapChar && SnapChar->Team() != m_ResponsibleTeam && SnapPlayer->m_ShowOthers != 1)
|
||||
return;
|
||||
|
||||
if(SnapPlayer && (SnapPlayer->GetTeam() == TEAM_SPECTATORS || SnapPlayer->IsPaused()) && SnapPlayer->m_SpectatorID == -1
|
||||
|
|
|
@ -1212,7 +1212,7 @@ void CGameContext::OnClientEnter(int ClientID)
|
|||
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf);
|
||||
|
||||
if (g_Config.m_SvShowOthersDefault > 0)
|
||||
if(g_Config.m_SvShowOthersDefault > 0)
|
||||
{
|
||||
if (g_Config.m_SvShowOthers)
|
||||
SendChatTarget(ClientID, "You can see other players. To disable this use DDNet client and type /showothers .");
|
||||
|
|
|
@ -188,10 +188,7 @@ void CGameWorld::UpdatePlayerMaps()
|
|||
(!GameServer()->m_apPlayers[i] ||
|
||||
GameServer()->m_apPlayers[i]->GetClientVersion() == VERSION_VANILLA ||
|
||||
(GameServer()->m_apPlayers[i]->GetClientVersion() >= VERSION_DDRACE &&
|
||||
GameServer()->m_apPlayers[i]->m_ShowOthers != 1
|
||||
)
|
||||
)
|
||||
)
|
||||
GameServer()->m_apPlayers[i]->m_ShowOthers != 1)))
|
||||
Dist[j].first = 1e8;
|
||||
else
|
||||
Dist[j].first = 0;
|
||||
|
|
|
@ -412,11 +412,7 @@ void CPlayer::Snap(int SnappingClient)
|
|||
if(SnappingClient >= 0)
|
||||
{
|
||||
CPlayer *pSnapPlayer = GameServer()->m_apPlayers[SnappingClient];
|
||||
ShowSpec = ShowSpec && (
|
||||
GameServer()->GetDDRaceTeam(id) == GameServer()->GetDDRaceTeam(SnappingClient)
|
||||
|| pSnapPlayer->m_ShowOthers == 1
|
||||
|| (pSnapPlayer->GetTeam() == TEAM_SPECTATORS || pSnapPlayer->IsPaused())
|
||||
);
|
||||
ShowSpec = ShowSpec && (GameServer()->GetDDRaceTeam(id) == GameServer()->GetDDRaceTeam(SnappingClient) || pSnapPlayer->m_ShowOthers == 1 || (pSnapPlayer->GetTeam() == TEAM_SPECTATORS || pSnapPlayer->IsPaused()));
|
||||
}
|
||||
|
||||
if(ShowSpec)
|
||||
|
|
|
@ -389,12 +389,12 @@ int64 CGameTeams::TeamMask(int Team, int ExceptID, int Asker)
|
|||
{ // Actions of other players
|
||||
if (!Character(i))
|
||||
continue; // Player is currently dead
|
||||
if (GetPlayer(i)->m_ShowOthers == 2)
|
||||
if(GetPlayer(i)->m_ShowOthers == 2)
|
||||
{
|
||||
if (m_Core.Team(i) != Team && m_Core.Team(i) != TEAM_SUPER)
|
||||
if(m_Core.Team(i) != Team && m_Core.Team(i) != TEAM_SUPER)
|
||||
continue; // In different teams
|
||||
}
|
||||
else if (GetPlayer(i)->m_ShowOthers == 0)
|
||||
else if(GetPlayer(i)->m_ShowOthers == 0)
|
||||
{
|
||||
if (m_Core.GetSolo(Asker))
|
||||
continue; // When in solo part don't show others
|
||||
|
@ -411,12 +411,12 @@ int64 CGameTeams::TeamMask(int Team, int ExceptID, int Asker)
|
|||
{ // Actions of other players
|
||||
if (!Character(GetPlayer(i)->m_SpectatorID))
|
||||
continue; // Player is currently dead
|
||||
if (GetPlayer(i)->m_ShowOthers == 2)
|
||||
if(GetPlayer(i)->m_ShowOthers == 2)
|
||||
{
|
||||
if (m_Core.Team(GetPlayer(i)->m_SpectatorID) != Team && m_Core.Team(GetPlayer(i)->m_SpectatorID) != TEAM_SUPER)
|
||||
if(m_Core.Team(GetPlayer(i)->m_SpectatorID) != Team && m_Core.Team(GetPlayer(i)->m_SpectatorID) != TEAM_SUPER)
|
||||
continue; // In different teams
|
||||
}
|
||||
else if (GetPlayer(i)->m_ShowOthers == 0)
|
||||
else if(GetPlayer(i)->m_ShowOthers == 0)
|
||||
{
|
||||
if (m_Core.GetSolo(Asker))
|
||||
continue; // When in solo part don't show others
|
||||
|
|
Loading…
Reference in a new issue