Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/game/server/gameinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2507,6 +2507,9 @@ inline void CServerNetworkProperty::CheckTransmit( CCheckTransmitInfo *pInfo )
}
} */

#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 )
{
// NOTE: for speed's sake, this assumes that all networkables are CBaseEntities and that the edict list
Expand All @@ -2529,6 +2532,11 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s
#ifndef _X360
const bool bIsHLTV = pRecipientPlayer->IsHLTV();
const bool bIsReplay = pRecipientPlayer->IsReplay();
#ifdef NEO
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
Assert( bIsHLTV == ( pInfo->m_pTransmitAlways != NULL) ||
Expand Down Expand Up @@ -2605,7 +2613,11 @@ void CServerGameEnts::CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned s
CServerNetworkProperty *netProp = static_cast<CServerNetworkProperty*>( pEdict->GetNetworkable() );

#ifndef _X360
#ifdef NEO
if ( bIsHLTV || bIsReplay || bIsRoamingOOBObserver )
#else
if ( bIsHLTV || bIsReplay )
#endif // NEO
{
// for the HLTV/Replay we don't cull against PVS
if ( netProp->AreaNum() == skyBoxArea )
Expand Down