forked from Mirrorlandia_minetest/minetest
world.mt creation
This commit is contained in:
parent
7f7fb9750d
commit
6a1b6d0344
@ -899,6 +899,15 @@ Server::Server(
|
||||
infostream<<"- mods: "<<modspath<<std::endl;
|
||||
}
|
||||
|
||||
// Create world.mt if does not already exist
|
||||
std::string worldmt_path = m_path_world + DIR_DELIM + "world.mt";
|
||||
if(!fs::PathExists(worldmt_path)){
|
||||
infostream<<"Creating world.mt ("<<worldmt_path<<")"<<std::endl;
|
||||
fs::CreateAllDirs(m_path_world);
|
||||
std::ofstream of(worldmt_path.c_str(), std::ios::binary);
|
||||
of<<"gameid = "<<m_gamespec.id<<"\n";
|
||||
}
|
||||
|
||||
// Lock environment
|
||||
JMutexAutoLock envlock(m_env_mutex);
|
||||
JMutexAutoLock conlock(m_con_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user