2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
2012-09-23 13:53:08 -07:00
|
|
|
#include "Cavespider.h"
|
2012-06-14 06:06:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-22 01:39:13 -08:00
|
|
|
cCavespider::cCavespider(void) :
|
2013-07-01 03:39:56 -07:00
|
|
|
// TODO: The size is only a guesstimate, measure in vanilla and fix the size values here
|
|
|
|
super("Cavespider", 59, "mob.spider.say", "mob.spider.death", 0.9, 0.6)
|
2012-06-14 06:06:06 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-13 14:02:10 -07:00
|
|
|
void cCavespider::Tick(float a_Dt, cChunk & a_Chunk)
|
2012-06-14 06:06:06 -07:00
|
|
|
{
|
2013-04-13 14:02:10 -07:00
|
|
|
super::Tick(a_Dt, a_Chunk);
|
2012-12-21 04:21:20 -08:00
|
|
|
|
2013-04-13 14:02:10 -07:00
|
|
|
// TODO: Check vanilla if cavespiders really get passive during the day / in daylight
|
2012-11-01 14:38:20 -07:00
|
|
|
m_EMPersonality = (GetWorld()->GetTimeOfDay() < (12000 + 1000)) ? PASSIVE : AGGRESSIVE;
|
2012-06-14 06:06:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-01 03:39:56 -07:00
|
|
|
void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
2012-06-14 06:06:06 -07:00
|
|
|
{
|
2012-12-21 03:04:08 -08:00
|
|
|
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_STRING);
|
|
|
|
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_SPIDER_EYE);
|
2012-06-14 06:06:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|