summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Monster.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-06-13 09:49:42 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:21 +0200
commit045ae2ef2c0d72b4902fa5151aad095823da9300 (patch)
treeb07e3bb81f725b6546272c3d6d2d7edaec46299e /src/Mobs/Monster.cpp
parentPawn: renamed HandleEntityEffects to HandleEntityEffect (diff)
downloadcuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar.gz
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar.bz2
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar.lz
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar.xz
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.tar.zst
cuberite-045ae2ef2c0d72b4902fa5151aad095823da9300.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 4dfd81d88..8a8c4f67a 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -459,7 +459,7 @@ void cMonster::HandleEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffe
// Undead mobs are healed by instant damage
// Base heal = 6, doubles for every increase in intensity
- Heal(6 * std::pow(2, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier());
+ Heal((int)(6 * std::pow(2.0, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier()));
return;
}
case cEntityEffect::effInstantHealth:
@@ -469,8 +469,8 @@ void cMonster::HandleEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffe
// Undead mobs are damaged by instant health
// Base damage = 6, doubles for every increase in intensity
- int damage = 6 * std::pow(2, a_Effect.GetIntensity());
- TakeDamage(dtPotionOfHarming, a_Effect.GetUser(), damage * a_Effect.GetDistanceModifier(), 0);
+ int damage = (int)(6 * std::pow(2.0, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier());
+ TakeDamage(dtPotionOfHarming, a_Effect.GetUser(), damage, 0);
return;
}
}