Fix craftresult_is_preview flood in log and remove unnecessary debug output

This commit is contained in:
Kahrl 2012-01-23 15:28:57 +01:00 committed by Perttu Ahola
parent 24b1008d56
commit 0e8bd531c2
2 changed files with 3 additions and 5 deletions

@ -159,7 +159,6 @@ function minetest.get_node_drops(nodename, toolname)
local drop = ItemStack({name=nodename}):get_definition().drop local drop = ItemStack({name=nodename}):get_definition().drop
if drop == nil then if drop == nil then
-- default drop -- default drop
print("default drop: " .. nodename)
return {ItemStack({name=nodename})} return {ItemStack({name=nodename})}
elseif type(drop) == "string" then elseif type(drop) == "string" then
-- itemstring drop -- itemstring drop

@ -156,10 +156,6 @@ void Player::deSerialize(std::istream &is)
setPitch(args.getFloat("pitch")); setPitch(args.getFloat("pitch"));
setYaw(args.getFloat("yaw")); setYaw(args.getFloat("yaw"));
setPosition(args.getV3F("position")); setPosition(args.getV3F("position"));
bool craftresult_is_preview = true;
try{
craftresult_is_preview = args.getBool("craftresult_is_preview");
}catch(SettingNotFoundException &e){}
try{ try{
hp = args.getS32("hp"); hp = args.getS32("hp");
}catch(SettingNotFoundException &e){ }catch(SettingNotFoundException &e){
@ -173,6 +169,9 @@ void Player::deSerialize(std::istream &is)
// Convert players without craftpreview // Convert players without craftpreview
inventory.addList("craftpreview", 1); 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) if(craftresult_is_preview)
{ {
// Clear craftresult // Clear craftresult