Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ricochet HLTV Support
#1
This code will prevent an HLTV Proxy from being entered into matches while on arena (it already worked in deathmatch):

In disc_arena.cpp (Line 93):
Code:
if (pPlayer && (pPlayer->m_pCurrentArena == this) && pPlayer->m_bHasDisconnected != TRUE && (stricmp(GETPLAYERAUTHID(pPlayer->edict()), "HLTV") != 0))

This is what the function CDiscArena::Reset will look like after the code has been added (starting on line 86):
Code:
void CDiscArena::Reset( void )
{
    // Remove all clients in the queue
&nbsp;&nbsp;&nbsp;&nbsp;for ( int i = 1; i <= gpGlobals->maxClients; i++ )
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex( i );

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pPlayer &amp;&amp; (pPlayer->m_pCurrentArena == this) &amp;&amp; pPlayer->m_bHasDisconnected != TRUE &amp;&amp; (stricmp(GETPLAYERAUTHID(pPlayer->edict()), "HLTV") != 0))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoveClient( pPlayer );

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Move her into spectator mode
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//MoveToSpectator( pPlayer );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;m_pPlayerQueue = NULL;
&nbsp;&nbsp;&nbsp;&nbsp;m_iPlayers = 0;
&nbsp;&nbsp;&nbsp;&nbsp;m_flTimeLimitOver = 0;
&nbsp;&nbsp;&nbsp;&nbsp;m_bShownTimeWarning = FALSE;
&nbsp;&nbsp;&nbsp;&nbsp;m_iArenaState = ARENA_WAITING_FOR_PLAYERS;
&nbsp;&nbsp;&nbsp;&nbsp;memset( m_hCombatants, 0, sizeof( m_hCombatants ) );

&nbsp;&nbsp;&nbsp;&nbsp;SetThink( NULL );
&nbsp;&nbsp;&nbsp;&nbsp;pev->nextthink = 0;
}

Any HLTV Proxy that connects to a server has the SteamID of HLTV, which makes it easier to distinguish from real players.
Reply


Messages In This Thread
Ricochet HLTV Support - by GoD-Tony - 09-16-2007, 06:18 PM
Ricochet HLTV Support - by GoD-Tony - 09-16-2007, 07:19 PM
Ricochet HLTV Support - by PZ: Tribute - 09-16-2007, 08:55 PM
Ricochet HLTV Support - by GoD-Tony - 09-17-2007, 11:12 PM
Ricochet HLTV Support - by Miagi - 09-18-2007, 06:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)