mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-26 13:51:35 +00:00
- 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:
parent
362551e58d
commit
7cf7ebaf6d
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue