From 85daeb13a206b000d9dc01f1a15deadb52122e4c Mon Sep 17 00:00:00 2001 From: Explodingbill Date: Mon, 5 Feb 2024 17:34:07 +1100 Subject: [PATCH] fd --- src/Client/ClientSetup.h | 2 ++ src/Hacks/Thicker Hitboxes.cpp | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/Hacks/Thicker Hitboxes.cpp diff --git a/src/Client/ClientSetup.h b/src/Client/ClientSetup.h index 1667189..79e63fb 100644 --- a/src/Client/ClientSetup.h +++ b/src/Client/ClientSetup.h @@ -118,6 +118,8 @@ class ClientUtils cosmetic->modules.push_back(new Module("Transparent BG", "trans-bg", "Disables the colouring on the gradient backgrounds")); cosmetic->modules.push_back(new Module("Transparent Lists", "trans-lists", "Disables the colouring on all cells")); + + cosmetic->modules.push_back(new Module("Thicker Hitboxes", "thick-hitbox", "Makes the hitboxes in gd thicker ;)")); //cosmetic->modules.push_back(new Module("No Player Rotation", "no-plr-rot", "Disables Player Rotation :3\nIt looks ugly imo but you do you")); Client::instance->windows.push_back(cosmetic); diff --git a/src/Hacks/Thicker Hitboxes.cpp b/src/Hacks/Thicker Hitboxes.cpp new file mode 100644 index 0000000..bf03431 --- /dev/null +++ b/src/Hacks/Thicker Hitboxes.cpp @@ -0,0 +1,19 @@ +#include +#include "../Client/Client.h" + +using namespace geode::prelude; + +bool myDrawPoly(CCDrawNode* ins, CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor) { + return ins->drawPolygon(verts, count, fillColor, borderWidth * (((ins->getTag() == -9999) && Client::GetModuleEnabled("thick-hitbox")) ? 2.2f /*2.2?! HOLY SHIT IS THAT A MOTHERFUCKING GEOMETRY DASH REFERENCE*/ : 1), borderColor); +} + +$execute { + Mod::get()->hook( + reinterpret_cast( + geode::addresser::getNonVirtual(&CCDrawNode::drawPolygon) + ), + &myDrawPoly, + "cocos2d::CCDrawNode::drawPolygon", + tulip::hook::TulipConvention::Thiscall + ); +} \ No newline at end of file