diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-25 23:47:12 +0100 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-25 23:47:12 +0100 |
commit | e8f230f24e55469f1aa832bc8dad73db8018ffe1 (patch) | |
tree | abccca0bef086c4f2eda8497fa757433464e3b23 /source/cPassiveAggressiveMonster.cpp | |
parent | - fixed the code from the last commit :) (diff) | |
download | cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar.gz cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar.bz2 cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar.lz cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar.xz cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.tar.zst cuberite-e8f230f24e55469f1aa832bc8dad73db8018ffe1.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cPassiveAggressiveMonster.cpp | 32 |
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 |