mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 15:53:54 +00:00
Make SetDelete a no-op for items in containers (Fixes #2864)
This commit is contained in:
parent
5558962b14
commit
b583a2ec33
3 changed files with 4 additions and 1 deletions
|
@ -256,6 +256,7 @@ namespace MWBase
|
|||
virtual void fixPosition (const MWWorld::Ptr& actor) = 0;
|
||||
///< Attempt to fix position so that the Ptr is no longer inside collision geometry.
|
||||
|
||||
/// @note No-op for items in containers. Use ContainerStore::removeItem instead.
|
||||
virtual void deleteObject (const MWWorld::Ptr& ptr) = 0;
|
||||
virtual void undeleteObject (const MWWorld::Ptr& ptr) = 0;
|
||||
|
||||
|
|
|
@ -1050,7 +1050,7 @@ namespace MWWorld
|
|||
|
||||
void World::deleteObject (const Ptr& ptr)
|
||||
{
|
||||
if (!ptr.getRefData().isDeleted())
|
||||
if (!ptr.getRefData().isDeleted() && ptr.getContainerStore() == NULL)
|
||||
{
|
||||
ptr.getRefData().setCount(0);
|
||||
|
||||
|
|
|
@ -336,7 +336,9 @@ namespace MWWorld
|
|||
/// use the "Head" node as a basis.
|
||||
virtual std::pair<MWWorld::Ptr,osg::Vec3f> getHitContact(const MWWorld::Ptr &ptr, float distance);
|
||||
|
||||
/// @note No-op for items in containers. Use ContainerStore::removeItem instead.
|
||||
virtual void deleteObject (const Ptr& ptr);
|
||||
|
||||
virtual void undeleteObject (const Ptr& ptr);
|
||||
|
||||
virtual MWWorld::Ptr moveObject (const Ptr& ptr, float x, float y, float z);
|
||||
|
|
Loading…
Reference in a new issue