diff options
author | Bond-009 <bond.009@outlook.com> | 2018-02-04 21:53:35 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2018-02-04 21:53:35 +0100 |
commit | d12804d4c05d125c8de3187da29013bef6ae5d0b (patch) | |
tree | 866f22486712382c07dddf60e0d2478311888e05 /src/Mobs/Chicken.cpp | |
parent | cppcheck found an out of bound array access. (#4182) (diff) | |
download | cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar.gz cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar.bz2 cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar.lz cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar.xz cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.tar.zst cuberite-d12804d4c05d125c8de3187da29013bef6ae5d0b.zip |
Diffstat (limited to 'src/Mobs/Chicken.cpp')
-rw-r--r-- | src/Mobs/Chicken.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp index e2caa6f67..242fe5aa0 100644 --- a/src/Mobs/Chicken.cpp +++ b/src/Mobs/Chicken.cpp @@ -74,10 +74,12 @@ void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer) -void cChicken::HandleFalling(void) +bool cChicken::DoTakeDamage(TakeDamageInfo & a_TDI) { - // empty - chickens don't take fall damage -} - - + if (a_TDI.DamageType == dtFalling) + { + return false; + } + return super::DoTakeDamage(a_TDI); +} |