mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +00:00
- fixed: AActor::GetModifiedDamage must account for the inventory items to get destroyed in its scripted subfunctions.
This commit is contained in:
parent
19183ba157
commit
7706dd65f9
1 changed files with 3 additions and 2 deletions
|
@ -7309,14 +7309,15 @@ void AActor::ClearCounters()
|
|||
int AActor::GetModifiedDamage(FName damagetype, int damage, bool passive, AActor *inflictor, AActor *source, int flags)
|
||||
{
|
||||
auto inv = Inventory;
|
||||
while (inv != nullptr)
|
||||
while (inv != nullptr && !(inv->ObjectFlags & OF_EuthanizeMe))
|
||||
{
|
||||
auto nextinv = inv->Inventory;
|
||||
IFVIRTUALPTRNAME(inv, NAME_Inventory, ModifyDamage)
|
||||
{
|
||||
VMValue params[8] = { (DObject*)inv, damage, int(damagetype), &damage, passive, inflictor, source, flags };
|
||||
VMCall(func, params, 8, nullptr, 0);
|
||||
}
|
||||
inv = inv->Inventory;
|
||||
inv = nextinv;
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue