summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Enderman.cpp
diff options
context:
space:
mode:
authorJonathan Frederick <doublej472@gmail.com>2014-09-28 22:56:41 +0200
committerJonathan Frederick <doublej472@gmail.com>2014-09-28 22:56:41 +0200
commit126b14aa09fcde7a54bc8a176b44f5f6c8f936c1 (patch)
treefa61d19a5aaa23d47876db151ffa9cc0da5f3e9c /src/Mobs/Enderman.cpp
parentRevert "1.8: Fixed plugin messages." (diff)
downloadcuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar.gz
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar.bz2
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar.lz
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar.xz
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.tar.zst
cuberite-126b14aa09fcde7a54bc8a176b44f5f6c8f936c1.zip
Diffstat (limited to 'src/Mobs/Enderman.cpp')
-rw-r--r--src/Mobs/Enderman.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Mobs/Enderman.cpp b/src/Mobs/Enderman.cpp
index 51255beb3..fb372709a 100644
--- a/src/Mobs/Enderman.cpp
+++ b/src/Mobs/Enderman.cpp
@@ -181,3 +181,23 @@ bool cEnderman::CheckLight()
return true;
}
+
+
+
+
+
+void cEnderman::Tick(float a_Dt, cChunk & a_Chunk)
+{
+ super::Tick(a_Dt, a_Chunk);
+
+ //TODO take damage in rain
+
+ //Take damage when touching water, drowning damage seems to be most appropriate
+ if (IsSwimming())
+ {
+ EventLosePlayer();
+ TakeDamage(dtDrowning, NULL, 1, 0);
+ //TODO teleport to a safe location
+ }
+
+}