Added inflictor, source and flag parameters to GetModifiedDamage on actors and ModifyDamage on inventory.
- The flags are used by DamageMobj so modders can determine radius damage, for example, by checking for DMG_EXPLOSION.
This commit is contained in:
parent
449610496f
commit
acc510dfb3
7 changed files with 17 additions and 14 deletions
|
|
@ -7217,15 +7217,15 @@ void AActor::ClearCounters()
|
|||
}
|
||||
}
|
||||
|
||||
int AActor::GetModifiedDamage(FName damagetype, int damage, bool passive)
|
||||
int AActor::GetModifiedDamage(FName damagetype, int damage, bool passive, AActor *inflictor, AActor *source, int flags)
|
||||
{
|
||||
auto inv = Inventory;
|
||||
while (inv != nullptr)
|
||||
{
|
||||
IFVIRTUALPTRNAME(inv, NAME_Inventory, ModifyDamage)
|
||||
{
|
||||
VMValue params[5] = { (DObject*)inv, damage, int(damagetype), &damage, passive };
|
||||
VMCall(func, params, 5, nullptr, 0);
|
||||
VMValue params[8] = { (DObject*)inv, damage, int(damagetype), &damage, passive, inflictor, source, flags };
|
||||
VMCall(func, params, 8, nullptr, 0);
|
||||
}
|
||||
inv = inv->Inventory;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue