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

Method UpdatePureServerChecksums

neo/framework/FileSystem.cpp:2393–2423  ·  view source on GitHub ↗

===================== idFileSystemLocal::UpdatePureServerChecksums ===================== */

Source from the content-addressed store, hash-verified

2391=====================
2392*/
2393void idFileSystemLocal::UpdatePureServerChecksums( void ) {
2394 searchpath_t *search;
2395 int i;
2396 pureStatus_t status;
2397
2398 serverPaks.Clear();
2399 for ( search = searchPaths; search; search = search->next ) {
2400 // is the element a referenced pak file?
2401 if ( !search->pack ) {
2402 continue;
2403 }
2404 status = GetPackStatus( search->pack );
2405 if ( status == PURE_NEVER ) {
2406 continue;
2407 }
2408 if ( status == PURE_NEUTRAL && !search->pack->referenced ) {
2409 continue;
2410 }
2411 serverPaks.Append( search->pack );
2412 if ( serverPaks.Num() >= MAX_PURE_PAKS ) {
2413 common->FatalError( "MAX_PURE_PAKS ( %d ) exceeded\n", MAX_PURE_PAKS );
2414 }
2415 }
2416 if ( fs_debug.GetBool() ) {
2417 idStr checks;
2418 for ( i = 0; i < serverPaks.Num(); i++ ) {
2419 checks += va( "%x ", serverPaks[ i ]->checksum );
2420 }
2421 common->Printf( "set pure list - %d paks ( %s)\n", serverPaks.Num(), checks.c_str() );
2422 }
2423}
2424
2425/*
2426=====================

Callers 1

ExecuteMapChangeMethod · 0.80

Calls 8

vaFunction · 0.85
ClearMethod · 0.45
AppendMethod · 0.45
NumMethod · 0.45
FatalErrorMethod · 0.45
GetBoolMethod · 0.45
PrintfMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected