1
0

Renamed HOOK_KILLED to HOOK_KILLING to match naming conventions.

Also tweaked the mechanics so that plugins may revive without dropping other plugins out of the picture.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1182 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-01-28 16:54:11 +00:00
parent f7721c258b
commit 71bbf2d44b
12 changed files with 38 additions and 41 deletions

View File

@@ -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;
}