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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user