summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-25 20:05:44 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-25 20:05:44 +0100
commit6fa3a0cf70bd631fe809c006e5b315199086cc59 (patch)
treefb79c2bd88c5bee8e39230390a11e208cb4b31fb /src/Entities
parentImplemented fall damage for mobs (diff)
downloadcuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar.gz
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar.bz2
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar.lz
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar.xz
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.tar.zst
cuberite-6fa3a0cf70bd631fe809c006e5b315199086cc59.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 71e304967..82e31ae65 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -463,10 +463,8 @@ void cPlayer::SetTouchGround(bool a_bTouchGround)
if (Damage > 0)
{
- if (!IsGameModeCreative())
- {
- TakeDamage(dtFalling, NULL, Damage, Damage, 0);
- }
+ // cPlayer makes sure damage isn't applied in creative, no need to check here
+ TakeDamage(dtFalling, NULL, Damage, Damage, 0);
// Fall particles
GetWorld()->BroadcastSoundParticleEffect(2006, (int)floor(GetPosX()), (int)GetPosY() - 1, (int)floor(GetPosZ()), Damage /* Used as particle effect speed modifier */);
@@ -790,7 +788,7 @@ void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
{
if (IsGameModeCreative())
{
- // No damage / health in creative mode
+ // No damage / health in creative mode if not void damage
return;
}
}