summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorJulius Oeftiger <j.oeftiger@protonmail.com>2019-08-16 12:10:47 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-08-16 12:10:47 +0200
commit9a1ed26893e51aa693bc61602ce9555d04789800 (patch)
tree79ff878cfa2be4ca0593220a652cdb229ea8e397 /src/Entities
parentFix building with clang 8.0 (#4346) (diff)
downloadcuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar.gz
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar.bz2
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar.lz
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar.xz
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.tar.zst
cuberite-9a1ed26893e51aa693bc61602ce9555d04789800.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Player.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index ef6afbff3..050b4adb9 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1295,7 +1295,7 @@ bool cPlayer::IsGameModeSpectator(void) const
bool cPlayer::CanMobsTarget(void) const
{
- return IsGameModeSurvival() || IsGameModeAdventure();
+ return (IsGameModeSurvival() || IsGameModeAdventure()) && (m_Health > 0);
}