summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-09-27 17:51:44 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-09-27 17:51:44 +0200
commit180a43d09721a32ad502f5e583d3b2d797501c00 (patch)
tree3b70a9188246ce86b3846c5d9d783171efa1dec3 /src/Entities/Player.cpp
parentFix clang8.0 build (#4399) (diff)
downloadcuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.gz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.bz2
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.lz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.xz
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.tar.zst
cuberite-180a43d09721a32ad502f5e583d3b2d797501c00.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 050b4adb9..e7b6ade15 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2209,7 +2209,7 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World)
SetRoll (static_cast<float>(JSON_PlayerRotation[2].asDouble()));
}
- m_Health = root.get("health", 0).asInt();
+ m_Health = root.get("health", 0).asFloat();
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();