summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-08 04:58:41 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:20 +0200
commit5803094d7d0a852568c45c450dc2cc52e6c7d681 (patch)
tree4b2f65aa6fdc3e8656ff5e517e083888ef29e227 /src/Entities
parentPlayer: made healing instantaneous (diff)
downloadcuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar.gz
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar.bz2
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar.lz
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar.xz
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.tar.zst
cuberite-5803094d7d0a852568c45c450dc2cc52e6c7d681.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Entity.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index ee7ce06ac..ba829bf6b 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -310,7 +310,8 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
cPlayer * Player = (cPlayer *)a_TDI.Attacker;
// IsOnGround() only is false if the player is moving downwards
- if (!Player->IsOnGround()) // TODO: Better damage increase, and check for enchantments (and use magic critical instead of plain)
+ // TODO: Better damage increase, and check for enchantments (and use magic critical instead of plain)
+ if (!Player->IsOnGround() && (a_TDI.DamageType == dtAttack || a_TDI.DamageType == dtArrowAttack))
{
a_TDI.FinalDamage += 2;
m_World->BroadcastEntityAnimation(*this, 4); // Critical hit