diff options
Diffstat (limited to 'src/MonsterConfig.cpp')
-rw-r--r-- | src/MonsterConfig.cpp | 6 |
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; |