mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix /showothers
This commit is contained in:
parent
c7cc656f1a
commit
329804b3ce
|
@ -269,32 +269,38 @@ int64_t CGameTeams::TeamMask(int Team, int ExceptID, int Asker)
|
||||||
if (!GetPlayer(i))
|
if (!GetPlayer(i))
|
||||||
continue; // Player doesn't exist
|
continue; // Player doesn't exist
|
||||||
|
|
||||||
if (GetPlayer(i)->m_ShowOthers)
|
if (!(GetPlayer(i)->GetTeam() == -1 || GetPlayer(i)->m_Paused))
|
||||||
{} // ShowOthers sees all
|
|
||||||
else if (!(GetPlayer(i)->GetTeam() == -1 || GetPlayer(i)->m_Paused))
|
|
||||||
{ // Not spectator
|
{ // Not spectator
|
||||||
if (i != Asker)
|
if (i != Asker)
|
||||||
{ // Actions of other players
|
{ // Actions of other players
|
||||||
if (!Character(i))
|
if (!Character(i))
|
||||||
continue; // Player is currently dead
|
continue; // Player is currently dead
|
||||||
|
if (!GetPlayer(i)->m_ShowOthers || g_Config.m_SvTeam != 3)
|
||||||
|
{ // Only for SvTeam 3 because it's buggy otherwise
|
||||||
if (m_Core.GetSolo(Asker))
|
if (m_Core.GetSolo(Asker))
|
||||||
continue; // When in solo part don't show others
|
continue; // When in solo part don't show others
|
||||||
if (m_Core.GetSolo(i))
|
if (m_Core.GetSolo(i))
|
||||||
continue; // When in solo part don't show others
|
continue; // When in solo part don't show others
|
||||||
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
|
continue; // In different teams
|
||||||
|
} // ShowOthers
|
||||||
} // See everything of yourself
|
} // See everything of yourself
|
||||||
}
|
}
|
||||||
else if (GetPlayer(i)->m_SpectatorID != SPEC_FREEVIEW)
|
else if (GetPlayer(i)->m_SpectatorID != SPEC_FREEVIEW)
|
||||||
{ // Spectating specific player
|
{ // Spectating specific player
|
||||||
if (GetPlayer(i)->m_SpectatorID != Asker)
|
if (GetPlayer(i)->m_SpectatorID != Asker)
|
||||||
{ // Actions of other players
|
{ // Actions of other players
|
||||||
if (m_Core.Team(GetPlayer(i)->m_SpectatorID) != Team)
|
if (!Character(GetPlayer(i)->m_SpectatorID))
|
||||||
continue; // In different teams
|
continue; // Player is currently dead
|
||||||
|
if (!GetPlayer(i)->m_ShowOthers || g_Config.m_SvTeam != 3)
|
||||||
|
{ // Only for SvTeam 3 because it's buggy otherwise
|
||||||
if (m_Core.GetSolo(Asker))
|
if (m_Core.GetSolo(Asker))
|
||||||
continue; // When in solo part don't show others
|
continue; // When in solo part don't show others
|
||||||
if (m_Core.GetSolo(GetPlayer(i)->m_SpectatorID))
|
if (m_Core.GetSolo(GetPlayer(i)->m_SpectatorID))
|
||||||
continue; // When in solo part don't show others
|
continue; // When in solo part don't show others
|
||||||
|
if (m_Core.Team(GetPlayer(i)->m_SpectatorID) != Team && m_Core.Team(GetPlayer(i)->m_SpectatorID) != TEAM_SUPER)
|
||||||
|
continue; // In different teams
|
||||||
|
} // ShowOthers
|
||||||
} // See everything of player you're spectating
|
} // See everything of player you're spectating
|
||||||
} // Freeview sees all
|
} // Freeview sees all
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue