Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Nov 13, 2024
1 parent c137674 commit b5bb421
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
dest=$(mktemp -d)
unzip -q -d "$dest" B/build/*.zip
cd "$dest"/luanti-*-win*
cd "$dest"/freeminer-*-win*
wine bin/freeminer.exe --version
- uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ if(NOT MSVC)

endif()

if(CMAKE_SYSTEM_NAME MATCHES "(Darwin|BSD|DragonFly)")
if(CMAKE_SYSTEM_NAME MATCHES "(BSD|DragonFly)") # Darwin|
SET(PLATFORM_LIBS ${PLATFORM_LIBS} execinfo)
endif()

Expand Down
3 changes: 2 additions & 1 deletion src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,9 @@ void Client::initLocalMapSaving(const Address &address,
gamespec = findSubgame("devtest");
conf.set("gameid", gamespec.id); // Later rewrited from server data
} else {
gamespec = findWorldSubgame(world_path);
// gamespec = findWorldSubgame(world_path);
}

std::string backend = conf.get("backend");
m_localdb = ServerMap::createDatabase(backend, world_path, conf);

Expand Down
16 changes: 13 additions & 3 deletions src/client/fm_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "emerge.h"
#include "fm_world_merge.h"
#include "irr_v3d.h"
#include "log.h"
#include "mapblock.h"
#include "network/fm_networkprotocol.h"
#include "server.h"
Expand Down Expand Up @@ -129,14 +130,23 @@ void Client::MakeEmerge(const Settings &settings, const MapgenType &mgtype)
const thread_local static auto farmesh_range = g_settings->getS32("farmesh");

if (farmesh_range && !m_localserver) {
m_localserver = std::make_unique<Server>(
"farmesh", findSubgame("devtest"), false, Address{}, true);
// Todo: make very small special game with only far nodes definitions
for (const auto &game : {"devtest", "default"}) {
try {
m_localserver = std::make_unique<Server>(
"farmesh", findSubgame(game), false, Address{}, true);
break;
} catch (const std::exception &ex) {
errorstream << "Failed to make local mapgen server with game " << game
<< " : " << ex.what() << "\n";
}
}
}
m_mapgen_params = std::unique_ptr<MapgenParams>(Mapgen::createMapgenParams(mgtype));
m_mapgen_params->MapgenParams::readParams(&settings);
m_mapgen_params->readParams(&settings);

if (!m_simple_singleplayer_mode && farmesh_range) {
if (!m_simple_singleplayer_mode && farmesh_range && m_localserver) {
const auto num_emerge_threads = g_settings->get("num_emerge_threads");
g_settings->set("num_emerge_threads", "1");
m_emerge = std::make_unique<EmergeManager>(
Expand Down

0 comments on commit b5bb421

Please sign in to comment.