mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Make enable/disable a no-op for items in containers
This commit is contained in:
parent
8824af30b4
commit
e597328b6b
@ -610,6 +610,10 @@ namespace MWWorld
|
||||
|
||||
void World::enable (const Ptr& reference)
|
||||
{
|
||||
// enable is a no-op for items in containers
|
||||
if (!reference.isInCell())
|
||||
return;
|
||||
|
||||
if (!reference.getRefData().isEnabled())
|
||||
{
|
||||
reference.getRefData().enable();
|
||||
@ -640,6 +644,10 @@ namespace MWWorld
|
||||
|
||||
void World::disable (const Ptr& reference)
|
||||
{
|
||||
// disable is a no-op for items in containers
|
||||
if (!reference.isInCell())
|
||||
return;
|
||||
|
||||
if (reference.getRefData().isEnabled())
|
||||
{
|
||||
reference.getRefData().disable();
|
||||
|
Loading…
Reference in New Issue
Block a user