diff options
author | Alexander Harkness <me@bearbin.net> | 2018-01-16 20:13:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-16 20:13:17 +0100 |
commit | 07619d932d703611c2e3e1296871bee5e27876b7 (patch) | |
tree | dde08d4291191409a8f5957efb0851290d686b92 /src/Entities/Pickup.cpp | |
parent | Don't burn mobs in daylight when swimming (#4145) (diff) | |
download | cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar.gz cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar.bz2 cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar.lz cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar.xz cuberite-07619d932d703611c2e3e1296871bee5e27876b7.tar.zst cuberite-07619d932d703611c2e3e1296871bee5e27876b7.zip |
Diffstat (limited to 'src/Entities/Pickup.cpp')
-rw-r--r-- | src/Entities/Pickup.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index be6f3ebe3..629f5d189 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -195,6 +195,21 @@ void cPickup::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) +bool cPickup::DoTakeDamage(TakeDamageInfo & a_TDI) +{ + if (a_TDI.DamageType == dtCactusContact) + { + Destroy(true); + return true; + } + + return super::DoTakeDamage(a_TDI); +} + + + + + bool cPickup::CollectedBy(cPlayer & a_Dest) { if (m_bCollected) |