diff options
author | archshift <admin@archshift.com> | 2014-06-17 05:22:17 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-06-19 07:54:14 +0200 |
commit | f5529e544cf8350daf8a20bb8d997f85ee2824f7 (patch) | |
tree | 6cf5b1e2989671e7f5b9100e66b8cee015777f14 /src/Mobs/Monster.cpp | |
parent | Entity effects: changed User to Creator, removed pawn pass-by-value (diff) | |
download | cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar.gz cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar.bz2 cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar.lz cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar.xz cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.tar.zst cuberite-f5529e544cf8350daf8a20bb8d997f85ee2824f7.zip |
Diffstat (limited to 'src/Mobs/Monster.cpp')
-rw-r--r-- | src/Mobs/Monster.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index 4c59960f6..a51315ecf 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -436,51 +436,6 @@ void cMonster::HandleFalling() -void cMonster::HandleEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffect a_Effect) -{ - switch (a_EffectType) - { - case cEntityEffect::effPoison: - { - // Default effect for non-undead mobs and non-spiders - if (!IsUndead() && GetMobType() != mtSpider) break; - return; // No effect - } - case cEntityEffect::effRegeneration: - { - // Default effect for non-undead mobs - if (!IsUndead() && GetMobType()) break; - return; // No effect - } - case cEntityEffect::effInstantDamage: - { - // Default effect for non-undead mobs - if (!IsUndead() && GetMobType()) break; - - // Undead mobs are healed by instant damage - // Base heal = 6, doubles for every increase in intensity - Heal((int)(6 * std::pow(2.0, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier())); - return; - } - case cEntityEffect::effInstantHealth: - { - // Default effect for non-undead mobs - if (!IsUndead() && GetMobType()) break; - - // Undead mobs are damaged by instant health - // Base damage = 6, doubles for every increase in intensity - int damage = (int)(6 * std::pow(2.0, a_Effect.GetIntensity()) * a_Effect.GetDistanceModifier()); - TakeDamage(dtPotionOfHarming, a_Effect.GetCreator(), damage, 0); - return; - } - } - - super::HandleEntityEffect(a_EffectType, a_Effect); -} - - - - int cMonster::FindFirstNonAirBlockPosition(double a_PosX, double a_PosZ) { int PosY = POSY_TOINT; |