MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / PacifierUpdate

Method PacifierUpdate

neo/framework/Session.cpp:2460–2492  ·  view source on GitHub ↗

=============== idSessionLocal::PacifierUpdate =============== */

Source from the content-addressed store, hash-verified

2458===============
2459*/
2460void idSessionLocal::PacifierUpdate() {
2461 if ( !insideExecuteMapChange ) {
2462 return;
2463 }
2464
2465 // never do pacifier screen updates while inside the
2466 // drawing code, or we can have various recursive problems
2467 if ( insideUpdateScreen ) {
2468 return;
2469 }
2470
2471 int time = eventLoop->Milliseconds();
2472
2473 if ( time - lastPacifierTime < 100 ) {
2474 return;
2475 }
2476 lastPacifierTime = time;
2477
2478 if ( guiLoading && bytesNeededForMapLoad ) {
2479 float n = fileSystem->GetReadCount();
2480 float pct = ( n / bytesNeededForMapLoad );
2481 // pct = idMath::ClampFloat( 0.0f, 100.0f, pct );
2482 guiLoading->SetStateFloat( "map_loading", pct );
2483 guiLoading->StateChanged( com_frameTime );
2484 }
2485
2486 Sys_GenerateEvents();
2487
2488 UpdateScreen();
2489
2490 idAsyncNetwork::client.PacifierUpdate();
2491 idAsyncNetwork::server.PacifierUpdate();
2492}
2493
2494/*
2495===============

Callers 3

VPrintfMethod · 0.45
EndLevelLoadMethod · 0.45
EndLevelLoadMethod · 0.45

Calls 5

Sys_GenerateEventsFunction · 0.85
SetStateFloatMethod · 0.80
MillisecondsMethod · 0.45
GetReadCountMethod · 0.45
StateChangedMethod · 0.45

Tested by

no test coverage detected