summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:25:42 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-03 22:25:42 +0100
commita3759c1462fd2fe89a545fc9ece90559b4a2469a (patch)
treedc46c925aec3e28fdb610f55245377453e67fa73 /src/Entities
parentFixed #626 (diff)
parentMerge pull request #623 from mc-server/tnt (diff)
downloadcuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.gz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.bz2
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.lz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.xz
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.tar.zst
cuberite-a3759c1462fd2fe89a545fc9ece90559b4a2469a.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp3
-rw-r--r--src/Entities/Player.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index e22f689d9..08780ca8b 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -397,6 +397,7 @@ int cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Dama
case dtPotionOfHarming:
case dtFalling:
case dtLightning:
+ case dtPlugin:
{
return 0;
}
@@ -473,7 +474,7 @@ void cEntity::KilledBy(cEntity * a_Killer)
return;
}
- // Drop loot:
+ // Drop loot:
cItems Drops;
GetDrops(Drops, a_Killer);
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ());
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index a1c942c20..d649cacf2 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -792,11 +792,11 @@ void cPlayer::SetFlying(bool a_IsFlying)
void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
{
- if (a_TDI.DamageType != dtInVoid)
+ if ((a_TDI.DamageType != dtInVoid) && (a_TDI.DamageType != dtPlugin))
{
if (IsGameModeCreative())
{
- // No damage / health in creative mode if not void damage
+ // No damage / health in creative mode if not void or plugin damage
return;
}
}