aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2012-01-23 15:28:57 +0100
committerPerttu Ahola <celeron55@gmail.com>2012-01-25 20:18:20 +0200
commit0e8bd531c243c4e19217ef249c2316710cee44cc (patch)
treee677a8d48cf38c3f87f743aeb3061ff4dfff96e4 /src
parent24b1008d5634eb0941a6f97743dbbf1f8c353baf (diff)
downloadminetest-0e8bd531c243c4e19217ef249c2316710cee44cc.tar.gz
minetest-0e8bd531c243c4e19217ef249c2316710cee44cc.tar.bz2
minetest-0e8bd531c243c4e19217ef249c2316710cee44cc.zip
Fix craftresult_is_preview flood in log and remove unnecessary debug output
Diffstat (limited to 'src')
-rw-r--r--src/player.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 688be5d98..6506c43c3 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