From 24189b1a03ab83bd7d8d66e98b731beeebf99438 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Mon, 25 Nov 2024 13:46:59 +0100 Subject: [PATCH] add getHighestChildZ crash fix --- loader/src/hooks/CCSceneCrashFix.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 loader/src/hooks/CCSceneCrashFix.cpp diff --git a/loader/src/hooks/CCSceneCrashFix.cpp b/loader/src/hooks/CCSceneCrashFix.cpp new file mode 100644 index 00000000..ba56640b --- /dev/null +++ b/loader/src/hooks/CCSceneCrashFix.cpp @@ -0,0 +1,12 @@ +#include +#include + +using namespace geode::prelude; + +class $modify(CCScene) { + int getHighestChildZ() { + if(this->getChildrenCount() == 0) return 0; + + return CCScene::getHighestChildZ(); + } +}; \ No newline at end of file