Storm/Send_Move.hpp

70 lines
2.2 KiB
C++
Raw Permalink Normal View History

2024-10-07 03:45:39 +08:00
void Redirected_Send_Move()
{
struct Message_Structure
{
__int8 Message[160];
void Construct(__int8* Data, unsigned __int32 Size)
{
2024-11-09 20:31:28 +08:00
Byte_Manager::Set_Bytes(1, Message, sizeof(Message), 0);
2024-10-07 03:45:39 +08:00
2024-10-25 13:12:24 +08:00
*(void**)Message = (void*)((unsigned __int32)Engine_Module + 3501364);
2024-10-07 03:45:39 +08:00
*(void**)((unsigned __int32)Message + 132) = Data;
*(__int32*)((unsigned __int32)Message + 136) = Size;
*(__int32*)((unsigned __int32)Message + 140) = Size * 8;
}
};
Message_Structure Message;
__int8 Data[4000];
Message.Construct(Data, sizeof(Data));
void* Client = *(void**)((unsigned __int32)Engine_Module + 4352236);
__int32 Choked_Commands = *(__int32*)((unsigned __int32)Client + 19024);
__int32 Commands_Queue = min(Choked_Commands + 1, 15);
*(__int32*)((unsigned __int32)&Message + 88) = Commands_Queue;
__int32 Extra_Commands_Queue = Choked_Commands + 1 - Commands_Queue;
__int32 Backup_Commands = min(Extra_Commands_Queue, 7);
*(__int32*)((unsigned __int32)&Message + 84) = Backup_Commands;
__int32 From_Command_Number = -1;
__int32 Next_Command_Number = *(__int32*)((unsigned __int32)Client + 19020) + Choked_Commands + 2;
__int32 To_Command_Number = Next_Command_Number - Commands_Queue - Backup_Commands;
Write_Command_Label:
{
using Write_Command_Type = __int8(__thiscall*)(void* Client, void* Unknown_Parameter_1, void* Data, __int32 From, __int32 To, void* Unknown_Parameter_2);
Write_Command_Type((unsigned __int32)Client_Module + 691088)(*(void**)((unsigned __int32)Engine_Module + 5171072), nullptr, (void*)((unsigned __int32)&Message + 132), From_Command_Number, To_Command_Number, nullptr);
From_Command_Number = To_Command_Number;
To_Command_Number += 1;
if (To_Command_Number != Next_Command_Number)
{
goto Write_Command_Label;
}
}
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
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 17:39:44 +08:00
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
2024-10-07 03:45:39 +08:00
2024-11-09 20:31:28 +08:00
using Send_Message_Type = void(__thiscall**)(void* Network_Channel, void* Message, void* Unknown_Parameter_1, void* Unknown_Parameter_2);
2024-10-07 03:45:39 +08:00
2024-11-09 20:31:28 +08:00
(*Send_Message_Type(*(unsigned __int32*)Network_Channel + 164))(Network_Channel, &Message, nullptr, nullptr);
2024-10-07 03:45:39 +08:00
}