mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-07-18 09:27:56 +08:00
ensure CPredictionCopy contains correct value for given frame
water? maybe. +20 is to be removed anyway
This commit is contained in:
@ -210,19 +210,26 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
||||
|
||||
_putws(L"[ + ] Prediction");
|
||||
{
|
||||
static Prediction_Descriptor_Structure Original_Prediction_Descriptor;
|
||||
auto Add_Prediction_Fields = [](Prediction_Descriptor_Structure* Descriptor, Prediction_Field_Structure* Fields, __int32 Size) -> void
|
||||
{
|
||||
Prediction_Descriptor_Structure* Original_Descriptor = (Prediction_Descriptor_Structure*)malloc(sizeof(Prediction_Descriptor_Structure));
|
||||
|
||||
Prediction_Descriptor_Structure* Prediction_Descriptor = (Prediction_Descriptor_Structure*)((unsigned __int32)Client_Module + 7290836);
|
||||
Byte_Manager::Copy_Bytes(0, Original_Descriptor, sizeof(Prediction_Descriptor_Structure), Descriptor);
|
||||
|
||||
Byte_Manager::Copy_Bytes(0, &Original_Prediction_Descriptor, sizeof(Prediction_Descriptor_Structure), Prediction_Descriptor);
|
||||
Descriptor->Fields = Fields;
|
||||
|
||||
static Prediction_Field_Structure Prediction_Fields = { 1, (char*)"m_fMaxSpread", 3340, 1, { }, sizeof(float) };
|
||||
Descriptor->Size = Size;
|
||||
|
||||
Prediction_Descriptor->Fields = &Prediction_Fields;
|
||||
Descriptor->Parent = Original_Descriptor;
|
||||
};
|
||||
|
||||
Prediction_Descriptor->Size = sizeof(Prediction_Fields) / sizeof(Prediction_Field_Structure);
|
||||
static Prediction_Field_Structure Player_Fields = { 5, (char*)(*(unsigned __int32*)((unsigned __int32)GetModuleHandleW(L"vphysics.dll") + 1701868) + 2226), 16, 1, { }, sizeof(__int32) };
|
||||
|
||||
Prediction_Descriptor->Parent = &Original_Prediction_Descriptor;
|
||||
Add_Prediction_Fields((Prediction_Descriptor_Structure*)((unsigned __int32)Client_Module + 7236480), &Player_Fields, sizeof(Player_Fields) / sizeof(Prediction_Field_Structure));
|
||||
|
||||
static Prediction_Field_Structure Weapon_Fields = { 1, (char*)"m_fMaxSpread", 3340, 1, { }, sizeof(float) };
|
||||
|
||||
Add_Prediction_Fields((Prediction_Descriptor_Structure*)((unsigned __int32)Client_Module + 7290836), &Weapon_Fields, sizeof(Weapon_Fields) / sizeof(Prediction_Field_Structure));
|
||||
|
||||
Redirection_Manager::Redirect_Function(Original_Spawn_Grenade_Caller, 2, (void*)((unsigned __int32)Client_Module + 2227424), 1, (void*)Redirected_Spawn_Grenade);
|
||||
|
||||
|
Reference in New Issue
Block a user