Fixed IsAttached() Papyrus error spam in critter.psc

This commit is contained in:
Eddoursul 2024-01-13 15:39:17 +01:00
parent f6650e6fd7
commit 68c68c6a3e
2 changed files with 6 additions and 2 deletions

Binary file not shown.

View File

@ -1116,13 +1116,17 @@ endFunction
/; /;
Bool Function CheckCellAttached(ObjectReference AnyItemRef) Bool Function CheckCellAttached(ObjectReference AnyItemRef)
Cell parentCell = AnyItemRef.GetParentCell() if AnyItemRef == None || ! AnyItemRef.Is3DLoaded()
return false
endif
Cell parentCell = AnyItemRef.GetParentCell() as Cell
If parentCell == None If parentCell == None
;~ Trace(Self + "CheckCellAttached() " + AnyItemRef + " GetParentCell == None") ;~ Trace(Self + "CheckCellAttached() " + AnyItemRef + " GetParentCell == None")
return False return False
EndIf EndIf
Return parentCell.IsAttached() Return parentCell.IsAttached()
EndFunction EndFunction