mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +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
581cd27818
commit
d381fb5e3f
1 changed files with 6 additions and 0 deletions
|
@ -2500,6 +2500,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetInventory)
|
||||||
ACTION_RETURN_BOOL(false);
|
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);
|
AInventory *item = mobj->FindInventory(itemtype);
|
||||||
|
|
||||||
if (item != nullptr)
|
if (item != nullptr)
|
||||||
|
|
Loading…
Reference in a new issue