mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
Fix searchPtrViaActorId not skipping over deleted references
Fixes an issue when an actor has moved cell: searchPtrViaActorId would randomly return the deleted Ptr from the old cell.
This commit is contained in:
parent
b6a7aee42e
commit
6de7e16550
@ -54,7 +54,7 @@ namespace
|
||||
{
|
||||
MWWorld::Ptr actor (&*iter, cell);
|
||||
|
||||
if (MWWorld::Class::get (actor).getCreatureStats (actor).matchesActorId (actorId))
|
||||
if (actor.getClass().getCreatureStats (actor).matchesActorId (actorId) && actor.getRefData().getCount() > 0)
|
||||
return actor;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user