mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Don't re-write entire map_meta.txt if a setting is missing
This commit is contained in:
		
							
								
								
									
										12
									
								
								src/map.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/map.cpp
									
									
									
									
									
								
							@@ -3466,8 +3466,16 @@ void ServerMap::loadMapMeta()
 | 
			
		||||
			break;
 | 
			
		||||
		params.parseConfigLine(line);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	MapgenParams *mgparams = m_emerge->getParamsFromSettings(¶ms);
 | 
			
		||||
	
 | 
			
		||||
	MapgenParams *mgparams;
 | 
			
		||||
	try {
 | 
			
		||||
		mgparams = m_emerge->getParamsFromSettings(¶ms);
 | 
			
		||||
	} catch (SettingNotFoundException &e) {
 | 
			
		||||
		infostream << "Couldn't get a setting from map_meta.txt: "
 | 
			
		||||
				   << e.what() << std::endl;
 | 
			
		||||
		mgparams = NULL;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	if (mgparams) {
 | 
			
		||||
		if (m_mgparams)
 | 
			
		||||
			delete m_mgparams;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user