summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-10-31 23:18:27 +0100
committerAlexander Harkness <me@bearbin.net>2015-10-31 23:18:27 +0100
commitb13fd00ec44cc3fc4ad0395b3b9df04de00617b5 (patch)
tree671987e9a48544fd0fc37135732feebdca697caa /src/Entities/Pawn.cpp
parentMerge pull request #2549 from cuberite/TouchGround (diff)
parentImplemented the FireResistence potion effects. (diff)
downloadcuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar.gz
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar.bz2
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar.lz
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar.xz
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.tar.zst
cuberite-b13fd00ec44cc3fc4ad0395b3b9df04de00617b5.zip
Diffstat (limited to 'src/Entities/Pawn.cpp')
-rw-r--r--src/Entities/Pawn.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 2cd0f2f0e..9045f8595 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -61,6 +61,15 @@ void cPawn::KilledBy(TakeDamageInfo & a_TDI)
+bool cPawn::IsFireproof(void) const
+{
+ return super::IsFireproof() || HasEntityEffect(cEntityEffect::effFireResistance);
+}
+
+
+
+
+
void cPawn::AddEntityEffect(cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier)
{
// Check if the plugins allow the addition:
@@ -98,6 +107,15 @@ void cPawn::RemoveEntityEffect(cEntityEffect::eType a_EffectType)
+bool cPawn::HasEntityEffect(cEntityEffect::eType a_EffectType) const
+{
+ return m_EntityEffects.find(a_EffectType) != m_EntityEffects.end();
+}
+
+
+
+
+
void cPawn::ClearEntityEffects()
{
// Iterate through this entity's applied effects