Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
fix noclip accuracy bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnut committed Mar 16, 2024
1 parent f984362 commit 41e9bd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Hacks/Labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ Labels::Label Labels::setupLabel(const std::string& labelSettingName,

class $modify(PlayLayer)
{

bool init(GJGameLevel* p0, bool p1, bool p2)
{
levelCompleted = false;
labels.clear();
bool res = PlayLayer::init(p0, p1, p2);

Expand Down Expand Up @@ -123,7 +125,7 @@ class $modify(PlayLayer)

if (!noclipDead)
{
if (acc <= limit)
if (acc <= limit && limit > 0)
noclipDead = true;
pointer->setString(
frames == 0
Expand Down Expand Up @@ -234,6 +236,7 @@ class $modify(PlayLayer)
{
PlayLayer::levelComplete();
currentRun.second = PlayLayer::getCurrentPercent();
levelCompleted = true;

float currentRunTotal = currentRun.second - currentRun.first;
float bestRunTotal = bestRun.second - bestRun.first;
Expand All @@ -246,6 +249,7 @@ class $modify(PlayLayer)
Common::updateCheating();
SafeMode::updateAuto();
noclipDead = false;
levelCompleted = false;
dead = false;
totalClicks = 0;
frames = 0;
Expand Down Expand Up @@ -308,7 +312,8 @@ void Labels::GJBaseGameLayerProcessCommands(GJBaseGameLayer *self)

clickRegistered = false;

frames++;
if(!levelCompleted)
frames++;

if (dead)
{
Expand Down
1 change: 1 addition & 0 deletions src/Hacks/Labels.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ inline bool click = false;
inline bool dead = false;
inline bool noclipDead = false;
inline bool lastFrameDead = false;
inline bool levelCompleted = false;

inline GameObject* anticheatSpike = nullptr;

Expand Down

0 comments on commit 41e9bd1

Please sign in to comment.