- fixed: A_SetInventory must check for voodoo dolls and delegate the action to the real player because it will always break the real player's inventory if done so.

This commit is contained in:
Christoph Oelckers 2017-01-07 14:29:04 +01:00
parent 362551e58d
commit 7cf7ebaf6d

View file

@ -2500,6 +2500,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetInventory)
ACTION_RETURN_BOOL(false);
}
// Do not run this function on voodoo dolls because the way they transfer the inventory to the player will not work with the code below.
if (mobj->player != nullptr)
{
mobj = mobj->player->mo;
}
AInventory *item = mobj->FindInventory(itemtype);
if (item != nullptr)