forked from teamnwah/openmw-tes3coop
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
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ namespace
|
||||||
{
|
{
|
||||||
MWWorld::Ptr actor (&*iter, cell);
|
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;
|
return actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue