From 8ca08a850ff2494652aa0ac2daa3d00f03aa4e7a Mon Sep 17 00:00:00 2001 From: fz72 Date: Sun, 15 Mar 2015 14:52:10 +0100 Subject: Save creative_mode and enable_damage setting for each world in world.mt Create Parameters on world initialisation and set settings of old worlds --- src/subgame.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/subgame.cpp b/src/subgame.cpp index 4e8777d13..a3edcda2e 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -283,7 +283,9 @@ bool initializeWorld(const std::string &path, const std::string &gameid) std::string worldmt_path = path + DIR_DELIM "world.mt"; if (!fs::PathExists(worldmt_path)) { std::ostringstream ss(std::ios_base::binary); - ss << "gameid = " << gameid << "\nbackend = sqlite3\n"; + ss << "gameid = " << gameid << "\nbackend = sqlite3\n" + << "creative_mode = " << g_settings->get("creative_mode") + << "\nenable_damage = " << g_settings->get("enable_damage") << "\n"; if (!fs::safeWriteToFile(worldmt_path, ss.str())) return false; -- cgit v1.2.3