summaryrefslogtreecommitdiffstats
path: root/src/Entities/ExpOrb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/ExpOrb.cpp')
-rw-r--r--src/Entities/ExpOrb.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 4ae847bf8..dd16a4762 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -46,6 +46,8 @@ void cExpOrb::SpawnOn(cClientHandle & a_Client)
void cExpOrb::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
+ DetectCacti();
+
// Check player proximity no more than twice per second
if ((m_TicksAlive % 10) == 0)
{
@@ -79,3 +81,14 @@ void cExpOrb::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Destroy(true);
}
}
+
+bool cExpOrb::DoTakeDamage(TakeDamageInfo & a_TDI)
+{
+ if (a_TDI.DamageType == dtCactusContact)
+ {
+ Destroy(true);
+ return true;
+ }
+
+ return super::DoTakeDamage(a_TDI);
+}