From 0e8bd531c243c4e19217ef249c2316710cee44cc Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 23 Jan 2012 15:28:57 +0100 Subject: [PATCH] Fix craftresult_is_preview flood in log and remove unnecessary debug output --- data/builtin.lua | 1 - src/player.cpp | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/data/builtin.lua b/data/builtin.lua index 2e31c43..3a38b60 100644 --- a/data/builtin.lua +++ b/data/builtin.lua @@ -159,7 +159,6 @@ function minetest.get_node_drops(nodename, toolname) local drop = ItemStack({name=nodename}):get_definition().drop if drop == nil then -- default drop - print("default drop: " .. nodename) return {ItemStack({name=nodename})} elseif type(drop) == "string" then -- itemstring drop diff --git a/src/player.cpp b/src/player.cpp index 688be5d..6506c43 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -156,10 +156,6 @@ void Player::deSerialize(std::istream &is) setPitch(args.getFloat("pitch")); setYaw(args.getFloat("yaw")); setPosition(args.getV3F("position")); - bool craftresult_is_preview = true; - try{ - craftresult_is_preview = args.getBool("craftresult_is_preview"); - }catch(SettingNotFoundException &e){} try{ hp = args.getS32("hp"); }catch(SettingNotFoundException &e){ @@ -173,6 +169,9 @@ void Player::deSerialize(std::istream &is) // Convert players without craftpreview inventory.addList("craftpreview", 1); + bool craftresult_is_preview = true; + if(args.exists("craftresult_is_preview")) + craftresult_is_preview = args.getBool("craftresult_is_preview"); if(craftresult_is_preview) { // Clear craftresult