summaryrefslogtreecommitdiffstats
path: root/source/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Entities/Player.cpp')
-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"]);