summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2018-01-16 20:13:17 +0100
committerGitHub <noreply@github.com>2018-01-16 20:13:17 +0100
commit07619d932d703611c2e3e1296871bee5e27876b7 (patch)
treedde08d4291191409a8f5957efb0851290d686b92 /src/Entities/Pickup.cpp
parentDon't burn mobs in daylight when swimming (#4145) (diff)
downloadcuberite-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 '')
-rw-r--r--src/Entities/Pickup.cpp15
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)