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 | |
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 '')
-rw-r--r-- | src/Mobs/Monster.cpp | 45 | ||||
-rw-r--r-- | src/Mobs/Monster.h | 2 |
2 files changed, 0 insertions, 47 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; diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index ca6cb0593..638d5be39 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -224,8 +224,6 @@ protected: int m_LastGroundHeight; /* =========================== */ - - virtual void HandleEntityEffect(cEntityEffect::eType a_EffectType, cEntityEffect a_Effect) override; float m_IdleInterval; float m_DestroyTimer; |