summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-05-12 16:05:09 +0200
committerandrew <xdotftw@gmail.com>2014-05-12 16:05:09 +0200
commitb3d2b5b2c94193fd9364b26293b7d96b748ff96d (patch)
tree215519ba96caea0269641209452661b8bd6e14da /src/Entities/Entity.cpp
parentFixed compilation (diff)
downloadcuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar.gz
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar.bz2
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar.lz
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar.xz
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.tar.zst
cuberite-b3d2b5b2c94193fd9364b26293b7d96b748ff96d.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 4cf10a219..9eb03acde 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -370,6 +370,11 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
if (m_Health <= 0)
{
KilledBy(a_TDI.Attacker);
+
+ if (a_TDI.Attacker != NULL)
+ {
+ a_TDI.Attacker->Killed(this);
+ }
}
return true;
}