Fix regression with detect spells detecting deleted objects (Fixes #2518)

openmw-36
scrawl 10 years ago
parent 033719ccd7
commit b312f50b1f

@ -2956,7 +2956,7 @@ namespace MWWorld
Ogre::Vector3(mDetector.getRefData().getPosition().pos)) >= mSquaredDist)
return true;
if (!ptr.getRefData().isEnabled())
if (!ptr.getRefData().isEnabled() || ptr.getRefData().isDeleted())
return true;
// Consider references inside containers as well (except if we are looking for a Creature, they cannot be in containers)

Loading…
Cancel
Save