Skip to content

Commit

Permalink
Added Editor Wave Trail
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSillyDoggo committed Jul 24, 2024
1 parent b45f633 commit e31b917
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Fixed Globed already loaded level bug
- Fixed not being able to exit practice mode with Comfirm Practice enabled
- Added **Editor Wave Trail**

# 1.5.0

Expand Down
2 changes: 2 additions & 0 deletions src/Client/ClientSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ class ClientUtils
#endif
creator->modules.push_back(new Module("No Custom Object Limit", "custom-obj-limit", "Removes the custom object limit"));

creator->modules.push_back(new Module("Editor Wave Trail", "editor-wave-trail", "Shows the wave trail in the editor"));

//auto misc = new Module("Misc Bypasses", "misc-bypass", "Random <cl>Client Side</c> bypasses / unlocks to random editor limits");
//misc->options.push_back(new Module("Zoom Limit", "zoom-limit", "Bypass the editor zoom limit", true));
//creator->modules.push_back(misc);
Expand Down
40 changes: 40 additions & 0 deletions src/Hacks/EditorWaveTrail.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <Geode/Geode.hpp>
#include <Geode/modify/HardStreak.hpp>
#include <Geode/modify/PlayerObject.hpp>
#include "../Client/Client.h"

using namespace geode::prelude;

class $modify (HardStreak)
{
void updateStroke(float p0)
{
if (LevelEditorLayer::get())
m_drawStreak = true;

HardStreak::updateStroke(p0);
}

QOLMOD_MOD_ALL_HOOKS("editor-wave-trail")
};

class $modify (PlayerObject)
{
void placeStreakPoint()
{
if (LevelEditorLayer::get() && m_isDart)
m_waveTrail->addPoint(this->getPosition());
else
PlayerObject::placeStreakPoint();
}

virtual void update(float dt)
{
PlayerObject::update(dt);

if (LevelEditorLayer::get())
m_waveTrail->m_currentPoint = this->getPosition();
}

QOLMOD_MOD_ALL_HOOKS("editor-wave-trail")
};

0 comments on commit e31b917

Please sign in to comment.