Well here's the entire function I was looking at.
Could just add the disconnect check to the one? Its been awhile since my C++ class but.
That should work? Think they both would work :P
EDIT*
Edited again. Had the wrong For statement :P
Code:
void CDiscArena::CountDownThink( void )
{
// Freeze everyone until there's 3 seconds to go
if ( m_iSecondsTillStart == 3 )
{
 for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
 {
 //.ASM : white disc haxxx...
 // if the player is "dead" during the round countdown,
 // then bring the bastard back...
 if(!m_hCombatants[i]->IsAlive())
  m_hCombatants[i]->Spawn();
 // end .ASM
 if (m_hCombatants[i])
  ((CBaseEntity*)m_hCombatants[i])->pev->maxspeed = 320;
 }
}
m_iSecondsTillStart--;
// Play countdown VOX
if (m_iSecondsTillStart < 5)
{
 // Speech
 for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
 {
 if (m_hCombatants[i])
  ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i])->ClientHearVox( g_szCountDownVox[ m_iSecondsTillStart ] );
 }
}
// Send the message to the clients in the arena
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
{
 CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex( i );
 if (pPlayer && (pPlayer->pev->groupinfo & pev->groupinfo) && pPlayer->m_bHasDisconnected != TRUE)
 {
 MESSAGE_BEGIN( MSG_ONE, gmsgStartRnd, NULL, pPlayer->edict() );
  WRITE_BYTE( m_iCurrRound );
  WRITE_BYTE( m_iSecondsTillStart );
  WRITE_BYTE( 0 );
 MESSAGE_END();
 }
}
if (m_iSecondsTillStart)
{
 pev->nextthink = gpGlobals->time + 1.0;
}
else
{
 m_iArenaState = ARENA_BATTLE_IN_PROGRESS;
 // Enable powerups
 CBaseEntity *pFunc = NULL;
 while ((pFunc = UTIL_FindEntityByClassname( pFunc, "item_powerup" )) != NULL)
 {
 ((CDiscwarPowerup*)pFunc)->Enable();
 }
 pev->nextthink = gpGlobals->time + 1.0;
 SetThink( BattleThink );
}
}
Could just add the disconnect check to the one? Its been awhile since my C++ class but.
Code:
if(!m_hCombatants[i]->IsAlive() && m_bHasDisconnected != TRUE)
m_hCombatants[i]->Spawn();
// end .ASM
That should work? Think they both would work :P
EDIT*
Code:
// Freeze everyone until there's 3 seconds to go
if ( m_iSecondsTillStart == 3 )
{
for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
{
CBasePlayer *pPlayer = ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i]);
//.ASM : white disc haxxx...
// if the player is "dead" during the round countdown,
// then bring the bastard back...
if(!m_hCombatants[i]->IsAlive() && pPlayer->m_bHasDisconnected != TRUE)
m_hCombatants[i]->Spawn();
// end .ASM
if (m_hCombatants[i])
((CBaseEntity*)m_hCombatants[i])->pev->maxspeed = 320;
}
}
Edited again. Had the wrong For statement :P
<@Miagi> !8 Am I spamming?
<@ChanServ> Miagi: Yes.
<@Miagi> !8 Should I stop?
<@ChanServ> Miagi: Oh, please, PLEASE, make it stop!
<@ChanServ> Miagi: Yes.
<@Miagi> !8 Should I stop?
<@ChanServ> Miagi: Oh, please, PLEASE, make it stop!