Merge remote-tracking branch 'remotes/origin/master' into zscript

This commit is contained in:
Christoph Oelckers 2016-11-14 15:03:14 +01:00
commit 85ff172ee3
18 changed files with 879 additions and 592 deletions

View file

@ -2495,8 +2495,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetInventory)
}
else if (amount <= 0)
{
//Remove it all.
res = (mobj->TakeInventory(itemtype, item->Amount, true, false));
// Remove it all.
if (item)
{
item->DepleteOrDestroy();
res = true;
}
ACTION_RETURN_BOOL(res);
}
else if (amount < item->Amount)