mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-07-18 17:37:59 +08:00
predicted chainsaw state 2/2
unfortunately there's no reliable way due to *::Deploy not being called in certain scenarios but that should serve as good foundation for later improvement. minor precision loss possibly due to addition being replaced with multiplication (ie. cycle + rate * interval -> ticks * rate * interval)
This commit is contained in:
17
Move.hpp
17
Move.hpp
@ -1,12 +1,16 @@
|
||||
__int32 Extra_Commands;
|
||||
|
||||
__int32 Chainsaw_Cycles;
|
||||
|
||||
void* Original_Move_Caller;
|
||||
|
||||
void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
||||
{
|
||||
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
||||
|
||||
using Run_Prediction_Type = void(__cdecl*)();
|
||||
|
||||
if (*(void**)((unsigned __int32)Client_Module + 7498712) != nullptr)
|
||||
if (Local_Player != nullptr)
|
||||
{
|
||||
Redirected_Read_Packets(Final);
|
||||
|
||||
@ -37,6 +41,17 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
||||
|
||||
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
||||
|
||||
if (Local_Player != nullptr)
|
||||
{
|
||||
Chainsaw_Cycles += 1 + (Chainsaw_Cycles == 0);
|
||||
|
||||
static float Deploy_Time;
|
||||
|
||||
Chainsaw_Cycles *= *(float*)((unsigned __int32)Local_Player + 3872) == Deploy_Time;
|
||||
|
||||
Deploy_Time = *(float*)((unsigned __int32)Local_Player + 3872);
|
||||
}
|
||||
|
||||
if (Extra_Commands > 0)
|
||||
{
|
||||
Extra_Commands -= 1;
|
||||
|
Reference in New Issue
Block a user