mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04: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);
|
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…
x
Reference in New Issue
Block a user