diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index 5bf5bf450b..f4b2f81036 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -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)