示例#1
0
/*
============
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;
}