Skip to content

Commit 7972fbf

Browse files
author
TheSillyDoggo
committed
mreeeeow
1 parent f9fd929 commit 7972fbf

File tree

5 files changed

+42
-3
lines changed

5 files changed

+42
-3
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fixed Noclip Accuracy being wrong a lot of the time
66
- Fixed Show Trajectory unnecessarily running a lot more times than necessary
77
- Fixed Click Sounds dying with Show Trajectory enabled
8+
- Fixed Show Hitboxes not showing the hitbox of 2 monster objects (you know, those guys..)
89
- Made Update Available label clickable if an update is available, clicking it opens the mod popup to update the mod
910
- Added **Frame Stepper**
1011

src/Hacks/FixedMonsterHitboxes.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <Geode/Geode.hpp>
2+
#include <Geode/modify/GJBaseGameLayer.hpp>
3+
#include "../Client/Client.h"
4+
5+
using namespace geode::prelude;
6+
7+
class $modify(GJBaseGameLayer)
8+
{
9+
virtual void updateDebugDraw()
10+
{
11+
GJBaseGameLayer::updateDebugDraw();
12+
13+
for (auto obj : CCArrayExt<GameObject*>(m_objects))
14+
{
15+
if (obj->m_objectID == 918 || obj->m_objectID == 2012)
16+
{
17+
m_debugDrawNode->drawCircle(obj->getPosition(), obj->m_objectRadius, ccc4f(1, 0, 0, 1), 0.25f, ccc4f(1, 0, 0, 1), 120);
18+
}
19+
}
20+
}
21+
};

src/Hacks/Frame Stepper/FrameStepper.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ void SteppedUILayer::updateUI()
159159

160160
if (!typeinfo_cast<PlayLayer*>(m_gameLayer))
161161
{
162-
m_fields->next->setEnabled(false);
163-
m_fields->next->setColor(ccc3(150, 150, 150));
164-
165162
m_fields->prev->setEnabled(false);
166163
m_fields->prev->setColor(ccc3(150, 150, 150));
167164
}
@@ -224,8 +221,10 @@ class FrameStepperUIDelegate : public ModuleChangeDelegate
224221
Client::GetModule("frame-stepper")->onToggle = [](bool enabled)
225222
{
226223
if (GJBaseGameLayer::get())
224+
{
227225
as<SteppedUILayer*>(GJBaseGameLayer::get()->m_uiLayer)->m_fields->menu->setVisible(enabled);
228226
as<SteppedUILayer*>(GJBaseGameLayer::get()->m_uiLayer)->updateUI();
227+
}
229228
};
230229
});
231230
}

src/Hacks/Show Trajectory/Trajectory.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ bool TrajectoryPlayLayer::init(GJGameLevel* level, bool useReplay, bool dontCrea
3737
return true;
3838
}
3939

40+
void TrajectoryPlayLayer::resetLevel()
41+
{
42+
PlayLayer::resetLevel();
43+
44+
base_cast<TrajectoryBGL*>(this)->updateSimulation();
45+
}
46+
4047
void TrajectoryPlayLayer::destroyPlayer(PlayerObject* p0, GameObject* p1)
4148
{
4249
auto tbgl = base_cast<TrajectoryBGL*>(this);
@@ -137,6 +144,11 @@ void TrajectoryBGL::update(float dt)
137144
{
138145
GJBaseGameLayer::update(dt);
139146

147+
updateSimulation();
148+
}
149+
150+
void TrajectoryBGL::updateSimulation()
151+
{
140152
if (m_fields->trajectoryPlayer)
141153
{
142154
m_fields->trajectoryDraw->clear();

src/Hacks/Show Trajectory/Trajectory.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class $modify (TrajectoryBGL, GJBaseGameLayer)
3333
void resetSimulation(PlayerObject* player);
3434
void simulateTrajectory(bool press, PlayerObject* player);
3535

36+
void updateSimulation();
37+
3638
void collisionCheckObjects(PlayerObject* p0, gd::vector<GameObject*>* p1, int p2, float p3);
3739
virtual void update(float dt);
3840

@@ -43,5 +45,9 @@ class $modify (TrajectoryPlayLayer, PlayLayer)
4345
{
4446
bool init(GJGameLevel* level, bool useReplay, bool dontCreateObjects);
4547

48+
void resetLevel();
49+
4650
virtual void destroyPlayer(PlayerObject* p0, GameObject* p1);
51+
52+
QOLMOD_MOD_HOOK("show-trajectory", "PlayLayer::resetLevel")
4753
};

0 commit comments

Comments
 (0)