Keep respawned players in multi view list on pvp servers

Assume every server that does not have ddnet or race in its gametype to be a pvp server.
This allows spectators to follow multiple players during a fng/ctf/gctf/ictf round.

Related issue #7509
This commit is contained in:
ChillerDragon 2024-05-10 15:07:45 +08:00
parent 3887eea18d
commit 4f4f32615a
2 changed files with 4 additions and 1 deletions

View file

@ -944,7 +944,8 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker, int Conn, bool Dumm
}
// if we are spectating a static id set (team 0) and somebody killed, and its not a guy in solo, we remove him from the list
if(IsMultiViewIdSet() && m_MultiViewTeam == 0 && m_aMultiViewId[pMsg->m_Victim] && !m_aClients[pMsg->m_Victim].m_Spec && !m_MultiView.m_Solo)
// never remove players from the list if it is a pvp server
if(IsMultiViewIdSet() && m_MultiViewTeam == 0 && m_aMultiViewId[pMsg->m_Victim] && !m_aClients[pMsg->m_Victim].m_Spec && !m_MultiView.m_Solo && !m_GameInfo.m_Pvp)
{
m_aMultiViewId[pMsg->m_Victim] = false;
@ -1256,6 +1257,7 @@ static CGameInfo GetGameInfo(const CNetObj_GameInfoEx *pInfoEx, int InfoExSize,
Info.m_EntitiesVanilla = Vanilla;
Info.m_EntitiesBW = BlockWorlds;
Info.m_Race = Race;
Info.m_Pvp = !Race;
Info.m_DontMaskEntities = !DDNet;
Info.m_AllowXSkins = false;
Info.m_EntitiesFDDrace = FDDrace;

View file

@ -87,6 +87,7 @@ public:
bool m_EntitiesFDDrace;
bool m_Race;
bool m_Pvp;
bool m_DontMaskEntities;
bool m_AllowXSkins;