diff --git a/changelog.md b/changelog.md index f527b23..5b8ff73 100644 --- a/changelog.md +++ b/changelog.md @@ -5,6 +5,7 @@ - Fixed Noclip Accuracy being wrong a lot of the time - Fixed Show Trajectory unnecessarily running a lot more times than necessary - Fixed Click Sounds dying with Show Trajectory enabled +- Fixed Show Hitboxes not showing the hitbox of 2 monster objects (you know, those guys..) - Made Update Available label clickable if an update is available, clicking it opens the mod popup to update the mod - Added **Frame Stepper** diff --git a/src/Hacks/FixedMonsterHitboxes.cpp b/src/Hacks/FixedMonsterHitboxes.cpp new file mode 100644 index 0000000..048edc7 --- /dev/null +++ b/src/Hacks/FixedMonsterHitboxes.cpp @@ -0,0 +1,21 @@ +#include +#include +#include "../Client/Client.h" + +using namespace geode::prelude; + +class $modify(GJBaseGameLayer) +{ + virtual void updateDebugDraw() + { + GJBaseGameLayer::updateDebugDraw(); + + for (auto obj : CCArrayExt(m_objects)) + { + if (obj->m_objectID == 918 || obj->m_objectID == 2012) + { + m_debugDrawNode->drawCircle(obj->getPosition(), obj->m_objectRadius, ccc4f(1, 0, 0, 1), 0.25f, ccc4f(1, 0, 0, 1), 120); + } + } + } +}; \ No newline at end of file diff --git a/src/Hacks/Frame Stepper/FrameStepper.cpp b/src/Hacks/Frame Stepper/FrameStepper.cpp index c37b541..360f0d5 100644 --- a/src/Hacks/Frame Stepper/FrameStepper.cpp +++ b/src/Hacks/Frame Stepper/FrameStepper.cpp @@ -159,9 +159,6 @@ void SteppedUILayer::updateUI() if (!typeinfo_cast(m_gameLayer)) { - m_fields->next->setEnabled(false); - m_fields->next->setColor(ccc3(150, 150, 150)); - m_fields->prev->setEnabled(false); m_fields->prev->setColor(ccc3(150, 150, 150)); } @@ -224,8 +221,10 @@ class FrameStepperUIDelegate : public ModuleChangeDelegate Client::GetModule("frame-stepper")->onToggle = [](bool enabled) { if (GJBaseGameLayer::get()) + { as(GJBaseGameLayer::get()->m_uiLayer)->m_fields->menu->setVisible(enabled); as(GJBaseGameLayer::get()->m_uiLayer)->updateUI(); + } }; }); } \ No newline at end of file diff --git a/src/Hacks/Show Trajectory/Trajectory.cpp b/src/Hacks/Show Trajectory/Trajectory.cpp index 38f662e..7c1800f 100644 --- a/src/Hacks/Show Trajectory/Trajectory.cpp +++ b/src/Hacks/Show Trajectory/Trajectory.cpp @@ -37,6 +37,13 @@ bool TrajectoryPlayLayer::init(GJGameLevel* level, bool useReplay, bool dontCrea return true; } +void TrajectoryPlayLayer::resetLevel() +{ + PlayLayer::resetLevel(); + + base_cast(this)->updateSimulation(); +} + void TrajectoryPlayLayer::destroyPlayer(PlayerObject* p0, GameObject* p1) { auto tbgl = base_cast(this); @@ -137,6 +144,11 @@ void TrajectoryBGL::update(float dt) { GJBaseGameLayer::update(dt); + updateSimulation(); +} + +void TrajectoryBGL::updateSimulation() +{ if (m_fields->trajectoryPlayer) { m_fields->trajectoryDraw->clear(); diff --git a/src/Hacks/Show Trajectory/Trajectory.hpp b/src/Hacks/Show Trajectory/Trajectory.hpp index 5b8e878..dfcb777 100644 --- a/src/Hacks/Show Trajectory/Trajectory.hpp +++ b/src/Hacks/Show Trajectory/Trajectory.hpp @@ -33,6 +33,8 @@ class $modify (TrajectoryBGL, GJBaseGameLayer) void resetSimulation(PlayerObject* player); void simulateTrajectory(bool press, PlayerObject* player); + void updateSimulation(); + void collisionCheckObjects(PlayerObject* p0, gd::vector* p1, int p2, float p3); virtual void update(float dt); @@ -43,5 +45,9 @@ class $modify (TrajectoryPlayLayer, PlayLayer) { bool init(GJGameLevel* level, bool useReplay, bool dontCreateObjects); + void resetLevel(); + virtual void destroyPlayer(PlayerObject* p0, GameObject* p1); + + QOLMOD_MOD_HOOK("show-trajectory", "PlayLayer::resetLevel") }; \ No newline at end of file