| 309 | } |
| 310 | |
| 311 | void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int clientMax) |
| 312 | { |
| 313 | static ConVar *tv_enable = icvar->FindVar("tv_enable"); |
| 314 | #if SOURCE_ENGINE == SE_TF2 |
| 315 | static ConVar *replay_enable = icvar->FindVar("replay_enable"); |
| 316 | #endif |
| 317 | |
| 318 | ICommandLine *commandLine = g_HL2.GetValveCommandLine(); |
| 319 | m_bIsSourceTVActive = (tv_enable && tv_enable->GetBool() && (!commandLine || commandLine->FindParm("-nohltv") == 0)); |
| 320 | m_bIsReplayActive = false; |
| 321 | #if SOURCE_ENGINE == SE_TF2 |
| 322 | m_bIsReplayActive = (replay_enable && replay_enable->GetBool()); |
| 323 | #endif |
| 324 | m_PlayersSinceActive = 0; |
| 325 | |
| 326 | g_OnMapStarted = true; |
| 327 | m_bServerActivated = true; |
| 328 | |
| 329 | extsys->CallOnCoreMapStart(pEdictList, edictCount, m_maxClients); |
| 330 | |
| 331 | m_onActivate->Execute(NULL); |
| 332 | m_onActivate2->Execute(NULL); |
| 333 | |
| 334 | List<IClientListener *>::iterator iter; |
| 335 | for (iter = m_hooks.begin(); iter != m_hooks.end(); iter++) |
| 336 | { |
| 337 | if ((*iter)->GetClientListenerVersion() >= 5) |
| 338 | { |
| 339 | (*iter)->OnServerActivated(m_maxClients); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | SMGlobalClass *cls = SMGlobalClass::head; |
| 344 | while (cls) |
| 345 | { |
| 346 | cls->OnSourceModLevelActivated(); |
| 347 | cls = cls->m_pGlobalClassNext; |
| 348 | } |
| 349 | |
| 350 | SM_ExecuteAllConfigs(); |
| 351 | } |
| 352 | |
| 353 | bool PlayerManager::IsServerActivated() |
| 354 | { |
nothing calls this directly
no test coverage detected