diff options
Diffstat (limited to '')
-rw-r--r-- | source/cSquid.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/cSquid.cpp b/source/cSquid.cpp index b2baf462b..af4b167f2 100644 --- a/source/cSquid.cpp +++ b/source/cSquid.cpp @@ -1,13 +1,16 @@ #include "cSquid.h"
+#include "Vector3d.h"
cSquid::cSquid()
{
m_MobType = 94;
GetMonsterConfig("Squid");
+ m_NoWater = 0.f;
}
cSquid::~cSquid()
{
+
}
bool cSquid::IsA( const char* a_EntityType )
@@ -23,3 +26,25 @@ void cSquid::KilledBy( cEntity* a_Killer ) cMonster::KilledBy( a_Killer );
}
+
+void cSquid::Tick(float a_Dt)
+{
+ cPassiveMonster::Tick(a_Dt);
+
+ Vector3d Pos = GetPosition();
+
+
+ //TODO Not a real behavior, but cool :D
+ if(!IsBlockWater(GetWorld()->GetBlock(Pos.x, Pos.y, Pos.z)))
+ {
+ //Die slowly Muhahaha :D (To prevent all this squids on the land :D)
+ m_NoWater += a_Dt;
+
+ if(m_NoWater > 1000.f)
+ {
+ m_NoWater -= 1000.f;
+ TakeDamage(1, this);
+ }
+ }
+
+}
\ No newline at end of file |