- added a callback for when damage is drained from a target.
This commit is contained in:
parent
356144a537
commit
d36f656caf
2 changed files with 11 additions and 0 deletions
|
|
@ -1415,6 +1415,12 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
}
|
||||
}
|
||||
|
||||
IFVIRTUALPTR(source, AActor, OnDrain)
|
||||
{
|
||||
VMValue params[] = { source, target, draindamage, mod.GetIndex() };
|
||||
VMReturn ret(&draindamage);
|
||||
GlobalVMStack.Call(func, params, countof(params), &ret, 1);
|
||||
}
|
||||
if ( P_GiveBody( source, int(draindamage * damage)))
|
||||
{
|
||||
S_Sound(source, CHAN_ITEM, "*drainhealth", 1, ATTN_NORM );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue