mirror of https://github.com/ZDoom/gzdoom-gles.git
Fixed: A_SetInventory with an amount of 0 was not truly eliminating the actor.
This commit is contained in:
parent
472f35d2ce
commit
02435b46a0
|
@ -2665,8 +2665,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetInventory)
|
||||||
}
|
}
|
||||||
else if (amount <= 0)
|
else if (amount <= 0)
|
||||||
{
|
{
|
||||||
//Remove it all.
|
// Remove it all.
|
||||||
res = (mobj->TakeInventory(itemtype, item->Amount, true, false));
|
if (item)
|
||||||
|
{
|
||||||
|
item->DepleteOrDestroy();
|
||||||
|
res = true;
|
||||||
|
}
|
||||||
ACTION_RETURN_BOOL(res);
|
ACTION_RETURN_BOOL(res);
|
||||||
}
|
}
|
||||||
else if (amount < item->Amount)
|
else if (amount < item->Amount)
|
||||||
|
|
Loading…
Reference in New Issue