From 180a43d09721a32ad502f5e583d3b2d797501c00 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 27 Sep 2019 17:51:44 +0200 Subject: Fixed MSVC warnings (#4400) --- src/MonsterConfig.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/MonsterConfig.cpp') 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(itr->m_AttackRate)); - a_Monster->SetMaxHealth (itr->m_MaxHealth); + a_Monster->SetMaxHealth (static_cast(itr->m_MaxHealth)); a_Monster->SetIsFireproof (itr->m_IsFireproof); a_Monster->SetBurnsInDaylight(itr->m_BurnsInDaylight); return; -- cgit v1.2.3