From 675b4aa878f16291ce33fced48a2bc7425f635ae Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 24 Nov 2013 14:19:41 +0000 Subject: Moved source to src --- src/Mobs/Cavespider.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/Mobs/Cavespider.cpp (limited to 'src/Mobs/Cavespider.cpp') diff --git a/src/Mobs/Cavespider.cpp b/src/Mobs/Cavespider.cpp new file mode 100644 index 000000000..aba1ff9f5 --- /dev/null +++ b/src/Mobs/Cavespider.cpp @@ -0,0 +1,40 @@ + +#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules + +#include "Cavespider.h" +#include "../World.h" + + + + + +cCavespider::cCavespider(void) : + super("Cavespider", mtCaveSpider, "mob.spider.say", "mob.spider.death", 0.7, 0.5) +{ +} + + + + + +void cCavespider::Tick(float a_Dt, cChunk & a_Chunk) +{ + super::Tick(a_Dt, a_Chunk); + + // TODO: Check vanilla if cavespiders really get passive during the day / in daylight + m_EMPersonality = (GetWorld()->GetTimeOfDay() < (12000 + 1000)) ? PASSIVE : AGGRESSIVE; +} + + + + + +void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer) +{ + AddRandomDropItem(a_Drops, 0, 2, E_ITEM_STRING); + AddRandomDropItem(a_Drops, 0, 1, E_ITEM_SPIDER_EYE); +} + + + + -- cgit v1.2.3