MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / OnFrame

Method OnFrame

ogsr_engine/xrGame/Level.cpp:377–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377void CLevel::OnFrame()
378{
379 m_feel_deny.update();
380
381 // commit events from bullet manager from prev-frame
382 Device.Statistic->BulletManager.Begin();
383 BulletManager().CommitEvents();
384 Device.Statistic->BulletManager.End();
385
386 ClientReceive();
387
388 ProcessGameEvents();
389
390 MapManager().Update();
391 // Inherited update
392 inherited::OnFrame();
393
394 extern bool editor_override_time;
395
396 if (!editor_override_time)
397 {
398 g_pGamePersistent->Environment().SetGameTime(GetEnvironmentGameDayTimeSec(), game->GetEnvironmentGameTimeFactor());
399 }
400
401 m_ph_commander->update();
402 m_ph_commander_scripts->update();
403
404 //просчитать полет пуль
405 Device.Statistic->BulletManager.Begin();
406 BulletManager().CommitRenderSet();
407 Device.Statistic->BulletManager.End();
408
409 // update static sounds
410 if (g_mt_config.test(mtLevelSounds))
411 Device.add_to_seq_parallel(fastdelegate::MakeDelegate(m_level_sound_manager, &CLevelSoundManager::Update));
412 else
413 m_level_sound_manager->Update();
414
415 if (!sound_registry_defer.empty())
416 Device.add_to_seq_parallel(fastdelegate::MakeDelegate(this, &CLevel::PrefetchDeferredSounds));
417
418 if (ps_lua_gc_method != gc_timeout)
419 Device.add_to_seq_parallel(fastdelegate::MakeDelegate(this, &CLevel::script_gc));
420
421 CImGuiEditor& editor = CImGuiEditor::Get();
422 editor.ShowEditor();
423}
424
425extern Flags32 dbg_net_Draw_Flags;
426

Callers 4

DoWorkMethod · 0.45
UpdateCLMethod · 0.45
UIOnFrameMethod · 0.45

Calls 14

OnFrameFunction · 0.85
GetFunction · 0.85
CommitEventsMethod · 0.80
SetGameTimeMethod · 0.80
EnvironmentMethod · 0.80
CommitRenderSetMethod · 0.80
ShowEditorMethod · 0.80
updateMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected