| 65 | ////////////////////////////////////////////////////////////////////// |
| 66 | |
| 67 | CLevel::CLevel() |
| 68 | : IPureClient(Device.GetTimerGlobal()) |
| 69 | #ifdef PROFILE_CRITICAL_SECTIONS |
| 70 | , |
| 71 | DemoCS(MUTEX_PROFILE_ID(DemoCS)) |
| 72 | #endif // PROFILE_CRITICAL_SECTIONS |
| 73 | { |
| 74 | lua_gc(ai().script_engine().lua(), LUA_GCSTOP, 0); |
| 75 | lua_gc(ai().script_engine().lua(), LUA_GCSETSTEPMUL, 5); |
| 76 | |
| 77 | g_bDebugEvents = strstr(Core.Params, "-debug_ge") ? TRUE : FALSE; |
| 78 | |
| 79 | Server = NULL; |
| 80 | |
| 81 | game = NULL; |
| 82 | // game = xr_new<game_cl_GameState>(); |
| 83 | game_events = xr_new<NET_Queue_Event>(); |
| 84 | |
| 85 | game_configured = FALSE; |
| 86 | m_bGameConfigStarted = FALSE; |
| 87 | |
| 88 | eChangeRP = Engine.Event.Handler_Attach("LEVEL:ChangeRP", this); |
| 89 | eDemoPlay = Engine.Event.Handler_Attach("LEVEL:PlayDEMO", this); |
| 90 | eChangeTrack = Engine.Event.Handler_Attach("LEVEL:PlayMusic", this); |
| 91 | eEnvironment = Engine.Event.Handler_Attach("LEVEL:Environment", this); |
| 92 | |
| 93 | eEntitySpawn = Engine.Event.Handler_Attach("LEVEL:spawn", this); |
| 94 | |
| 95 | m_pBulletManager = xr_new<CBulletManager>(); |
| 96 | |
| 97 | m_map_manager = xr_new<CMapManager>(); |
| 98 | |
| 99 | physics_step_time_callback = (PhysicsStepTimeCallback*)&PhisStepsCallback; |
| 100 | m_seniority_hierarchy_holder = xr_new<CSeniorityHierarchyHolder>(); |
| 101 | |
| 102 | m_level_sound_manager = xr_new<CLevelSoundManager>(); |
| 103 | m_space_restriction_manager = xr_new<CSpaceRestrictionManager>(); |
| 104 | m_client_spawn_manager = xr_new<CClientSpawnManager>(); |
| 105 | |
| 106 | m_debug_renderer = xr_new<CDebugRenderer>(); |
| 107 | #ifdef DEBUG |
| 108 | m_level_debug = xr_new<CLevelDebug>(); |
| 109 | #endif |
| 110 | |
| 111 | m_ph_commander = xr_new<CPHCommander>(); |
| 112 | m_ph_commander_scripts = xr_new<CPHCommander>(); |
| 113 | |
| 114 | #ifdef DEBUG |
| 115 | m_bSynchronization = false; |
| 116 | #endif |
| 117 | |
| 118 | pCurrentControlEntity = NULL; |
| 119 | |
| 120 | //--------------------------------------------------------- |
| 121 | m_dwCL_PingLastSendTime = 0; |
| 122 | m_dwCL_PingDeltaSend = 1000; |
| 123 | m_dwRealPing = 0; |
| 124 |
nothing calls this directly
no test coverage detected