void ClientActive( edict_t *pEdict, bool bLoadGame ) { CHL2_Player *pPlayer = dynamic_cast< CHL2_Player* >( CBaseEntity::Instance( pEdict ) ); Assert( pPlayer ); if ( !pPlayer ) { return; } pPlayer->InitialSpawn(); if ( !bLoadGame ) { pPlayer->Spawn(); } }
void ClientActive( edict_t *pEdict, bool bLoadGame ) { CHL2_Player *pPlayer = dynamic_cast< CHL2_Player* >( CBaseEntity::Instance( pEdict ) ); Assert( pPlayer ); if ( !pPlayer ) { return; } pPlayer->InitialSpawn(); if ( !bLoadGame ) { pPlayer->Spawn(); } // Make sure the timer isn't running and request that it sends the map // record to the HUD. timer()->Init(); timer()->DispatchTimeToBeatMessage(); }
// called by ClientKill and DeadThink void respawn( CBaseEntity *pEdict, bool fCopyCorpse ) { CHL2_Player *pPlayer = (CHL2_Player *)pEdict; if (pPlayer) { if (sv_player_hardcoremode.GetBool() && !g_pGameRules->IsMultiplayer()) { engine->ServerCommand("reload\n"); } /* else if (pPlayer->GetLevel() == MAX_LEVEL && !g_pGameRules->IsMultiplayer()) { char szMapCommand[1024]; // create the command to execute Q_snprintf(szMapCommand, sizeof(szMapCommand), "map credits\nprogress_enable\n"); engine->ServerCommand(szMapCommand); } */ else { pPlayer->Spawn(); } } }