diff options
Diffstat (limited to 'src/Mobs/Enderman.cpp')
-rw-r--r-- | src/Mobs/Enderman.cpp | 20 |
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 + } + +} |