=============== idSessionLocal::PacifierUpdate =============== */
| 2458 | =============== |
| 2459 | */ |
| 2460 | void 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 | =============== |
no test coverage detected