From 6e683a5dd2c3982df24adad432ca6cece0dcbc89 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Mon, 12 Jan 2026 15:55:05 +0000 Subject: [PATCH 1/6] init --- src/game/server/gameinterface.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index 88634e5d7d..4c750f45f6 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2529,6 +2529,7 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s #ifndef _X360 const bool bIsHLTV = pRecipientPlayer->IsHLTV(); const bool bIsReplay = pRecipientPlayer->IsReplay(); + const bool bIsRoamingSpectator = pRecipientPlayer->GetTeamNumber() == TEAM_SPECTATOR && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING; // m_pTransmitAlways must be set if HLTV client Assert( bIsHLTV == ( pInfo->m_pTransmitAlways != NULL) || @@ -2605,7 +2606,11 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s CServerNetworkProperty *netProp = static_cast( pEdict->GetNetworkable() ); #ifndef _X360 +#ifdef NEO + if ( bIsHLTV || bIsReplay || bIsRoamingSpectator ) +#else if ( bIsHLTV || bIsReplay ) +#endif // NEO { // for the HLTV/Replay we don't cull against PVS if ( netProp->AreaNum() == skyBoxArea ) From a5319204b73c7a26dd475bfe6cd9fd1900fd7960 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Mon, 12 Jan 2026 16:01:11 +0000 Subject: [PATCH 2/6] the convar --- src/game/server/gameinterface.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index 4c750f45f6..3967ffbab5 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2507,6 +2507,9 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo ) } } */ +#ifdef NEO +ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Allow all entities to be network to players who are spectating and in the roaming observer mode"); +#endif // NEO void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) { // NOTE: for speed's sake, this assumes that all networkables are CBaseEntities and that the edict list @@ -2529,7 +2532,9 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s #ifndef _X360 const bool bIsHLTV = pRecipientPlayer->IsHLTV(); const bool bIsReplay = pRecipientPlayer->IsReplay(); - const bool bIsRoamingSpectator = pRecipientPlayer->GetTeamNumber() == TEAM_SPECTATOR && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING; +#ifdef NEO + const bool bIsRoamingSpectator = !sv_neo_pvs_cull_roaming_spectators.GetBool() && pRecipientPlayer->GetTeamNumber() == TEAM_SPECTATOR && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING; +#endif // NEO // m_pTransmitAlways must be set if HLTV client Assert( bIsHLTV == ( pInfo->m_pTransmitAlways != NULL) || From 9ec90f4629b2148ef379b0adc1e8e6add2f663a4 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Mon, 12 Jan 2026 16:02:12 +0000 Subject: [PATCH 3/6] reword --- src/game/server/gameinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index 3967ffbab5..833a736ef8 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2508,7 +2508,7 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo ) } */ #ifdef NEO -ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Allow all entities to be network to players who are spectating and in the roaming observer mode"); +ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Transmit all entities to players who are spectating and in the roaming observer mode"); #endif // NEO void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) { From 1f9401a01370d9a7256f838b2e4e804952fc9604 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Mon, 12 Jan 2026 16:04:21 +0000 Subject: [PATCH 4/6] reword again --- src/game/server/gameinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index 833a736ef8..f472632890 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2508,7 +2508,7 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo ) } */ #ifdef NEO -ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Transmit all entities to players who are spectating and in the roaming observer mode"); +ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Cull entities against PVS for players who are spectating and in the roaming observer mode"); #endif // NEO void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) { From 0dc5941e100627a3341d1ab7e32c64aa7d67e6e7 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Mon, 12 Jan 2026 16:46:02 +0000 Subject: [PATCH 5/6] further restrict to only when out of bounds, dont check team --- src/game/server/gameinterface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index f472632890..cf5455015b 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2507,8 +2507,8 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo ) } } */ -#ifdef NEO -ConVar sv_neo_pvs_cull_roaming_spectators("sv_neo_pvs_cull_roaming_spectators", "0", FCVAR_NONE, "Cull entities against PVS for players who are spectating and in the roaming observer mode"); +#ifdef NEO // NEO NOTE (Adam) probably don't need to check observer mode now that we are checking if the camera is out of bounds, but maybe its better to leave the check in case players somehow get out of bounds when playing +ConVar sv_neo_pvs_cull_roaming_observers("sv_neo_pvs_cull_roaming_observers", "0", FCVAR_NONE, "Cull entities against PVS for players who are out of bounds in the roaming observer mode"); #endif // NEO void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) { @@ -2533,7 +2533,7 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s const bool bIsHLTV = pRecipientPlayer->IsHLTV(); const bool bIsReplay = pRecipientPlayer->IsReplay(); #ifdef NEO - const bool bIsRoamingSpectator = !sv_neo_pvs_cull_roaming_spectators.GetBool() && pRecipientPlayer->GetTeamNumber() == TEAM_SPECTATOR && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING; + const bool bIsRoamingOOBObserver = !sv_neo_pvs_cull_roaming_observers.GetBool() && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING && engine->GetArea( pRecipientPlayer->GetAbsOrigin()) == 0; #endif // NEO // m_pTransmitAlways must be set if HLTV client @@ -2612,7 +2612,7 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s #ifndef _X360 #ifdef NEO - if ( bIsHLTV || bIsReplay || bIsRoamingSpectator ) + if ( bIsHLTV || bIsReplay || bIsRoamingOOBObserver ) #else if ( bIsHLTV || bIsReplay ) #endif // NEO From 1ed9779944a2c6dd802b1773ab7f0d8d666947f7 Mon Sep 17 00:00:00 2001 From: AdamTadeusz Date: Sat, 24 Jan 2026 15:05:46 +0000 Subject: [PATCH 6/6] let client decide --- src/game/server/gameinterface.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/server/gameinterface.cpp b/src/game/server/gameinterface.cpp index cf5455015b..dffb3eaba1 100644 --- a/src/game/server/gameinterface.cpp +++ b/src/game/server/gameinterface.cpp @@ -2507,8 +2507,8 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo ) } } */ -#ifdef NEO // NEO NOTE (Adam) probably don't need to check observer mode now that we are checking if the camera is out of bounds, but maybe its better to leave the check in case players somehow get out of bounds when playing -ConVar sv_neo_pvs_cull_roaming_observers("sv_neo_pvs_cull_roaming_observers", "0", FCVAR_NONE, "Cull entities against PVS for players who are out of bounds in the roaming observer mode"); +#ifdef NEO +ConVar cl_neo_pvs_cull_roaming_observer("cl_neo_pvs_cull_roaming_observer", "0", FCVAR_CLIENTDLL | FCVAR_USERINFO | FCVAR_ARCHIVE, "Cull entities against PVS when out of bounds in the roaming observer mode"); #endif // NEO void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) { @@ -2533,7 +2533,9 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s const bool bIsHLTV = pRecipientPlayer->IsHLTV(); const bool bIsReplay = pRecipientPlayer->IsReplay(); #ifdef NEO - const bool bIsRoamingOOBObserver = !sv_neo_pvs_cull_roaming_observers.GetBool() && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING && engine->GetArea( pRecipientPlayer->GetAbsOrigin()) == 0; + const char* recipientPlayerWantsPVSCull = engine->GetClientConVarValue(pRecipientPlayer->entindex(), "cl_neo_pvs_cull_roaming_observer"); + const bool bRecipientPlayerWantsPVSCull = recipientPlayerWantsPVSCull && *recipientPlayerWantsPVSCull && (V_atoi(recipientPlayerWantsPVSCull) != 0) ? true : false; + const bool bIsRoamingOOBObserver = !bRecipientPlayerWantsPVSCull && pRecipientPlayer->GetObserverMode() == OBS_MODE_ROAMING && engine->GetArea( pRecipientPlayer->GetAbsOrigin()) == 0; #endif // NEO // m_pTransmitAlways must be set if HLTV client