/* ============ idAASLocal::Init ============ */ bool idAASLocal::Init( const idStr &mapName, unsigned int mapFileCRC ) { if ( file && mapName.Icmp( file->GetName() ) == 0 && mapFileCRC == file->GetCRC() ) { gameLocal.Printf( "Keeping %s\n", file->GetName() ); RemoveAllObstacles(); } else { Shutdown(); file = AASFileManager->LoadAAS( mapName, mapFileCRC ); if ( !file ) { common->DWarning( "Couldn't load AAS file: '%s'", mapName.c_str() ); return false; } // RAVEN BEGIN // rhummer: Check if this is a dummy file, since it really has no valid data dump it. else if ( file->IsDummyFile( mapFileCRC ) ) { AASFileManager->FreeAAS( file ); file = NULL; return false; } // RAVEN END SetupRouting(); } return true; }
/* ============ idAASLocal::Shutdown ============ */ void idAASLocal::Shutdown( void ) { if ( file ) { ShutdownRouting(); RemoveAllObstacles(); AASFileManager->FreeAAS( file ); file = NULL; } }
/* ============ idAASLocal::Shutdown ============ */ void idAASLocal::Shutdown( void ) { if ( file ) { elevatorSystem->Clear(); ShutdownRouting(); RemoveAllObstacles(); AASFileManager->FreeAAS( file ); file = NULL; } }
/* ============ idAASLocal::Init ============ */ bool idAASLocal::Init( const idStr &mapName, unsigned int mapFileCRC ) { if( file && mapName.Icmp( file->GetName() ) == 0 && mapFileCRC == file->GetCRC() ) { common->Printf( "Keeping %s\n", file->GetName() ); RemoveAllObstacles(); } else { Shutdown(); file = AASFileManager->LoadAAS( mapName, mapFileCRC ); if( !file ) { common->DWarning( "Couldn't load AAS file: '%s'", mapName.c_str() ); return false; } SetupRouting(); } return true; }
/* ============ idAASLocal::Init ============ */ bool idAASLocal::Init( const idStr &mapName, const unsigned int mapFileCRC ) { // Clear the elevator system before reloading elevatorSystem->Clear(); if ( file && mapName.Icmp( file->GetName() ) == 0 && mapFileCRC == file->GetCRC() ) { common->Printf( "Keeping %s\n", file->GetName() ); RemoveAllObstacles(); } else { Shutdown(); file = AASFileManager->LoadAAS( mapName, mapFileCRC ); if ( !file ) { common->DWarning( "Couldn't load AAS file: '%s'", mapName.c_str() ); return false; } mapName.ExtractFileExtension(name); SetupRouting(); } return true; }