Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Serverlist: announce mg_name from map_meta.txt instead of minetest.conf
  • Loading branch information
kahrl committed Nov 10, 2014
1 parent a1e9732 commit 0adadba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server.cpp
Expand Up @@ -687,6 +687,7 @@ void Server::AsyncRunStep(bool initial_step)
m_env->getGameTime(),
m_lag,
m_gamespec.id,
m_emerge->params.mg_name,
m_mods);
counter = 0.01;
}
Expand Down
3 changes: 2 additions & 1 deletion src/serverlist.cpp
Expand Up @@ -194,6 +194,7 @@ void sendAnnounce(const std::string &action,
const u32 game_time,
const float lag,
const std::string &gameid,
const std::string &mg_name,
const std::vector<ModSpec> &mods)
{
Json::Value server;
Expand Down Expand Up @@ -227,7 +228,7 @@ void sendAnnounce(const std::string &action,
if (action == "start") {
server["dedicated"] = g_settings->getBool("server_dedicated");
server["rollback"] = g_settings->getBool("enable_rollback_recording");
server["mapgen"] = g_settings->get("mg_name");
server["mapgen"] = mg_name;
server["privs"] = g_settings->get("default_privs");
server["can_see_far_names"] = g_settings->getS16("player_transfer_distance") <= 0;
server["mods"] = Json::Value(Json::arrayValue);
Expand Down
1 change: 1 addition & 0 deletions src/serverlist.h
Expand Up @@ -42,6 +42,7 @@ namespace ServerList
const std::vector<std::string> &clients_names = std::vector<std::string>(),
const double uptime = 0, const u32 game_time = 0,
const float lag = 0, const std::string &gameid = "",
const std::string &mg_name = "",
const std::vector<ModSpec> &mods = std::vector<ModSpec>());
#endif
} // ServerList namespace
Expand Down

0 comments on commit 0adadba

Please sign in to comment.