summaryrefslogtreecommitdiffstats
path: root/source/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 22f1b8967..751920759 100644
--- a/source/Entities/Player.cpp
+++ b/source/Entities/Player.cpp
@@ -610,10 +610,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 (IsGameModeCreative())
+ {
+ // No damage / health in creative mode
+ return;
+ }
}
super::DoTakeDamage(a_TDI);