1
0

Store Health as a float (#4073)

* Fix #4024

* Fix clang error

* Add comment

* Fix behaviour

* Save Health as float

* Changed m_Health to float

* Remove redundant static_cast

* Fix casts
This commit is contained in:
Fabian
2017-11-22 14:47:52 +01:00
committed by Alexander Harkness
parent ef091fe24b
commit 0dd172b80f
6 changed files with 35 additions and 16 deletions

View File

@@ -431,7 +431,7 @@ void cNBTChunkSerializer::AddBasicEntity(cEntity * a_Entity, const AString & a_C
m_Writer.AddDouble("", a_Entity->GetYaw());
m_Writer.AddDouble("", a_Entity->GetPitch());
m_Writer.EndList();
m_Writer.AddShort("Health", static_cast<Int16>(a_Entity->GetHealth()));
m_Writer.AddFloat("Health", a_Entity->GetHealth());
}