summaryrefslogtreecommitdiffstats
path: root/src/Mobs/CaveSpider.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-11-08 23:08:40 +0100
committerworktycho <work.tycho@gmail.com>2015-11-08 23:08:40 +0100
commita1926ca16e76f082b2139b1686fd19c0c42c585e (patch)
tree3a8a282d1966476ea8f6031a1ea15388330fede8 /src/Mobs/CaveSpider.cpp
parentMerge pull request #2616 from Gargaj/patch-1 (diff)
parentfix cavespider poisoning even if attack is in cooldown (diff)
downloadcuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar.gz
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar.bz2
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar.lz
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar.xz
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.tar.zst
cuberite-a1926ca16e76f082b2139b1686fd19c0c42c585e.zip
Diffstat (limited to 'src/Mobs/CaveSpider.cpp')
-rw-r--r--src/Mobs/CaveSpider.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Mobs/CaveSpider.cpp b/src/Mobs/CaveSpider.cpp
index a8b40f52e..ee3f4803c 100644
--- a/src/Mobs/CaveSpider.cpp
+++ b/src/Mobs/CaveSpider.cpp
@@ -27,15 +27,19 @@ void cCaveSpider::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
-void cCaveSpider::Attack(std::chrono::milliseconds a_Dt)
+bool cCaveSpider::Attack(std::chrono::milliseconds a_Dt)
{
- super::Attack(a_Dt);
+ if (!super::Attack(a_Dt))
+ {
+ return false;
+ }
if (m_Target->IsPawn())
{
// TODO: Easy = no poison, Medium = 7 seconds, Hard = 15 seconds
static_cast<cPawn *>(m_Target)->AddEntityEffect(cEntityEffect::effPoison, 7 * 20, 0);
}
+ return true;
}