Ref Tracking: Revengance (#57728)

* Ref Tracking: Revengance

Fixes reference tracking ignoring self references due to a poorly thought out tick checking system.
Fixes reference tracking ignoring the contents of assoc lists
Makes the reference tracking printouts actually describe what list the ref is in, rather then just saying "list"

Adds REFERENCE_TRACKING_DEBUG, a define which toggles tracking info for the ref tracking procs, which allows for
oversight on how the proc is working

Allows for direct calls of qdel_and_find_ref_if_fail(), makes it use ref rather then REF(), fixing it breaking
for mobs. (Ditto for the qdel hint which does the same thing)

Moves REAGENTS_TESTING out of the reftracking define block
Makes unit tests define REFERENCE_TRACKING, REFERENCE_TRACKING_DEBUG, and FIND_REF_NO_CHECK_TICK

Adds a unit test that sanity checks the reference finder proc
This commit is contained in:
LemonInTheDark
2021-03-25 22:01:23 -07:00
committed by GitHub
parent d79d978f59
commit 1aa42a3188
6 changed files with 136 additions and 23 deletions

View File

@@ -332,9 +332,9 @@ SUBSYSTEM_DEF(garbage)
if (QDEL_HINT_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled, display all references to this object, then queue the object for deletion.
SSgarbage.Queue(D)
D.find_references()
if (QDEL_HINT_IFFAIL_FINDREFERENCE)
if (QDEL_HINT_IFFAIL_FINDREFERENCE) //qdel will, if REFERENCE_TRACKING is enabled and the object fails to collect, display all references to this object.
SSgarbage.Queue(D)
SSgarbage.reference_find_on_fail[REF(D)] = TRUE
SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
#endif
else
#ifdef TESTING