Page MenuHomeFeedback Tracker

items returned in SceneGetEntitiesInBox not always of type EntityAI
Acknowledged, NormalPublic

Description

When using the DayZPlayerUtils.SceneGetEntitiesInBox function, the returned list of array<EntityAI> also contains items, which are not of type EntityAI. Calling methods like IncreaseLifetime() will cause an (E): Calling nonexistent function on class 'Object' Error

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Dig a GardenPlot
  2. Copy the Coordinates of the Garden Plot
  3. call DayZPlayerUtils.SceneGetEntitiesInBox with the coordinates and a small radius
  4. Iterate through all found items and try to call a method like IncreaseLifetime()
  5. The Exception will be thrown
Additional Information

For me, I added a small workaround, which checks again if the Item is really inherited by EntityAI, by tring to Cast it to EntityAI again

Event Timeline

LBmaster created this task.Oct 27 2022, 4:28 PM
Geez changed the task status from New to Acknowledged.Oct 31 2022, 12:12 PM