summaryrefslogtreecommitdiffstats
path: root/src/MonsterConfig.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/MonsterConfig.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/MonsterConfig.cpp')
-rw-r--r--src/MonsterConfig.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MonsterConfig.cpp b/src/MonsterConfig.cpp
index 6d1e2c235..1cb91dfec 100644
--- a/src/MonsterConfig.cpp
+++ b/src/MonsterConfig.cpp
@@ -16,7 +16,7 @@ struct cMonsterConfig::sAttributesStruct
int m_AttackDamage;
int m_AttackRange;
double m_AttackRate;
- int m_MaxHealth;
+ double m_MaxHealth;
bool m_IsFireproof;
bool m_BurnsInDaylight;
};
@@ -74,7 +74,7 @@ void cMonsterConfig::Initialize()
Attributes.m_AttackRange = MonstersIniFile.GetValueI(Name, "AttackRange", 0);
Attributes.m_SightDistance = MonstersIniFile.GetValueI(Name, "SightDistance", 0);
Attributes.m_AttackRate = MonstersIniFile.GetValueF(Name, "AttackRate", 0);
- Attributes.m_MaxHealth = MonstersIniFile.GetValueI(Name, "MaxHealth", 1);
+ Attributes.m_MaxHealth = MonstersIniFile.GetValueF(Name, "MaxHealth", 1);
Attributes.m_IsFireproof = MonstersIniFile.GetValueB(Name, "IsFireproof", false);
Attributes.m_BurnsInDaylight = MonstersIniFile.GetValueB(Name, "BurnsInDaylight", false);
m_pState->AttributesList.push_front(Attributes);
@@ -96,7 +96,7 @@ void cMonsterConfig::AssignAttributes(cMonster * a_Monster, const AString & a_Na
a_Monster->SetAttackRange (itr->m_AttackRange);
a_Monster->SetSightDistance (itr->m_SightDistance);
a_Monster->SetAttackRate (static_cast<float>(itr->m_AttackRate));
- a_Monster->SetMaxHealth (itr->m_MaxHealth);
+ a_Monster->SetMaxHealth (static_cast<float>(itr->m_MaxHealth));
a_Monster->SetIsFireproof (itr->m_IsFireproof);
a_Monster->SetBurnsInDaylight(itr->m_BurnsInDaylight);
return;