summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp5
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);