Sync with latest source-sdk-2013.

This commit is contained in:
Nicholas Hastings committed 2014-10-30 12:30:57 -04:00
1 parent 6abc7fddca
commit aa5841f220
407 files changed
+6784 -10498

No files matched your search

+27 -11
View File
@@ -1888,9 +1888,13 @@ void CServerGameDLL::SetServerHibernation( bool bHibernating )
const char *CServerGameDLL::GetServerBrowserMapOverride()
{
#ifdef TF_DLL
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && g_pPopulationManager && g_pPopulationManager->GetPopulationFilenameShort() != '\0' )
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() )
{
return g_pPopulationManager->GetPopulationFilenameShort();
const char *pszFilenameShort = g_pPopulationManager ? g_pPopulationManager->GetPopulationFilenameShort() : NULL;
if ( pszFilenameShort && pszFilenameShort[0] )
{
return pszFilenameShort;
}
}
#endif
return NULL;
@@ -1923,6 +1927,15 @@ const char *CServerGameDLL::GetServerBrowserGameData()
return rchResult;
}
//-----------------------------------------------------------------------------
void CServerGameDLL::Status( void (*print) (const char *fmt, ...) )
{
if ( g_pGameRules )
{
g_pGameRules->Status( print );
}
}
//-----------------------------------------------------------------------------
// Purpose: Called during a transition, to build a map adjacency list
//-----------------------------------------------------------------------------
@@ -2964,17 +2977,20 @@ void CServerGameClients::ClientSetupVisibility( edict_t *pViewEntity, edict_t *p
// Flush the remaining areaportal states.
engine->SetAreaPortalStates( portalNums, isOpen, iOutPortal );
// Update the area bits that get sent to the client.
pPlayer->m_Local.UpdateAreaBits( pPlayer, portalBits );
if ( pPlayer )
{
// Update the area bits that get sent to the client.
pPlayer->m_Local.UpdateAreaBits( pPlayer, portalBits );
#ifdef PORTAL
// *After* the player's view has updated its area bits, add on any other areas seen by portals
CPortal_Player* pPortalPlayer = dynamic_cast<CPortal_Player*>( pPlayer );
if ( pPortalPlayer )
{
pPortalPlayer->UpdatePortalViewAreaBits( pvs, pvssize );
}
// *After* the player's view has updated its area bits, add on any other areas seen by portals
CPortal_Player* pPortalPlayer = dynamic_cast<CPortal_Player*>( pPlayer );
if ( pPortalPlayer )
{
pPortalPlayer->UpdatePortalViewAreaBits( pvs, pvssize );
}
#endif //PORTAL
}
}
@@ -3325,7 +3341,7 @@ void MessageWriteEHandle( CBaseEntity *pEntity )
{
EHANDLE hEnt = pEntity;
int iSerialNum = hEnt.GetSerialNumber() & (1 << NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS) - 1;
int iSerialNum = hEnt.GetSerialNumber() & ( (1 << NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS) - 1 );
iEncodedEHandle = hEnt.GetEntryIndex() | (iSerialNum << MAX_EDICT_BITS);
}
else