forked from mirror/openmw-tes3mp
Merge pull request #1482 from akortunov/ownerfix
Inherit owner, if an item is in container (regression #4128)
This commit is contained in:
commit
1ad6cf90c6
1 changed files with 4 additions and 1 deletions
|
@ -1012,14 +1012,17 @@ namespace MWMechanics
|
|||
|
||||
MWWorld::Ptr victim;
|
||||
|
||||
bool isAllowed = true;
|
||||
const MWWorld::CellRef* ownerCellRef = &item.getCellRef();
|
||||
if (!container.isEmpty())
|
||||
{
|
||||
// Inherit the owner of the container
|
||||
ownerCellRef = &container.getCellRef();
|
||||
isAllowed = isAllowedToUse(ptr, container, victim);
|
||||
}
|
||||
else
|
||||
{
|
||||
isAllowed = isAllowedToUse(ptr, item, victim);
|
||||
if (!item.getCellRef().hasContentFile())
|
||||
{
|
||||
// this is a manually placed item, which means it was already stolen
|
||||
|
@ -1027,7 +1030,7 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
if (isAllowedToUse(ptr, item, victim))
|
||||
if (isAllowed)
|
||||
return;
|
||||
|
||||
Owner owner;
|
||||
|
|
Loading…
Reference in a new issue