Page MenuHomeFeedback Tracker

Config inherited objects lifetime
Assigned, UrgentPublic

Description

So after a while I managed to get my hands back on modding and the bug still exists :)

If you inherit your object in config.cpp from another object and not from it's "base" object - your new object will have glitched lifetime. It will be set to zero and will not change even with scripts. So your new object will be deleted asap.

It was working fine but 3-4 months ago this bug showed up.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Create new item in config.cpp vehicles class. (tested with clothing)
  2. Inherit your new item from any other item (but not from "_Base" class and not from Inventory_Item - this way all works fine).
  3. Add to types.xml (just to be sure) and set correct lifetime.
  4. Create a script-class (just to be sure).
  5. Check lifetime of your item and try to modify it - both cases should result in lifetime set to zero.

Event Timeline

Moonny created this task.Jun 4 2022, 10:56 AM
Geez changed the task status from New to Assigned.Jun 8 2022, 12:23 PM