summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-11 00:02:35 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-11 00:02:35 +0200
commitcb167f78e3b2592fa26acb789d2dd34bd97c687d (patch)
tree0530cca71423c5e8e67df9f685981c402f461cf4 /source
parentAdded void damage (diff)
downloadcuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar.gz
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar.bz2
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar.lz
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar.xz
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.tar.zst
cuberite-cb167f78e3b2592fa26acb789d2dd34bd97c687d.zip
Diffstat (limited to 'source')
-rw-r--r--source/Entities/Player.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp
index 0943f61ff..1f4f392ef 100644
--- a/source/Entities/Player.cpp
+++ b/source/Entities/Player.cpp
@@ -611,10 +611,13 @@ void cPlayer::SetSprint(bool a_IsSprinting)
void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (m_GameMode == eGameMode_Creative)
+ if (a_TDI.DamageType != dtInVoid)
{
- // No damage / health in creative mode
- return;
+ if (m_GameMode == eGameMode_Creative)
+ {
+ // No damage / health in creative mode
+ return;
+ }
}
super::DoTakeDamage(a_TDI);