Storm/Run_Command.hpp
explorer 338a781f22 prediction redesignment (details in description)
my plan to use constant buffering to instantize actions (as healing, reviving) turned out ill-fated:
- many things are using server relative timing: rock stuns, lagcompensation and many of interactables (they're all getting delayed by 150*(1/30) seconds)
- there's always undefined behaviour no matter whether i'm constantly buffering or periodically
- implementing logic that prevents buffering on when you're about to get hit by rock or to use something would adjust weapon timings (they're all getting delayed by 150*(1/30) seconds)
thus i've removed some of things i've worked on (as exploits, viewmodel timing correction)

mostly same thing about extra commands up to 21 while exploiting (my old trick doesn't works anymore): it's either undefined behaviour or feature cuttage

but on good note:
- prediction got hardened against timing fluctations
- prediction now respects network timing updates
- speedhacking issued undefined behaviour is significantly mitigated (not completely but i'd prefer to not bloat my code over such rare cases)

i'll be working on features from now, here's potential list (anything that involves guessing is very low priority):
rock prediction (involves guessing, it's not lagcompensated)
tongue cutter (involves guessing)
tongue aimbot/triggerbot (i've actually forgot to adjust lagcompensation for it but i'm not playing versus anyway)
animation cycles prediction (involves guessing, u-rates are synced already so it's just about latency adjustments now)
minigun aimbot (i'd like to work on it but just one thing that it's angle is limited thus impossibility to compensate spread accurately ruins it for me)
visual improvements (such as visually removing m_duckUntilOnGround)
2024-10-24 12:39:44 +03:00

47 lines
1.3 KiB
C++

struct Command_Structure
{
__int8 Additional_Bytes_1[4];
__int32 Command_Number;
__int32 Tick_Number;
float Angles[3];
float Move[3];
__int32 Buttons;
__int8 Additional_Bytes_2[9];
__int32 Random_Seed;
};
struct Extended_Command_Structure
{
__int32 Extra_Commands;
__int32 Sequence_Shift;
};
Extended_Command_Structure Extended_Commands[150];
void* Original_Run_Command_Caller;
void __thiscall Redirected_Run_Command(void* Prediction, void* Player, Command_Structure* Command, void* Move_Helper)
{
Extended_Command_Structure* Extended_Command = &Extended_Commands[*(__int32*)((unsigned __int32)Player + 5620) % 150];
*(__int32*)((unsigned __int32)Player + 5324) -= Extended_Command->Extra_Commands + Extended_Command->Sequence_Shift;
(decltype(&Redirected_Run_Command)(Original_Run_Command_Caller))(Prediction, Player, Command, Move_Helper);
if (__builtin_return_address(0) == (void*)((unsigned __int32)Client_Module + 423107))
{
*(__int32*)((unsigned __int32)Player + 5324) += Extended_Command->Sequence_Shift;
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
Global_Variables->Current_Time = (*(__int32*)((unsigned __int32)Player + 5324) - 1) * Global_Variables->Interval_Per_Tick;
}
}