2012-01-29 14:28:19 -05:00
|
|
|
|
|
|
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
|
|
|
|
2011-10-25 19:46:01 -04:00
|
|
|
#include "cSquid.h"
|
2011-12-26 15:57:12 -05:00
|
|
|
#include "Vector3d.h"
|
2011-10-25 19:46:01 -04:00
|
|
|
|
2012-01-29 14:28:19 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-25 19:46:01 -04:00
|
|
|
cSquid::cSquid()
|
|
|
|
{
|
|
|
|
m_MobType = 94;
|
|
|
|
GetMonsterConfig("Squid");
|
2011-12-26 15:57:12 -05:00
|
|
|
m_NoWater = 0.f;
|
2011-10-25 19:46:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
cSquid::~cSquid()
|
|
|
|
{
|
2011-12-26 15:57:12 -05:00
|
|
|
|
2011-10-25 19:46:01 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
bool cSquid::IsA( const char* a_EntityType )
|
|
|
|
{
|
|
|
|
if( strcmp( a_EntityType, "cSquid" ) == 0 ) return true;
|
|
|
|
return cMonster::IsA( a_EntityType );
|
|
|
|
}
|
|
|
|
|
|
|
|
void cSquid::KilledBy( cEntity* a_Killer )
|
|
|
|
{
|
2011-12-21 15:42:34 -05:00
|
|
|
//Drops 0-3 Ink Sacs
|
|
|
|
cMonster::RandomDropItem(E_ITEM_DYE, 0, 3);
|
|
|
|
|
2011-10-25 19:46:01 -04:00
|
|
|
cMonster::KilledBy( a_Killer );
|
|
|
|
}
|
2011-12-26 15:57:12 -05:00
|
|
|
|
|
|
|
void cSquid::Tick(float a_Dt)
|
|
|
|
{
|
|
|
|
cPassiveMonster::Tick(a_Dt);
|
|
|
|
|
|
|
|
Vector3d Pos = GetPosition();
|
|
|
|
|
|
|
|
|
|
|
|
//TODO Not a real behavior, but cool :D
|
2011-12-27 21:10:05 -05:00
|
|
|
if(!IsBlockWater(GetWorld()->GetBlock((int) Pos.x, (int) Pos.y, (int) Pos.z)) && GetMetaData() != BURNING)
|
2011-12-26 15:57:12 -05:00
|
|
|
{
|
2011-12-27 21:10:05 -05:00
|
|
|
SetMetaData(BURNING);
|
2011-12-26 15:57:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|