summaryrefslogtreecommitdiffstats
path: root/source/cPassiveAggressiveMonster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cPassiveAggressiveMonster.cpp')
-rw-r--r--source/cPassiveAggressiveMonster.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/cPassiveAggressiveMonster.cpp b/source/cPassiveAggressiveMonster.cpp
new file mode 100644
index 000000000..e1a78ab36
--- /dev/null
+++ b/source/cPassiveAggressiveMonster.cpp
@@ -0,0 +1,32 @@
+#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);
+} \ No newline at end of file