mirror of
https://github.com/celisej567/source-engine.git
synced 2025-12-31 21:48:22 +03:00
fix windows build scripts, add windows opus support
This commit is contained in:
@@ -53,12 +53,12 @@ int CBlacklistedServerManager::LoadServersFromFile( const char *pszFilename, boo
|
||||
{
|
||||
const char *pszName = pData->GetString( "name" );
|
||||
|
||||
uint32 ulDate = pData->GetInt( "date" );
|
||||
uint64 ullDate = pData->GetUint64( "date" );
|
||||
if ( bResetTimes )
|
||||
{
|
||||
time_t today;
|
||||
time( &today );
|
||||
ulDate = today;
|
||||
ullDate = (uint64)today;
|
||||
}
|
||||
|
||||
const char *pszNetAddr = pData->GetString( "addr" );
|
||||
@@ -68,7 +68,7 @@ int CBlacklistedServerManager::LoadServersFromFile( const char *pszFilename, boo
|
||||
|
||||
m_Blacklist[iIdx].m_nServerID = m_iNextServerID++;
|
||||
V_strncpy( m_Blacklist[iIdx].m_szServerName, pszName, sizeof( m_Blacklist[iIdx].m_szServerName ) );
|
||||
m_Blacklist[iIdx].m_ulTimeBlacklistedAt = ulDate;
|
||||
m_Blacklist[iIdx].m_ullTimeBlacklistedAt = ullDate;
|
||||
m_Blacklist[iIdx].m_NetAdr.SetFromString( pszNetAddr );
|
||||
|
||||
++count;
|
||||
@@ -92,7 +92,7 @@ void CBlacklistedServerManager::SaveToFile( const char *pszFilename )
|
||||
{
|
||||
KeyValues *pSubKey = new KeyValues( "server" );
|
||||
pSubKey->SetString( "name", m_Blacklist[i].m_szServerName );
|
||||
pSubKey->SetInt( "date", m_Blacklist[i].m_ulTimeBlacklistedAt );
|
||||
pSubKey->SetUint64( "date", m_Blacklist[i].m_ullTimeBlacklistedAt );
|
||||
pSubKey->SetString( "addr", m_Blacklist[i].m_NetAdr.ToString() );
|
||||
pKV->AddSubKey( pSubKey );
|
||||
}
|
||||
@@ -120,7 +120,7 @@ blacklisted_server_t *CBlacklistedServerManager::AddServer( gameserveritem_t &se
|
||||
|
||||
time_t today;
|
||||
time( &today );
|
||||
m_Blacklist[iIdx].m_ulTimeBlacklistedAt = today;
|
||||
m_Blacklist[iIdx].m_ullTimeBlacklistedAt = (uint64)today;
|
||||
m_Blacklist[iIdx].m_NetAdr = netAdr;
|
||||
m_Blacklist[iIdx].m_nServerID = m_iNextServerID++;
|
||||
|
||||
@@ -145,7 +145,7 @@ blacklisted_server_t *CBlacklistedServerManager::AddServer( const char *serverNa
|
||||
|
||||
time_t today;
|
||||
time( &today );
|
||||
m_Blacklist[iIdx].m_ulTimeBlacklistedAt = today;
|
||||
m_Blacklist[iIdx].m_ullTimeBlacklistedAt = (uint64)today;
|
||||
|
||||
m_Blacklist[iIdx].m_NetAdr = netAdr;
|
||||
m_Blacklist[iIdx].m_nServerID = m_iNextServerID++;
|
||||
@@ -157,7 +157,7 @@ blacklisted_server_t *CBlacklistedServerManager::AddServer( const char *serverNa
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Add the given server to the blacklist. Return added server.
|
||||
//-----------------------------------------------------------------------------
|
||||
blacklisted_server_t *CBlacklistedServerManager::AddServer( const char *serverName, const char *netAddressString, uint32 timestamp )
|
||||
blacklisted_server_t *CBlacklistedServerManager::AddServer( const char *serverName, const char *netAddressString, uint64 timestamp )
|
||||
{
|
||||
netadr_t netAdr( netAddressString );
|
||||
|
||||
@@ -168,7 +168,7 @@ blacklisted_server_t *CBlacklistedServerManager::AddServer( const char *serverNa
|
||||
int iIdx = m_Blacklist.AddToTail();
|
||||
|
||||
V_strncpy( m_Blacklist[iIdx].m_szServerName, serverName, sizeof( m_Blacklist[iIdx].m_szServerName ) );
|
||||
m_Blacklist[iIdx].m_ulTimeBlacklistedAt = timestamp;
|
||||
m_Blacklist[iIdx].m_ullTimeBlacklistedAt = timestamp;
|
||||
m_Blacklist[iIdx].m_NetAdr = netAdr;
|
||||
m_Blacklist[iIdx].m_nServerID = m_iNextServerID++;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct blacklisted_server_t
|
||||
{
|
||||
int m_nServerID;
|
||||
char m_szServerName[64];
|
||||
uint32 m_ulTimeBlacklistedAt;
|
||||
uint64 m_ullTimeBlacklistedAt;
|
||||
netadr_t m_NetAdr;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
|
||||
blacklisted_server_t *AddServer( gameserveritem_t &server );
|
||||
blacklisted_server_t *AddServer( const char *serverName, uint32 serverIP, int serverPort );
|
||||
blacklisted_server_t *AddServer( const char *serverName, const char *netAddressString, uint32 timestamp );
|
||||
blacklisted_server_t *AddServer( const char *serverName, const char *netAddressString, uint64 timestamp );
|
||||
|
||||
void RemoveServer( int iServerID ); // remove server with matching 'server id' from list
|
||||
|
||||
|
||||
Reference in New Issue
Block a user