summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDaniel O'Brien <marmot.daniel@gmail.com>2013-11-13 15:05:58 +0100
committerDaniel O'Brien <marmot.daniel@gmail.com>2013-11-13 15:05:58 +0100
commitfc0b6adf51f6f3b847b98be1d5a3454c65109a90 (patch)
tree394ac7dd8cb0ca60cf5ac5c165cbfdf7be452fa6 /source
parentPlayer Xp (diff)
downloadcuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar.gz
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar.bz2
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar.lz
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar.xz
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.tar.zst
cuberite-fc0b6adf51f6f3b847b98be1d5a3454c65109a90.zip
Diffstat (limited to '')
-rw-r--r--source/Entities/Player.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp
index 31834df39..a39eda1ba 100644
--- a/source/Entities/Player.cpp
+++ b/source/Entities/Player.cpp
@@ -1374,13 +1374,14 @@ bool cPlayer::LoadFromDisk()
}
m_Health = root.get("health", 0).asInt();
- m_XpLevel = root.get("experience", 0).asInt();
m_AirLevel = root.get("air", MAX_AIR_LEVEL).asInt();
m_FoodLevel = root.get("food", MAX_FOOD_LEVEL).asInt();
m_FoodSaturationLevel = root.get("foodSaturation", MAX_FOOD_LEVEL).asDouble();
m_FoodTickTimer = root.get("foodTickTimer", 0).asInt();
m_FoodExhaustionLevel = root.get("foodExhaustion", 0).asDouble();
+ SetExperience(root.get("experience", 0).asInt());
+
m_GameMode = (eGameMode) root.get("gamemode", eGameMode_NotSet).asInt();
m_Inventory.LoadFromJson(root["inventory"]);