summaryrefslogtreecommitdiffstats
path: root/source/Pawn.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-28 17:54:11 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-01-28 17:54:11 +0100
commit71bbf2d44ba5fc00fcb15ed96aff083342309498 (patch)
tree94657c14eddc2f81fe55d8c6a15e22165f6d7897 /source/Pawn.cpp
parentUpdated HookNotify with the hook renaming. (diff)
downloadcuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar.gz
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar.bz2
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar.lz
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar.xz
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.tar.zst
cuberite-71bbf2d44ba5fc00fcb15ed96aff083342309498.zip
Diffstat (limited to 'source/Pawn.cpp')
-rw-r--r--source/Pawn.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Pawn.cpp b/source/Pawn.cpp
index 451dd3af9..d0546eccc 100644
--- a/source/Pawn.cpp
+++ b/source/Pawn.cpp
@@ -121,13 +121,13 @@ void cPawn::DoTakeDamage(TakeDamageInfo & a_TDI)
void cPawn::KilledBy(cPawn * a_Killer)
{
- short OldHealth = m_Health;
m_Health = 0;
- if (cRoot::Get()->GetPluginManager()->CallHookKilled(*this, a_Killer))
+ cRoot::Get()->GetPluginManager()->CallHookKilling(*this, a_Killer);
+
+ if (m_Health > 0)
{
- // Plugin wants to 'unkill' the pawn. Set health back and abort
- m_Health = OldHealth;
+ // Plugin wants to 'unkill' the pawn. Abort
return;
}