Page MenuHomeFeedback Tracker

GetGame().ObjectGetType returns empty string for static objects with classes defined in config.cpp
Assigned, UrgentPublic

Description

DayZ experimental 1.18 added "hundreds of static environment objects now have a config-class to be spawned by the server".

I would like to be able to identify static objects using the GetGame().ObjectGetType(object, type) function, or using the Object.GetType() method (which calls GetGame().ObjectGetType). However, when I call these functions on static objects, and particularly the new static objects that had their classes added in 1.18, the functions give me an empty type string.

According to the Object.GetType() method's documentation, these functions should return the "config class of [the] object". Since the static objects now have classes in the config.cpp files, I would expect to be able to get their types, now.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Find a static object, for example using GetGame().GetObjectsAtPosition, that has its class defined in the DayZ 1.18 config.cpp files. For example, find a Static_BusStation_Corner (defined in DZ/structures/residential/config.cpp)
  2. Call GetType() on the static object
  3. Observe that the method returned an empty string ("") instead of the expected class name (Static_BusStation_Corner)
Additional Information

Tested with DayZ experimental versions 1.18.154845, 1.18.154875, and 1.18.154920

Event Timeline

tjensen created this task.Jun 2 2022, 1:47 PM
Geez changed the task status from New to Assigned.Jun 2 2022, 2:11 PM