Skip to content

Commit

Permalink
this also breaks :/
Browse files Browse the repository at this point in the history
  • Loading branch information
SandeMC authored Nov 3, 2024
1 parent 0ff569c commit f79a1df
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions source/frameratevigilante.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,6 @@ public:
}
}; injector::MakeInline<CDSpinnerHook>(pattern.get_first(0), pattern.get_first(8));
}

// Cop blips
static int CustomFrameCounter = 0;
pattern = hook::pattern("A1 ? ? ? ? 6B C0 15");
if (!pattern.empty())
injector::WriteMemory(pattern.get_first(1), &CustomFrameCounter, true);

pattern = hook::pattern("FF 05 ? ? ? ? F3 0F 2C C0");
if (!pattern.empty())
{
static auto CounterHook = safetyhook::create_mid(pattern.get_first(), [](SafetyHookContext& regs)
{
static float accumulator = 0.0f;
accumulator += (*CTimer::fTimeStep / (1.0f / 30.0f));
int increment = static_cast<int>(accumulator);
CustomFrameCounter += increment;
accumulator -= increment;
});
}
};
}
} FramerateVigilante;

0 comments on commit f79a1df

Please sign in to comment.