You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Transitive Comparator for script sorting (#277)
* Transitive Comparator for script sorting
The current algorithm returns a random result unless a is in b's type hierarchy. Random results are disallowed in the sort_custom API
https://docs.godotengine.org/en/3.5/classes/class_array.html?highlight=sort_custom
The new algorithm sorts alphabetically by names in the type hierarchy paths until one of the trees stop then it sorts the shorter tree first.
Aims to fix the following errors that gets spammed at startup (and i think causes startup crashes):
E 0:00:00.815 SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner: bad comparison function; sorting will be broken
<C++ Source> .\core/sort_array.h:179 @ SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner()
<Stack Trace> script_extension.gd:39 @ handle_script_extensions()
mod_loader.gd:164 @ _load_mods()
mod_loader.gd:67 @ _init()
* reverse the type order to be ancestor first
* Add static types, remove unused manual cache
* pop the last ele
0 commit comments