1
0
cuberite-2a/source/cPassiveAggressiveMonster.cpp
lapayo94@gmail.com e8f230f24e - Fixed Bug #99 -> Mobs no longer bother you in creative mode
- refactored many things in the Monster system

git-svn-id: http://mc-server.googlecode.com/svn/trunk@112 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25 22:47:12 +00:00

32 lines
656 B
C++

#include "cPassiveAggressiveMonster.h"
#include "cPlayer.h"
cPassiveAggressiveMonster::cPassiveAggressiveMonster()
{
m_EMPersonality = PASSIVE;
}
cPassiveAggressiveMonster::~cPassiveAggressiveMonster()
{
}
void cPassiveAggressiveMonster::TakeDamage(int a_Damage, cEntity* a_Instigator)
{
cMonster::TakeDamage(a_Damage, a_Instigator);
if(m_Target->GetEntityType() == cEntity::E_PLAYER)
{
cPlayer * Player = (cPlayer *) m_Target;
if(Player->GetGameMode() != 1)
{
m_EMState = CHASING;
}
}
}
void cPassiveAggressiveMonster::EventSeePlayer(cEntity *a_Entity)
{
return cMonster::EventSeePlayer(a_Entity);
}