mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-09-19 12:06:11 +08:00
Compare commits
9 Commits
14.12.2024
...
03.01.2025
Author | SHA1 | Date | |
---|---|---|---|
a402400c01 | |||
519d56c138 | |||
f5fb3e4d30 | |||
81feda0668 | |||
61f5cad124 | |||
8496bfcbeb | |||
7b440b4004 | |||
7c6d951aee | |||
e2437349a0 |
363
Copy_Command.hpp
363
Copy_Command.hpp
@ -223,33 +223,93 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static __int32 Accumulative_Correction;
|
||||||
|
|
||||||
|
auto Disable_Clock_Correction = [&](__int32 Queue) -> void
|
||||||
|
{
|
||||||
|
if (Queue > 0)
|
||||||
|
{
|
||||||
|
if (Extended_Command == Initial_Extended_Command)
|
||||||
|
{
|
||||||
|
Extended_Command->Extra_Commands = 0;
|
||||||
|
|
||||||
|
Extra_Commands = max((__int32)(0.06f / Global_Variables->Interval_Per_Tick + 0.5f), Queue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Accumulative_Correction += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Initial_Extended_Command->Extra_Commands == 0)
|
||||||
|
{
|
||||||
|
*(__int32*)((unsigned __int32)Network_Channel + 16) = -1;
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Network_Channel + 28) = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
auto Correct_Extended_Command = [&]() -> void
|
||||||
|
{
|
||||||
|
if (*(__int32*)((unsigned __int32)Network_Channel + 16) != -1)
|
||||||
|
{
|
||||||
|
Extended_Command->Extra_Commands += Accumulative_Correction;
|
||||||
|
|
||||||
|
Accumulative_Correction = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
||||||
|
};
|
||||||
|
|
||||||
if (*(__int32*)((unsigned __int32)Local_Player + 228) == 3)
|
if (*(__int32*)((unsigned __int32)Local_Player + 228) == 3)
|
||||||
{
|
{
|
||||||
if (*(__int8*)((unsigned __int32)Local_Player + 7322) == 1)
|
if (*(__int8*)((unsigned __int32)Local_Player + 7322) == 0)
|
||||||
|
{
|
||||||
|
if (*(void**)((unsigned __int32)Local_Player + 10008) == INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
__int8 Is_Jockey_Victim = *(void**)((unsigned __int32)Local_Player + 10056) != INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
|
if ((*(void**)((unsigned __int32)Local_Player + 10012) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10024) != INVALID_HANDLE_VALUE) + Is_Jockey_Victim != 0)
|
||||||
|
{
|
||||||
|
Command->Buttons |= Is_Jockey_Victim * 2;
|
||||||
|
|
||||||
|
Disable_Clock_Correction(Interface_Extra_Commands_Action.Integer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Sequence_Shift(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (*(__int32*)((unsigned __int32)Local_Player + 7324) == 0)
|
if (*(__int32*)((unsigned __int32)Local_Player + 7324) == 0)
|
||||||
{
|
{
|
||||||
Sequence_Shift(-2);
|
Sequence_Shift(-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (*(void**)((unsigned __int32)Local_Player + 10008) != INVALID_HANDLE_VALUE)
|
|
||||||
{
|
|
||||||
Sequence_Shift(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
Correct_Extended_Command();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
__int8 Action = *(void**)((unsigned __int32)Local_Player + 7076) == *(void**)((unsigned __int32)Local_Player + 376);
|
||||||
|
|
||||||
|
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
if ((*(float*)((unsigned __int32)Local_Player + 4604) + 800.f * Global_Variables->Interval_Per_Tick >= 560.f) + *(__int8*)((unsigned __int32)Local_Player + 8068) + *(__int8*)((unsigned __int32)Local_Player + 9708) != 0)
|
if ((*(float*)((unsigned __int32)Local_Player + 4604) + 800.f * Global_Variables->Interval_Per_Tick >= 560.f) + *(__int8*)((unsigned __int32)Local_Player + 8068) + *(__int8*)((unsigned __int32)Local_Player + 9708) != 0)
|
||||||
{
|
{
|
||||||
Sequence_Shift(2);
|
Sequence_Shift(2);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Action + Reviving != 0)
|
||||||
|
{
|
||||||
|
Disable_Clock_Correction(Interface_Extra_Commands_Action.Integer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Extended_Command->Sequence_Shift = Initial_Extended_Command->Sequence_Shift;
|
Correct_Extended_Command();
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 5620) = Command->Command_Number;
|
*(__int32*)((unsigned __int32)Local_Player + 5620) = Command->Command_Number;
|
||||||
|
|
||||||
@ -273,8 +333,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
if ((*(__int32*)((unsigned __int32)Local_Player + 324) & 9) == 0)
|
if ((*(__int32*)((unsigned __int32)Local_Player + 324) & 9) == 0)
|
||||||
{
|
{
|
||||||
__int8 Action = *(__int32*)((unsigned __int32)Local_Player + 7080) != 0;
|
|
||||||
|
|
||||||
if ((*(__int32*)((unsigned __int32)Local_Player + 5020) & 32) * (Action ^ 1) == 0)
|
if ((*(__int32*)((unsigned __int32)Local_Player + 5020) & 32) * (Action ^ 1) == 0)
|
||||||
{
|
{
|
||||||
using Can_Attack_Type = __int8(__thiscall*)(void* Player);
|
using Can_Attack_Type = __int8(__thiscall*)(void* Player);
|
||||||
@ -289,6 +347,59 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
__int8 Cancelable_Shove = 1 + (*(float*)((unsigned __int32)Local_Player + 7336) < Global_Variables->Current_Time) * (*(float*)((unsigned __int32)Weapon + 2404) <= Global_Variables->Current_Time);
|
||||||
|
|
||||||
|
__int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
|
||||||
|
|
||||||
|
if ((Weapon_Identifier == 105) + (Weapon_Identifier == 121) == 0)
|
||||||
|
{
|
||||||
|
static std::unordered_set<__int32> Grenades = { 106, 118, 129 };
|
||||||
|
|
||||||
|
if (Grenades.contains(Weapon_Identifier) == 1)
|
||||||
|
{
|
||||||
|
Cancelable_Shove = min((*(__int16*)((unsigned __int32)Weapon + 3304) == 0) + (*(float*)((unsigned __int32)Weapon + 3308) == 0.f), Cancelable_Shove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Cancelable_Shove = min(1 + (*(float*)((unsigned __int32)Weapon + 3312) == -1.f), Cancelable_Shove);
|
||||||
|
}
|
||||||
|
|
||||||
|
__int8 In_Shove = Global_Variables->Current_Time >= *(float*)((unsigned __int32)Local_Player + 7904);
|
||||||
|
|
||||||
|
if (Global_Variables->Current_Time >= *(float*)((unsigned __int32)Weapon + 2704))
|
||||||
|
{
|
||||||
|
In_Shove = *(__int8*)((unsigned __int32)Weapon + 2720);
|
||||||
|
}
|
||||||
|
|
||||||
|
__int32 Ammo = *(__int32*)((unsigned __int32)Weapon + 2436);
|
||||||
|
|
||||||
|
static void* Predicted_Shot;
|
||||||
|
|
||||||
|
using Get_Weapon_Data_Type = void*(__thiscall*)(void* Weapon);
|
||||||
|
|
||||||
|
void* Weapon_Data = Get_Weapon_Data_Type((unsigned __int32)Client_Module + 86432)(Weapon);
|
||||||
|
|
||||||
|
__int8 Is_Melee = *(__int32*)((unsigned __int32)Weapon_Data + 352) * (*(__int32*)((unsigned __int32)Weapon_Data + 348) ^ 1) <= 1;
|
||||||
|
|
||||||
|
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
||||||
|
|
||||||
|
__int8 Can_Attack = 0;
|
||||||
|
|
||||||
|
if (Weapon_Identifier == 39)
|
||||||
|
{
|
||||||
|
Can_Attack = (min(Chainsaw_Cycles * 0.46153846f * Global_Variables->Interval_Per_Tick, 1.f) > 0.95f) * (In_Shove ^ 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time) * (Ammo > 0 - Is_Melee * 2) * (Reloading ^ 1);
|
||||||
|
|
||||||
|
if ((*(double*)((unsigned __int32)Weapon + 3392) == 0.) * Weapon_Identifier == 153)
|
||||||
|
{
|
||||||
|
Can_Attack *= *(float*)((unsigned __int32)Weapon + 3400) <= Global_Variables->Current_Time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__int32 Entity_Number = 1;
|
__int32 Entity_Number = 1;
|
||||||
|
|
||||||
using Get_Interpolation_Time_Type = float(__cdecl*)();
|
using Get_Interpolation_Time_Type = float(__cdecl*)();
|
||||||
@ -388,151 +499,162 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
size_t Target_Number = 0;
|
size_t Target_Number = 0;
|
||||||
|
|
||||||
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
|
||||||
|
|
||||||
using Get_Weapon_Data_Type = void*(__thiscall*)(void* Weapon);
|
|
||||||
|
|
||||||
void* Weapon_Data = Get_Weapon_Data_Type((unsigned __int32)Client_Module + 86432)(Weapon);
|
|
||||||
|
|
||||||
__int8 Is_Melee = *(__int32*)((unsigned __int32)Weapon_Data + 352) * (*(__int32*)((unsigned __int32)Weapon_Data + 348) ^ 1) <= 1;
|
|
||||||
|
|
||||||
__int8 Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time) * (*(__int32*)((unsigned __int32)Weapon + 2436) > 0 - Is_Melee * 2) * (Reloading ^ 1) * (*(float*)((unsigned __int32)Local_Player + 3872) <= Global_Variables->Current_Time);
|
|
||||||
|
|
||||||
__int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
|
||||||
|
|
||||||
__int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
|
|
||||||
|
|
||||||
using Get_Eye_Position_Type = void(__thiscall*)(void* Entity, float* Eye_Position);
|
using Get_Eye_Position_Type = void(__thiscall*)(void* Entity, float* Eye_Position);
|
||||||
|
|
||||||
float Eye_Position[3];
|
float Eye_Position[3];
|
||||||
|
|
||||||
Get_Eye_Position_Type((unsigned __int32)Client_Module + 108512)(Local_Player, Eye_Position);
|
Get_Eye_Position_Type((unsigned __int32)Client_Module + 108512)(Local_Player, Eye_Position);
|
||||||
|
|
||||||
__int8 Cancelable_Shove = 1 + (*(float*)((unsigned __int32)Local_Player + 7336) < Global_Variables->Current_Time);
|
|
||||||
|
|
||||||
Target_Structure* Shove_Target = nullptr;
|
Target_Structure* Shove_Target = nullptr;
|
||||||
|
|
||||||
if (Cancelable_Shove + (*(float*)((unsigned __int32)Weapon + 2400) == *(float*)((unsigned __int32)Weapon + 2404)) > 1)
|
if (Cancelable_Shove + In_Shove > 1)
|
||||||
{
|
{
|
||||||
using Get_Sequence_Duration_Type = float(__thiscall*)(void* Entity, void* Studio_Header, __int32 Sequence);
|
if (*(__int8*)((unsigned __int32)Local_Player + 8070) * (Weapon_Identifier == 231) == 0)
|
||||||
|
|
||||||
using Select_Sequence_Type = __int32(__thiscall*)(void* Entity, __int32 Activity);
|
|
||||||
|
|
||||||
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon);
|
|
||||||
|
|
||||||
using Translate_Activity_Type = __int32(__thiscall**)(void* Weapon, __int32 Activity);
|
|
||||||
|
|
||||||
__int8 Holstering = (min(*(float*)((unsigned __int32)Local_Player + 3872), *(float*)((unsigned __int32)Weapon + 2412)) + Get_Sequence_Duration_Type((unsigned __int32)Client_Module + 180400)(Weapon, Get_Studio_Header(Weapon), Select_Sequence_Type((unsigned __int32)Client_Module + 202896)(Weapon, (*Translate_Activity_Type(*(unsigned __int32*)Weapon + 1692))(Weapon, (*Get_Deploy_Activity_Type(*(unsigned __int32*)Weapon + 1600))(Weapon)))) > Global_Variables->Current_Time) * (Can_Attack ^ 1);
|
|
||||||
|
|
||||||
__int8 Is_Cold_Melee = Weapon_Identifier == 231;
|
|
||||||
|
|
||||||
Shove_Traverse_Sorted_Target_List_Label:
|
|
||||||
{
|
{
|
||||||
if (Target_Number != Sorted_Target_List.size())
|
if (Interface_Shotgun_Shove.Integer == 1)
|
||||||
{
|
{
|
||||||
Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
|
if ((Weapon_Identifier - 148) % 14 == 0)
|
||||||
|
|
||||||
__int8 Forced = 0;
|
|
||||||
|
|
||||||
if ((Reloading + Holstering + Is_Melee * (Weapon_Identifier * (Command->Buttons & 1) != 39)) * (Action + Reviving ^ 1) != 0)
|
|
||||||
{
|
{
|
||||||
if ((Target->Identifier ^ 72) % 348 >= 72)
|
if ((void*)((unsigned __int32)Weapon + Ammo) == Predicted_Shot)
|
||||||
{
|
{
|
||||||
Forced = 1;
|
Predicted_Shot = nullptr;
|
||||||
|
|
||||||
goto Shove_Label;
|
Command->Buttons |= 2048;
|
||||||
|
|
||||||
|
Block_Buttons = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (((270 - Is_Cold_Melee - (*(__int8*)((unsigned __int32)Local_Player + 8070) ^ 1) - Target->Identifier) ^ Target->Identifier - 263) > 0)
|
__int8 Is_Chainsaw = Weapon_Identifier == 39;
|
||||||
|
|
||||||
|
__int8 Holstering = 0;
|
||||||
|
|
||||||
|
if (Is_Chainsaw == 0)
|
||||||
|
{
|
||||||
|
using Get_Sequence_Duration_Type = float(__thiscall*)(void* Entity, void* Studio_Header, __int32 Sequence);
|
||||||
|
|
||||||
|
using Select_Sequence_Type = __int32(__thiscall*)(void* Entity, __int32 Activity);
|
||||||
|
|
||||||
|
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon);
|
||||||
|
|
||||||
|
using Translate_Activity_Type = __int32(__thiscall**)(void* Weapon, __int32 Activity);
|
||||||
|
|
||||||
|
Holstering = (min(*(float*)((unsigned __int32)Local_Player + 3872), *(float*)((unsigned __int32)Weapon + 2412)) + Get_Sequence_Duration_Type((unsigned __int32)Client_Module + 180400)(Weapon, Get_Studio_Header(Weapon), Select_Sequence_Type((unsigned __int32)Client_Module + 202896)(Weapon, (*Translate_Activity_Type(*(unsigned __int32*)Weapon + 1692))(Weapon, (*Get_Deploy_Activity_Type(*(unsigned __int32*)Weapon + 1600))(Weapon)))) > Global_Variables->Current_Time) * (Can_Attack ^ 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Is_Chainsaw = Can_Attack * (Command->Buttons & 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shove_Traverse_Sorted_Target_List_Label:
|
||||||
|
{
|
||||||
|
if (Target_Number != Sorted_Target_List.size())
|
||||||
{
|
{
|
||||||
Shove_Label:
|
Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
|
||||||
|
|
||||||
|
__int8 Forced = 0;
|
||||||
|
|
||||||
|
if (((Command->Buttons & 2048) + Reloading + Holstering + Is_Melee * (Is_Chainsaw ^ 1)) * (Action + Reviving ^ 1) != 0)
|
||||||
{
|
{
|
||||||
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
if ((Target->Identifier ^ 72) % 348 >= 72)
|
||||||
|
|
||||||
__int32 Gender = *(__int32*)((unsigned __int32)Target->Self + 52);
|
|
||||||
|
|
||||||
if ((Infected ^ 1) + (Gender == 15) != 0)
|
|
||||||
{
|
{
|
||||||
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
Forced = 1;
|
||||||
|
|
||||||
if (__builtin_strstr(Get_Sequence_Name_Type((unsigned __int32)Client_Module + 203392)(Target->Self, *(__int32*)((unsigned __int32)Target->Self + 2212)), "hove") == nullptr)
|
goto Shove_Label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((270 - Target->Identifier ^ Target->Identifier - 263) >= 0)
|
||||||
|
{
|
||||||
|
Shove_Label:
|
||||||
|
{
|
||||||
|
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
||||||
|
|
||||||
|
__int32 Gender = *(__int32*)((unsigned __int32)Target->Self + 52);
|
||||||
|
|
||||||
|
if ((Infected ^ 1) + (Gender == 15) != 0)
|
||||||
{
|
{
|
||||||
using Perform_Shove_Trace = __int8(__thiscall*)(void* Weapon, float* Direction);
|
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
||||||
|
|
||||||
float* Target_Origin = Get_Center(Target->Self);
|
if (__builtin_strstr(Get_Sequence_Name_Type((unsigned __int32)Client_Module + 203392)(Target->Self, *(__int32*)((unsigned __int32)Target->Self + 2212)), "hove") == nullptr)
|
||||||
|
|
||||||
float Direction[3] =
|
|
||||||
{
|
{
|
||||||
Target_Origin[0] - Eye_Position[0],
|
using Perform_Shove_Trace = __int8(__thiscall*)(void* Weapon, float* Direction);
|
||||||
|
|
||||||
Target_Origin[1] - Eye_Position[1],
|
float* Target_Origin = Get_Center(Target->Self);
|
||||||
|
|
||||||
Target_Origin[2] - Eye_Position[2]
|
float Direction[3] =
|
||||||
};
|
|
||||||
|
|
||||||
Vector_Normalize(Direction);
|
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Weapon + 2724) = 75.f;
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Weapon + 3248) = 0;
|
|
||||||
|
|
||||||
Perform_Trace_Target = Target->Self;
|
|
||||||
|
|
||||||
Perform_Trace_Damage = 0.f;
|
|
||||||
|
|
||||||
Perform_Shove_Trace((unsigned __int32)Client_Module + 3220512)(Weapon, Direction);
|
|
||||||
|
|
||||||
Perform_Trace_Target = nullptr;
|
|
||||||
|
|
||||||
if (Perform_Trace_Damage == 1.f)
|
|
||||||
{
|
|
||||||
if (Action == 0)
|
|
||||||
{
|
{
|
||||||
Command->Tick_Number = Target->Tick_Number;
|
Target_Origin[0] - Eye_Position[0],
|
||||||
|
|
||||||
Command->Angles[0] = __builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f;
|
Target_Origin[1] - Eye_Position[1],
|
||||||
|
|
||||||
Command->Angles[1] = __builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f;
|
Target_Origin[2] - Eye_Position[2]
|
||||||
|
};
|
||||||
|
|
||||||
if (Cancelable_Shove == 1)
|
Vector_Normalize(Direction);
|
||||||
|
|
||||||
|
*(float*)((unsigned __int32)Weapon + 2724) = 75.f;
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Weapon + 3248) = 0;
|
||||||
|
|
||||||
|
Perform_Trace_Target = Target->Self;
|
||||||
|
|
||||||
|
Perform_Trace_Damage = 0.f;
|
||||||
|
|
||||||
|
Perform_Shove_Trace((unsigned __int32)Client_Module + 3220512)(Weapon, Direction);
|
||||||
|
|
||||||
|
Perform_Trace_Target = nullptr;
|
||||||
|
|
||||||
|
if (Perform_Trace_Damage == 1.f)
|
||||||
|
{
|
||||||
|
if (Action == 0)
|
||||||
{
|
{
|
||||||
float Shove_Multiplier = min((Global_Variables->Current_Time - *(float*)((unsigned __int32)Weapon + 2704) + *(float*)((unsigned __int32)Weapon + 2700)) / *(float*)((unsigned __int32)Weapon + 2700), 1.f);
|
Command->Tick_Number = Target->Tick_Number;
|
||||||
|
|
||||||
Command->Angles[1] += -45.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier);
|
Command->Angles[0] = __builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f;
|
||||||
}
|
|
||||||
else
|
Command->Angles[1] = __builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f;
|
||||||
{
|
|
||||||
Command->Angles[1] += 45.f;
|
if (Cancelable_Shove == 1)
|
||||||
|
{
|
||||||
|
float Shove_Multiplier = min((Global_Variables->Current_Time - *(float*)((unsigned __int32)Weapon + 2704) + *(float*)((unsigned __int32)Weapon + 2700)) / *(float*)((unsigned __int32)Weapon + 2700), 1.f);
|
||||||
|
|
||||||
|
Command->Angles[1] += -45.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Command->Angles[1] += 45.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
Command->Buttons |= 2048;
|
||||||
|
|
||||||
|
Block_Buttons = 1;
|
||||||
|
|
||||||
|
Cancelable_Shove = (Gender * Interface_Riot_Deprioritize.Integer * (Forced ^ 1)) == 15;
|
||||||
|
|
||||||
|
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
||||||
|
|
||||||
|
goto Shove_Found_Target_Label;
|
||||||
}
|
}
|
||||||
|
|
||||||
Command->Buttons |= 2048;
|
Cancelable_Shove = 0;
|
||||||
|
|
||||||
Block_Buttons = 1;
|
|
||||||
|
|
||||||
Cancelable_Shove = (Gender * Interface_Riot_Deprioritize.Integer * (Forced ^ 1)) == 15;
|
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
|
||||||
|
|
||||||
goto Shove_Found_Target_Label;
|
goto Shove_Found_Target_Label;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cancelable_Shove = 0;
|
|
||||||
|
|
||||||
goto Shove_Found_Target_Label;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Target_Number += 1;
|
Target_Number += 1;
|
||||||
|
|
||||||
goto Shove_Traverse_Sorted_Target_List_Label;
|
goto Shove_Traverse_Sorted_Target_List_Label;
|
||||||
|
|
||||||
Shove_Found_Target_Label:
|
Shove_Found_Target_Label:
|
||||||
{
|
{
|
||||||
Shove_Target = Target;
|
Shove_Target = Target;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -540,7 +662,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
if (Cancelable_Shove != 0)
|
if (Cancelable_Shove != 0)
|
||||||
{
|
{
|
||||||
if (Reviving + (Weapon_Identifier == 96) + (Can_Attack ^ 1) == 0)
|
if (Reviving + (Can_Attack ^ 1) == 0)
|
||||||
{
|
{
|
||||||
Target_Structure* Aim_Target = nullptr;
|
Target_Structure* Aim_Target = nullptr;
|
||||||
|
|
||||||
@ -566,12 +688,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (Weapon_Identifier == 153)
|
if (Weapon_Identifier == 153)
|
||||||
{
|
{
|
||||||
if (*(double*)((unsigned __int32)Weapon + 3392) != 0.)
|
Compensate_Burst = *(double*)((unsigned __int32)Weapon + 3392) != 0.;
|
||||||
{
|
|
||||||
Compensate_Burst = 1;
|
|
||||||
|
|
||||||
Command->Buttons |= 1;
|
Command->Buttons |= Compensate_Burst;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -776,6 +895,8 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
Command->Angles[2] -= Recoil[2];
|
Command->Angles[2] -= Recoil[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Predicted_Shot = (void*)((unsigned __int32)Weapon + Ammo - 1);
|
||||||
|
|
||||||
Block_Buttons = 2048;
|
Block_Buttons = 2048;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -796,7 +917,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Correct_Movement();
|
Correct_Movement();
|
||||||
|
|
||||||
*(__int8*)((unsigned __int32)__builtin_frame_address(0) + 235) = Extra_Commands <= 0;
|
*(__int8*)((unsigned __int32)__builtin_frame_address(0) + 235) = max(Extra_Commands <= 0, *(__int32*)((unsigned __int32)Network_Channel + 16) == -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
_putws(L"[ + ] Animations");
|
_putws(L"[ + ] Animations");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 205296), (void*)Redirected_Update_Animations);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 205296), (void*)Redirected_Update_Animations);
|
||||||
|
|
||||||
Original_Estimate_Velocity_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 311856), (void*)Redirected_Estimate_Velocity);
|
Original_Estimate_Velocity_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 311856), (void*)Redirected_Estimate_Velocity);
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
Original_Perform_Shove_Trace_Caller = (void*)((unsigned __int32)Client_Module + 3221111);
|
Original_Perform_Shove_Trace_Caller = (void*)((unsigned __int32)Client_Module + 3221111);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 3221102), (void*)Redirected_Perform_Shove_Trace);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 3221102), (void*)Redirected_Perform_Shove_Trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Network");
|
_putws(L"[ + ] Network");
|
||||||
@ -256,7 +256,7 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
Original_Move_Caller = Redirection_Manager::Redirect_Function(3, (void*)((unsigned __int32)Engine_Module + 512288), (void*)Redirected_Move);
|
Original_Move_Caller = Redirection_Manager::Redirect_Function(3, (void*)((unsigned __int32)Engine_Module + 512288), (void*)Redirected_Move);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Engine_Module + 511680), (void*)Redirected_Send_Move);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Engine_Module + 511680), (void*)Redirected_Send_Move);
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Input");
|
_putws(L"[ + ] Input");
|
||||||
@ -289,17 +289,17 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
{
|
{
|
||||||
Original_Write_Texture_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)GetModuleHandleW(L"vguimatsurface.dll") + 100592), (void*)Redirected_Write_Texture);
|
Original_Write_Texture_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)GetModuleHandleW(L"vguimatsurface.dll") + 100592), (void*)Redirected_Write_Texture);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 2913504), (void*)Redirected_Paint);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 2913504), (void*)Redirected_Paint);
|
||||||
|
|
||||||
Original_Get_Glow_Color_Caller = Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 2455600), (void*)Redirected_Get_Glow_Color);
|
Original_Get_Glow_Color_Caller = Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 2455600), (void*)Redirected_Get_Glow_Color);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 3244715), 1, 49);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 3244715), 1, 49);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 2301184), (void*)Redirected_Draw_Crosshair);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 2301184), (void*)Redirected_Draw_Crosshair);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2930985), 1, 235);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2930985), 1, 235);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 3118720), (void*)Redirected_Draw_Crosshair);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 3118720), (void*)Redirected_Draw_Crosshair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,32 +9,7 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
|||||||
return Identifier;
|
return Identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::unordered_set<__int32> Targets =
|
static std::unordered_set<__int32> Targets = { 0, 13, 99, 232, 263, 264, 265, 270, 272, 275, 276, 277 };
|
||||||
{
|
|
||||||
0,
|
|
||||||
|
|
||||||
13,
|
|
||||||
|
|
||||||
99,
|
|
||||||
|
|
||||||
232,
|
|
||||||
|
|
||||||
263,
|
|
||||||
|
|
||||||
264,
|
|
||||||
|
|
||||||
265,
|
|
||||||
|
|
||||||
270,
|
|
||||||
|
|
||||||
272,
|
|
||||||
|
|
||||||
275,
|
|
||||||
|
|
||||||
276,
|
|
||||||
|
|
||||||
277
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Targets.contains(Identifier) == 1)
|
if (Targets.contains(Identifier) == 1)
|
||||||
{
|
{
|
||||||
@ -93,20 +68,7 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
|||||||
{
|
{
|
||||||
if (Equipment == 1)
|
if (Equipment == 1)
|
||||||
{
|
{
|
||||||
static std::unordered_set<__int32> Equipment_List =
|
static std::unordered_set<__int32> Equipment_List = { 73, 105, 109, 121, 256, 260 };
|
||||||
{
|
|
||||||
73,
|
|
||||||
|
|
||||||
105,
|
|
||||||
|
|
||||||
109,
|
|
||||||
|
|
||||||
121,
|
|
||||||
|
|
||||||
256,
|
|
||||||
|
|
||||||
260
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Equipment_List.contains(Identifier) == 1)
|
if (Equipment_List.contains(Identifier) == 1)
|
||||||
{
|
{
|
||||||
@ -144,12 +106,7 @@ void* Original_Estimate_Velocity_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Estimate_Velocity(void* Entity, float* Velocity)
|
void __thiscall Redirected_Estimate_Velocity(void* Entity, float* Velocity)
|
||||||
{
|
{
|
||||||
static std::unordered_set<__int32> Invalids =
|
static std::unordered_set<__int32> Invalids = { 264, 277 };
|
||||||
{
|
|
||||||
264,
|
|
||||||
|
|
||||||
277
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Invalids.contains(Get_Identifier(Entity, 1, 0)) == 1)
|
if (Invalids.contains(Get_Identifier(Entity, 1, 0)) == 1)
|
||||||
{
|
{
|
||||||
@ -161,10 +118,6 @@ void __thiscall Redirected_Estimate_Velocity(void* Entity, float* Velocity)
|
|||||||
|
|
||||||
Calculate_Velocity_Type((unsigned __int32)Client_Module + 290704)(Entity);
|
Calculate_Velocity_Type((unsigned __int32)Client_Module + 290704)(Entity);
|
||||||
|
|
||||||
Velocity[0] = *(float*)((unsigned __int32)Entity + 136);
|
Byte_Manager::Copy_Bytes(1, Velocity, sizeof(float[3]), (float*)((unsigned __int32)Entity + 136));
|
||||||
|
|
||||||
Velocity[1] = *(float*)((unsigned __int32)Entity + 140);
|
|
||||||
|
|
||||||
Velocity[2] = *(float*)((unsigned __int32)Entity + 144);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,10 +11,14 @@ struct Interface_Structure
|
|||||||
|
|
||||||
Interface_Structure Interface_Extra_Commands;
|
Interface_Structure Interface_Extra_Commands;
|
||||||
|
|
||||||
|
Interface_Structure Interface_Extra_Commands_Action;
|
||||||
|
|
||||||
Interface_Structure Interface_Interpolate_Extra_Commands;
|
Interface_Structure Interface_Interpolate_Extra_Commands;
|
||||||
|
|
||||||
Interface_Structure Interface_Target_On_Simulation;
|
Interface_Structure Interface_Target_On_Simulation;
|
||||||
|
|
||||||
|
Interface_Structure Interface_Shotgun_Shove;
|
||||||
|
|
||||||
Interface_Structure Interface_Riot_Deprioritize;
|
Interface_Structure Interface_Riot_Deprioritize;
|
||||||
|
|
||||||
Interface_Structure Interface_Penetrate_Teammates;
|
Interface_Structure Interface_Penetrate_Teammates;
|
||||||
@ -52,10 +56,14 @@ void Implement_Extended_Interface()
|
|||||||
|
|
||||||
Create_Interface(Pointer_Name(Interface_Extra_Commands), (char*)"5", nullptr);
|
Create_Interface(Pointer_Name(Interface_Extra_Commands), (char*)"5", nullptr);
|
||||||
|
|
||||||
|
Create_Interface(Pointer_Name(Interface_Extra_Commands_Action), (char*)"10", nullptr);
|
||||||
|
|
||||||
Create_Interface(Pointer_Name(Interface_Interpolate_Extra_Commands), (char*)"1", nullptr);
|
Create_Interface(Pointer_Name(Interface_Interpolate_Extra_Commands), (char*)"1", nullptr);
|
||||||
|
|
||||||
Create_Interface(Pointer_Name(Interface_Target_On_Simulation), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Target_On_Simulation), (char*)"0", nullptr);
|
||||||
|
|
||||||
|
Create_Interface(Pointer_Name(Interface_Shotgun_Shove), (char*)"1", nullptr);
|
||||||
|
|
||||||
Create_Interface(Pointer_Name(Interface_Riot_Deprioritize), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Riot_Deprioritize), (char*)"0", nullptr);
|
||||||
|
|
||||||
Create_Interface(Pointer_Name(Interface_Penetrate_Teammates), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Penetrate_Teammates), (char*)"0", nullptr);
|
||||||
|
17
Move.hpp
17
Move.hpp
@ -1,12 +1,16 @@
|
|||||||
__int32 Extra_Commands;
|
__int32 Extra_Commands;
|
||||||
|
|
||||||
|
__int32 Chainsaw_Cycles;
|
||||||
|
|
||||||
void* Original_Move_Caller;
|
void* Original_Move_Caller;
|
||||||
|
|
||||||
void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
||||||
{
|
{
|
||||||
|
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
||||||
|
|
||||||
using Run_Prediction_Type = void(__cdecl*)();
|
using Run_Prediction_Type = void(__cdecl*)();
|
||||||
|
|
||||||
if (*(void**)((unsigned __int32)Client_Module + 7498712) != nullptr)
|
if (Local_Player != nullptr)
|
||||||
{
|
{
|
||||||
Redirected_Read_Packets(Final);
|
Redirected_Read_Packets(Final);
|
||||||
|
|
||||||
@ -37,6 +41,17 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
|||||||
|
|
||||||
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
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)
|
if (Extra_Commands > 0)
|
||||||
{
|
{
|
||||||
Extra_Commands -= 1;
|
Extra_Commands -= 1;
|
||||||
|
42
Paint.hpp
42
Paint.hpp
@ -77,7 +77,7 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
{
|
{
|
||||||
Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
|
Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
|
||||||
|
|
||||||
float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff()};
|
float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff()};
|
||||||
|
|
||||||
auto Get_Bounds = [&]() -> __int8
|
auto Get_Bounds = [&]() -> __int8
|
||||||
{
|
{
|
||||||
@ -121,10 +121,10 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
Hitbox_Vertices[7][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Maximum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
Hitbox_Vertices[7][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Maximum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||||
|
|
||||||
if (Axis_Number != 2)
|
Axis_Number += 1;
|
||||||
{
|
|
||||||
Axis_Number += 1;
|
|
||||||
|
|
||||||
|
if (Axis_Number != sizeof(Hitbox_Vertices[0]) / sizeof(float))
|
||||||
|
{
|
||||||
goto Initialize_Vertices_Label;
|
goto Initialize_Vertices_Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -162,10 +162,10 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Vertex_Number != 7)
|
Vertex_Number += 1;
|
||||||
{
|
|
||||||
Vertex_Number += 1;
|
|
||||||
|
|
||||||
|
if (Vertex_Number != sizeof(Hitbox_Vertices) / sizeof(Hitbox_Vertices[0]))
|
||||||
|
{
|
||||||
goto Transform_Vertices_Label;
|
goto Transform_Vertices_Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,10 +252,23 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
Ghost = *(__int8*)((unsigned __int32)Target->Self + 7322);
|
Ghost = *(__int8*)((unsigned __int32)Target->Self + 7322);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Draw_Box = [&](__int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y)
|
auto Draw_Box = [&](__int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y) -> void
|
||||||
{
|
{
|
||||||
using Set_Color_Type = void(__thiscall**)(void* Surface, unsigned __int8 Red, unsigned __int8 Green, unsigned __int8 Blue, unsigned __int8 Alpha);
|
using Set_Color_Type = void(__thiscall**)(void* Surface, unsigned __int8 Red, unsigned __int8 Green, unsigned __int8 Blue, unsigned __int8 Alpha);
|
||||||
|
|
||||||
|
if (Ghost == 0)
|
||||||
|
{
|
||||||
|
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, (__int32)(Paint_Data->Color[0] / 2.f + 0.5f), (__int32)(Paint_Data->Color[1] / 2.f + 0.5f), (__int32)(Paint_Data->Color[2] / 2.f + 0.5f), 128);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, 64, 64, 64, 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
using Draw_Filled_Rect_Type = void(__thiscall**)(void* Surface, __int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y);
|
||||||
|
|
||||||
|
(*Draw_Filled_Rect_Type(*(unsigned __int32*)Surface + 48))(Surface, From_X + 2, From_Y + 2, To_X - 2, To_Y - 2);
|
||||||
|
|
||||||
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, 0, 0, 0, 255);
|
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, 0, 0, 0, 255);
|
||||||
|
|
||||||
using Draw_Rect_Type = void(__thiscall**)(void* Surface, __int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y);
|
using Draw_Rect_Type = void(__thiscall**)(void* Surface, __int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y);
|
||||||
@ -274,19 +287,6 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(*Draw_Rect_Type(*(unsigned __int32*)Surface + 56))(Surface, From_X, From_Y, To_X, To_Y);
|
(*Draw_Rect_Type(*(unsigned __int32*)Surface + 56))(Surface, From_X, From_Y, To_X, To_Y);
|
||||||
|
|
||||||
if (Ghost == 0)
|
|
||||||
{
|
|
||||||
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, (__int32)(Paint_Data->Color[0] / 2.f + 0.5f), (__int32)(Paint_Data->Color[1] / 2.f + 0.5f), (__int32)(Paint_Data->Color[2] / 2.f + 0.5f), 128);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
(*Set_Color_Type(*(unsigned __int32*)Surface + 44))(Surface, 64, 64, 64, 128);
|
|
||||||
}
|
|
||||||
|
|
||||||
using Draw_Filled_Rect_Type = void(__thiscall**)(void* Surface, __int32 From_X, __int32 From_Y, __int32 To_X, __int32 To_Y);
|
|
||||||
|
|
||||||
(*Draw_Filled_Rect_Type(*(unsigned __int32*)Surface + 48))(Surface, From_X + 2, From_Y + 2, To_X - 2, To_Y - 2);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Draw_Box(Bounds[0], Bounds[2], Bounds[1], Bounds[3]);
|
Draw_Box(Bounds[0], Bounds[2], Bounds[1], Bounds[3]);
|
||||||
|
@ -13,10 +13,13 @@ void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Playe
|
|||||||
|
|
||||||
(decltype(&Redirected_Process_Movement)(Original_Process_Movement_Caller))(Unknown_Parameter, Player, Move_Data);
|
(decltype(&Redirected_Process_Movement)(Original_Process_Movement_Caller))(Unknown_Parameter, Player, Move_Data);
|
||||||
|
|
||||||
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
|
if (Get_Identifier(Player, 0, 0) == 272)
|
||||||
|
|
||||||
if (Ability != nullptr)
|
|
||||||
{
|
{
|
||||||
*(float*)((unsigned __int32)Ability + 1636) = 0.f;
|
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
|
||||||
|
|
||||||
|
if (Ability != nullptr)
|
||||||
|
{
|
||||||
|
*(float*)((unsigned __int32)Ability + 1636) = 0.f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -62,7 +62,10 @@ void Redirected_Send_Move()
|
|||||||
|
|
||||||
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
|
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
if (*(__int32*)((unsigned __int32)Network_Channel + 16) != -1)
|
||||||
|
{
|
||||||
|
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
||||||
|
}
|
||||||
|
|
||||||
using Send_Message_Type = void(__thiscall**)(void* Network_Channel, void* Message, void* Unknown_Parameter_1, void* Unknown_Parameter_2);
|
using Send_Message_Type = void(__thiscall**)(void* Network_Channel, void* Message, void* Unknown_Parameter_1, void* Unknown_Parameter_2);
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
struct Global_Variables_Structure
|
struct Global_Variables_Structure
|
||||||
{
|
{
|
||||||
__int8 Additional_Bytes_1[12];
|
__int8 Additional_Bytes_1[12];
|
||||||
|
|
||||||
float Current_Time;
|
float Current_Time;
|
||||||
|
|
||||||
float Frame_Time;
|
float Frame_Time;
|
||||||
|
|
||||||
__int8 Additional_Bytes_2[8];
|
__int8 Additional_Bytes_2[8];
|
||||||
|
|
||||||
float Interval_Per_Tick;
|
float Interval_Per_Tick;
|
||||||
};
|
};
|
||||||
|
|
||||||
float Update_Animation_Time;
|
float Update_Animation_Time;
|
||||||
@ -17,42 +17,42 @@ __int8 Update_Animation_Type;
|
|||||||
|
|
||||||
void Redirected_Update_Animations()
|
void Redirected_Update_Animations()
|
||||||
{
|
{
|
||||||
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
||||||
|
|
||||||
float Previous_Current_Time = Global_Variables->Current_Time;
|
float Previous_Current_Time = Global_Variables->Current_Time;
|
||||||
|
|
||||||
Global_Variables->Current_Time = Update_Animation_Time;
|
Global_Variables->Current_Time = Update_Animation_Time;
|
||||||
|
|
||||||
float Previous_Frame_Time = Global_Variables->Frame_Time;
|
float Previous_Frame_Time = Global_Variables->Frame_Time;
|
||||||
|
|
||||||
Global_Variables->Frame_Time = Global_Variables->Interval_Per_Tick * Update_Animation_Type;
|
Global_Variables->Frame_Time = Global_Variables->Interval_Per_Tick * Update_Animation_Type;
|
||||||
|
|
||||||
__int32 Entity_Number = 0;
|
__int32 Entity_Number = 0;
|
||||||
|
|
||||||
Traverse_Animation_List_Label:
|
Traverse_Animation_List_Label:
|
||||||
{
|
{
|
||||||
if (Entity_Number != *(__int32*)((unsigned __int32)Client_Module + 7479624))
|
if (Entity_Number != *(__int32*)((unsigned __int32)Client_Module + 7479624))
|
||||||
{
|
{
|
||||||
void* Animation_List = *(void**)((unsigned __int32)Client_Module + 7479612);
|
void* Animation_List = *(void**)((unsigned __int32)Client_Module + 7479612);
|
||||||
|
|
||||||
if ((*(__int8*)((unsigned __int32)Animation_List + 8 * Entity_Number + 4) & 1) != 0)
|
if ((*(__int8*)((unsigned __int32)Animation_List + 8 * Entity_Number + 4) & 1) != 0)
|
||||||
{
|
{
|
||||||
using Update_Animation_Type = void(__thiscall**)(void* Entity);
|
using Update_Animation_Type = void(__thiscall**)(void* Entity);
|
||||||
|
|
||||||
void* Entity = *(void**)((unsigned __int32)Animation_List + 8 * Entity_Number);
|
void* Entity = *(void**)((unsigned __int32)Animation_List + 8 * Entity_Number);
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Entity + 328) = Update_Animation_Time - Global_Variables->Frame_Time;
|
*(float*)((unsigned __int32)Entity + 328) = Update_Animation_Time - Global_Variables->Frame_Time;
|
||||||
|
|
||||||
(*Update_Animation_Type(*(unsigned __int32*)Entity + 808))(Entity);
|
(*Update_Animation_Type(*(unsigned __int32*)Entity + 808))(Entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity_Number += 1;
|
Entity_Number += 1;
|
||||||
|
|
||||||
goto Traverse_Animation_List_Label;
|
goto Traverse_Animation_List_Label;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Global_Variables->Frame_Time = Previous_Frame_Time;
|
Global_Variables->Frame_Time = Previous_Frame_Time;
|
||||||
|
|
||||||
Global_Variables->Current_Time = Previous_Current_Time;
|
Global_Variables->Current_Time = Previous_Current_Time;
|
||||||
}
|
}
|
@ -14,10 +14,10 @@ void __thiscall Redirected_Write_Texture(void* Unknown_Parameter_1, void* Unknow
|
|||||||
|
|
||||||
unsigned __int32 Offset_X = Width;
|
unsigned __int32 Offset_X = Width;
|
||||||
|
|
||||||
unsigned __int32 Offset_Y = Height;
|
|
||||||
|
|
||||||
unsigned __int32 Character_Width = 0;
|
unsigned __int32 Character_Width = 0;
|
||||||
|
|
||||||
|
unsigned __int32 Offset_Y = Height;
|
||||||
|
|
||||||
unsigned __int32 Character_Height = 0;
|
unsigned __int32 Character_Height = 0;
|
||||||
|
|
||||||
Traverse_Horizontal_Label:
|
Traverse_Horizontal_Label:
|
||||||
@ -28,11 +28,11 @@ void __thiscall Redirected_Write_Texture(void* Unknown_Parameter_1, void* Unknow
|
|||||||
{
|
{
|
||||||
if (*(unsigned __int32*)((unsigned __int32)Texture + X * 4 + Y * 4 * Width) != 0)
|
if (*(unsigned __int32*)((unsigned __int32)Texture + X * 4 + Y * 4 * Width) != 0)
|
||||||
{
|
{
|
||||||
Offset_X = min(Offset_X, X);
|
Offset_X = min(X, Offset_X);
|
||||||
|
|
||||||
Character_Width = max(Character_Width, X + 1);
|
Character_Width = max(Character_Width, X + 1);
|
||||||
|
|
||||||
Offset_Y = min(Offset_Y, Y);
|
Offset_Y = min(Y, Offset_Y);
|
||||||
|
|
||||||
Character_Height = max(Character_Height, Y + 1);
|
Character_Height = max(Character_Height, Y + 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user