#include "mg_schematic.h"
#include "nodedef.h"
#include "profiler.h"
-#include "scripting_game.h"
+#include "scripting_server.h"
#include "server.h"
#include "serverobject.h"
#include "settings.h"
Mapgen *EmergeManager::getCurrentMapgen()
{
+ if (!m_threads_active)
+ return NULL;
+
for (u32 i = 0; i != m_threads.size(); i++) {
if (m_threads[i]->isCurrentThread())
return m_threads[i]->m_mapgen;
m_server->getScriptIface()->environment_OnGenerated(
minp, maxp, m_mapgen->blockseed);
} catch (LuaError &e) {
- m_server->setAsyncFatalError("Lua: " + std::string(e.what()));
+ m_server->setAsyncFatalError("Lua: finishGen" + std::string(e.what()));
}
EMERGE_DBG_OUT("ended up with: " << analyze_block(block));
continue;
}
- if (blockpos_over_limit(pos))
+ if (blockpos_over_max_limit(pos))
continue;
bool allow_gen = bedata.flags & BLOCK_EMERGE_ALLOW_GEN;