diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-12 14:28:37 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-12 14:28:37 +0100 |
commit | ec6c510bd404524dc63d130b41329fb365423b4b (patch) | |
tree | d2b8a8bea0930b7004575342d1036519879c8688 /src/Entities/Entity.cpp | |
parent | Merge pull request #529 from mc-server/derpstonerefactor (diff) | |
download | cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar.gz cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar.bz2 cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar.lz cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar.xz cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.tar.zst cuberite-ec6c510bd404524dc63d130b41329fb365423b4b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 8a74c9da4..fbf76e008 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -321,7 +321,10 @@ void cEntity::DoTakeDamage(TakeDamageInfo & a_TDI) m_Health = 0; } - AddSpeed(a_TDI.Knockback * 2); + if (IsMob() || IsPlayer()) // Knockback for only players and mobs + { + AddSpeed(a_TDI.Knockback * 2); + } m_World->BroadcastEntityStatus(*this, ENTITY_STATUS_HURT); |