mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-09-19 20:16:15 +08:00
Compare commits
46 Commits
15.10.2024
...
04.02.2025
Author | SHA1 | Date | |
---|---|---|---|
1136c1d430 | |||
31043114f0 | |||
1fc61ba184 | |||
359928047c | |||
631d1e1358 | |||
d5a3de9a21 | |||
0b54788d15 | |||
d12933fe27 | |||
f819000cfe | |||
a402400c01 | |||
519d56c138 | |||
f5fb3e4d30 | |||
81feda0668 | |||
61f5cad124 | |||
8496bfcbeb | |||
7b440b4004 | |||
7c6d951aee | |||
e2437349a0 | |||
0381620f7d | |||
309a0f2c27 | |||
6026914241 | |||
9efc44f17e | |||
02e94e451c | |||
5d9ab0c46b | |||
6768e29ea6 | |||
485ff54642 | |||
bd318c5576 | |||
82e3a8fd55 | |||
bdf8f51f29 | |||
e462dff4f5 | |||
2dc81b9839 | |||
6554d9e04e | |||
68cc187ac7 | |||
bc24cea3b5 | |||
5a7e62dd6f | |||
5420ace13d | |||
08820dca32 | |||
338a781f22 | |||
f26e099d55 | |||
924e32b297 | |||
cd2b23d069 | |||
83ad090b63 | |||
d9bf5dea6d | |||
2028a2886b | |||
1af4705b49 | |||
d174b651c9 |
@ -1,6 +1,38 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
namespace Byte_Manager
|
namespace Byte_Manager
|
||||||
{
|
{
|
||||||
#include "Byte_Manager_Functions.hpp"
|
void Set_Bytes(__int8 Writeable, void* Address, unsigned __int32 Size, unsigned __int8 Byte)
|
||||||
|
{
|
||||||
|
if (Writeable == 0)
|
||||||
|
{
|
||||||
|
DWORD Previous_Access_Rights;
|
||||||
|
|
||||||
|
VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
||||||
|
|
||||||
|
__builtin_memset(Address, Byte, Size);
|
||||||
|
|
||||||
|
VirtualProtect(Address, Size, Previous_Access_Rights, &Previous_Access_Rights);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
__builtin_memset(Address, Byte, Size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Copy_Bytes(__int8 Writeable, void* Address, unsigned __int32 Size, void* Bytes)
|
||||||
|
{
|
||||||
|
if (Writeable == 0)
|
||||||
|
{
|
||||||
|
DWORD Previous_Access_Rights;
|
||||||
|
|
||||||
|
VirtualProtect(Address, Size, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
||||||
|
|
||||||
|
__builtin_memcpy(Address, Bytes, Size);
|
||||||
|
|
||||||
|
VirtualProtect(Address, Size, Previous_Access_Rights, &Previous_Access_Rights);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
__builtin_memcpy(Address, Bytes, Size);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
void Copy_Bytes(__int8 Modify_Access_Rights, void* Starting_Location, unsigned __int32 Bytes_Amount, void* Bytes)
|
|
||||||
#else
|
|
||||||
void Copy_Bytes(__int8 Modify_Access_Rights, void* Starting_Location, unsigned __int64 Bytes_Amount, void* Bytes)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Starting_Location, Bytes_Amount, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
|
|
||||||
__builtin_memcpy(Starting_Location, Bytes, Bytes_Amount);
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Starting_Location, Bytes_Amount, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
void* Find_Bytes(void* Starting_Location, void* Bytes, unsigned __int32 Bytes_Amount)
|
|
||||||
#else
|
|
||||||
void* Find_Bytes(void* Starting_Location, void* Bytes, unsigned __int64 Bytes_Amount)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
Compare_Bytes_Label:
|
|
||||||
{
|
|
||||||
if (__builtin_memcmp(Starting_Location, Bytes, Bytes_Amount) == 0)
|
|
||||||
{
|
|
||||||
return Starting_Location;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
Starting_Location = (void*)((unsigned __int32)Starting_Location + 1);
|
|
||||||
#else
|
|
||||||
Starting_Location = (void*)((unsigned __int64)Starting_Location + 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
goto Compare_Bytes_Label;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Byte_Manager_Find_Bytes.hpp"
|
|
||||||
|
|
||||||
#include "Byte_Manager_Set_Bytes.hpp"
|
|
||||||
|
|
||||||
#include "Byte_Manager_Copy_Bytes.hpp"
|
|
@ -1,22 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
void Set_Bytes(__int8 Modify_Access_Rights, void* Starting_Location, unsigned __int32 Bytes_Amount, unsigned __int8 Byte)
|
|
||||||
#else
|
|
||||||
void Set_Bytes(__int8 Modify_Access_Rights, void* Starting_Location, unsigned __int64 Bytes_Amount, unsigned __int8 Byte)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Starting_Location, Bytes_Amount, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
|
|
||||||
__builtin_memset(Starting_Location, Byte, Bytes_Amount);
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Starting_Location, Bytes_Amount, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,5 +6,5 @@ void __thiscall Redirected_Calculate_View(void* Player, void* Unknown_Parameter_
|
|||||||
|
|
||||||
using Get_Eye_Angles_Type = float*(__thiscall*)(void* Entity);
|
using Get_Eye_Angles_Type = float*(__thiscall*)(void* Entity);
|
||||||
|
|
||||||
Byte_Manager::Copy_Bytes(0, Angles, sizeof(float[3]), Get_Eye_Angles_Type((unsigned __int32)Client_Module + 2237296)(Player));
|
Byte_Manager::Copy_Bytes(1, Angles, sizeof(float[3]), Get_Eye_Angles_Type((unsigned __int32)Client_Module + 2237296)(Player));
|
||||||
}
|
}
|
397
Copy_Command.hpp
397
Copy_Command.hpp
@ -13,15 +13,20 @@ struct Target_Structure
|
|||||||
|
|
||||||
std::vector<Target_Structure> Sorted_Target_List;
|
std::vector<Target_Structure> Sorted_Target_List;
|
||||||
|
|
||||||
|
void* Get_Studio_Header(void* Entity)
|
||||||
|
{
|
||||||
|
using Get_Studio_Header_Type = void*(__thiscall*)(void* Entity);
|
||||||
|
|
||||||
|
return Get_Studio_Header_Type((unsigned __int32)Client_Module + 8512)(Entity);
|
||||||
|
}
|
||||||
|
|
||||||
void* Get_Hitbox_Set(Target_Structure* Target, float(*Bones)[3][4], float Time)
|
void* Get_Hitbox_Set(Target_Structure* Target, float(*Bones)[3][4], float Time)
|
||||||
{
|
{
|
||||||
using Setup_Bones_Type = __int8(__thiscall*)(void* Entity, void* Bones, __int32 Maximum_Bones, __int32 Mask, float Current_Time);
|
using Setup_Bones_Type = __int8(__thiscall*)(void* Entity, void* Bones, __int32 Maximum_Bones, __int32 Mask, float Current_Time);
|
||||||
|
|
||||||
if (Setup_Bones_Type((unsigned __int32)Client_Module + 246656)((void*)((unsigned __int32)Target->Self + 4), Bones, 128, 524032, Time) == 1)
|
if (Setup_Bones_Type((unsigned __int32)Client_Module + 246656)((void*)((unsigned __int32)Target->Self + 4), Bones, 128, 524032, Time) == 1)
|
||||||
{
|
{
|
||||||
using Get_Studio_Header_Type = void*(__thiscall*)(void* Entity);
|
void* Studio_Header = *(void**)Get_Studio_Header(Target->Self);
|
||||||
|
|
||||||
void* Studio_Header = *(void**)Get_Studio_Header_Type((unsigned __int32)Client_Module + 8512)(Target->Self);
|
|
||||||
|
|
||||||
return (void*)((unsigned __int32)Studio_Header + *(__int32*)((unsigned __int32)Studio_Header + 176));
|
return (void*)((unsigned __int32)Studio_Header + *(__int32*)((unsigned __int32)Studio_Header + 176));
|
||||||
}
|
}
|
||||||
@ -33,75 +38,89 @@ void* Original_Copy_Command_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structure* Command)
|
void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structure* Command)
|
||||||
{
|
{
|
||||||
Command->Frame_Number = Command->Command_Number % 150;
|
Extended_Command_Structure* Extended_Command = &Extended_Commands[Command->Command_Number % 150];
|
||||||
|
|
||||||
Extended_Command_Structure* Extended_Command = &Extended_Commands[Command->Frame_Number];
|
|
||||||
|
|
||||||
Extended_Command->Extra_Commands = 0;
|
Extended_Command->Extra_Commands = 0;
|
||||||
|
|
||||||
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
Extended_Command->Sequence_Shift = 0;
|
||||||
|
|
||||||
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
||||||
|
|
||||||
|
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
||||||
|
|
||||||
if (Extra_Commands == -1)
|
if (Extra_Commands == -1)
|
||||||
{
|
{
|
||||||
|
*(float*)((unsigned __int32)Local_Player + 16) = Global_Variables->Interval_Per_Tick;
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Local_Player + 20) = Command->Command_Number;
|
||||||
|
|
||||||
if ((Command->Buttons & 524288) == 524288)
|
if ((Command->Buttons & 524288) == 524288)
|
||||||
{
|
{
|
||||||
Extended_Command->Extra_Commands = max(0, Extra_Commands = std::clamp(Interface_Extra_Commands.Integer, (__int32)(0.06f / Global_Variables->Interval_Per_Tick + 0.5f), 21));
|
Extended_Command->Extra_Commands = max(0, Extra_Commands = std::clamp(Interface_Extra_Commands.Integer, (__int32)(0.06f / Global_Variables->Interval_Per_Tick + 0.5f), 14));
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 16) = min(*(__int32*)((unsigned __int32)Local_Player + 16) + 1, Extended_Command->Extra_Commands * Interface_Interpolate_Extra_Commands.Integer);
|
*(float*)((unsigned __int32)Local_Player + 16) *= 1.f + Extended_Command->Extra_Commands * Interface_Interpolate_Extra_Commands.Integer;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
__int32 Variable_Number = 0;
|
||||||
|
|
||||||
|
Traverse_Variables_Label:
|
||||||
{
|
{
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 16) = max(0, *(__int32*)((unsigned __int32)Local_Player + 16) - 1);
|
void* Variable = *(void**)(*(unsigned __int32*)((unsigned __int32)Local_Player + 24) + Variable_Number * 12 + 8);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 20) = 0;
|
*(float*)((unsigned __int32)Variable + 36) = *(float*)((unsigned __int32)Local_Player + 16);
|
||||||
|
|
||||||
|
Variable_Number += 1;
|
||||||
|
|
||||||
|
if (Variable_Number != *(__int32*)((unsigned __int32)Local_Player + 36))
|
||||||
|
{
|
||||||
|
goto Traverse_Variables_Label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (*(__int8*)((unsigned __int32)Local_Player + 327) == 0)
|
if (*(__int8*)((unsigned __int32)Local_Player + 327) == 0)
|
||||||
{
|
{
|
||||||
|
Command->Buttons |= 4194304 * (Command->Command_Number % 2);
|
||||||
|
|
||||||
float Move_Angles[3] =
|
float Move_Angles[3] =
|
||||||
{
|
{
|
||||||
Command->Angles[0],
|
Command->Angles[0],
|
||||||
|
|
||||||
Command->Angles[1],
|
Command->Angles[1]
|
||||||
|
|
||||||
0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static float Previous_Move_Angle_Y;
|
static float Previous_Move_Angle_Y;
|
||||||
|
|
||||||
if ((Command->Buttons & 2) == 2)
|
if ((Command->Buttons & 2) + *(__int8*)((unsigned __int32)Local_Player + 324) == 4)
|
||||||
{
|
{
|
||||||
Command->Move[0] = 0;
|
Command->Move[0] = 0;
|
||||||
|
|
||||||
if (*(__int32*)((unsigned __int32)Local_Player + 316) == -1)
|
if (*(void**)((unsigned __int32)Local_Player + 316) == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
Command->Buttons &= ~(*(__int8*)((unsigned __int32)Local_Player + 324) & 2);
|
Command->Buttons &= ~2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Command->Buttons &= ~(*(__int32*)((unsigned __int32)Local_Player + 5028) & 2);
|
Command->Buttons &= ~(*(__int32*)((unsigned __int32)Local_Player + 5028) & 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
float Difference = __builtin_remainderf(Move_Angles[1] - Previous_Move_Angle_Y, 360);
|
float Difference = __builtin_remainderf(Move_Angles[1] - Previous_Move_Angle_Y, 360.f);
|
||||||
|
|
||||||
Previous_Move_Angle_Y = Move_Angles[1];
|
Previous_Move_Angle_Y = Move_Angles[1];
|
||||||
|
|
||||||
float* Velocity = (float*)((unsigned __int32)Local_Player + 256);
|
float* Velocity = (float*)((unsigned __int32)Local_Player + 256);
|
||||||
|
|
||||||
if (__builtin_fabsf(Difference) < __builtin_atan2f(30, __builtin_hypotf(Velocity[0], Velocity[1])) * 180 / 3.1415927f)
|
if (__builtin_fabsf(Difference) < __builtin_atan2f(30.f, __builtin_hypotf(Velocity[0], Velocity[1])) * 180.f / 3.1415927f)
|
||||||
{
|
{
|
||||||
float Strafe_Angle = __builtin_remainderf(Move_Angles[1] - __builtin_atan2f(Velocity[1], Velocity[0]) * 180 / 3.1415927f, 360);
|
float Strafe_Angle = __builtin_remainderf(Move_Angles[1] - __builtin_atan2f(Velocity[1], Velocity[0]) * 180.f / 3.1415927f, 360.f);
|
||||||
|
|
||||||
if (__builtin_signbitf(Strafe_Angle) == 0)
|
if (__builtin_signbitf(Strafe_Angle) == 0)
|
||||||
{
|
{
|
||||||
Command->Move[1] = -400;
|
Command->Move[1] = -450.f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Command->Move[1] = 400;
|
Command->Move[1] = 450.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Move_Angles[1] -= Strafe_Angle;
|
Move_Angles[1] -= Strafe_Angle;
|
||||||
@ -110,11 +129,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (__builtin_signbitf(Difference) == 0)
|
if (__builtin_signbitf(Difference) == 0)
|
||||||
{
|
{
|
||||||
Command->Move[1] = -400;
|
Command->Move[1] = -450.f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Command->Move[1] = 400;
|
Command->Move[1] = 450.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,7 +144,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
float Previous_Move[2];
|
float Previous_Move[2];
|
||||||
|
|
||||||
Byte_Manager::Copy_Bytes(0, Previous_Move, sizeof(Previous_Move), Command->Move);
|
Byte_Manager::Copy_Bytes(1, Previous_Move, sizeof(Previous_Move), Command->Move);
|
||||||
|
|
||||||
float Desired_Move_Forward[3];
|
float Desired_Move_Forward[3];
|
||||||
|
|
||||||
@ -133,11 +152,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Angle_Vectors(Move_Angles, Desired_Move_Forward, Desired_Move_Right, nullptr);
|
Angle_Vectors(Move_Angles, Desired_Move_Forward, Desired_Move_Right, nullptr);
|
||||||
|
|
||||||
Desired_Move_Forward[2] = 0;
|
Desired_Move_Forward[2] = 0.f;
|
||||||
|
|
||||||
Vector_Normalize(Desired_Move_Forward);
|
Vector_Normalize(Desired_Move_Forward);
|
||||||
|
|
||||||
Desired_Move_Right[2] = 0;
|
Desired_Move_Right[2] = 0.f;
|
||||||
|
|
||||||
Vector_Normalize(Desired_Move_Right);
|
Vector_Normalize(Desired_Move_Right);
|
||||||
|
|
||||||
@ -156,11 +175,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Angle_Vectors(Command->Angles, Move_Forward, Move_Right, nullptr);
|
Angle_Vectors(Command->Angles, Move_Forward, Move_Right, nullptr);
|
||||||
|
|
||||||
Move_Forward[2] = 0;
|
Move_Forward[2] = 0.f;
|
||||||
|
|
||||||
Vector_Normalize(Move_Forward);
|
Vector_Normalize(Move_Forward);
|
||||||
|
|
||||||
Move_Right[2] = 0;
|
Move_Right[2] = 0.f;
|
||||||
|
|
||||||
Vector_Normalize(Move_Right);
|
Vector_Normalize(Move_Right);
|
||||||
|
|
||||||
@ -173,38 +192,129 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Correct_Movement();
|
Correct_Movement();
|
||||||
|
|
||||||
|
Extended_Command_Structure* Initial_Extended_Command = &Extended_Commands[*(__int32*)((unsigned __int32)Local_Player + 20) % 150];
|
||||||
|
|
||||||
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
|
void* Network_Channel = *(void**)(*(unsigned __int32*)((unsigned __int32)Engine_Module + 4352236) + 24);
|
||||||
|
|
||||||
auto Sequence_Shift = [&](__int32 Reserve)
|
auto Sequence_Shift = [&](__int32 Reserve) -> void
|
||||||
{
|
{
|
||||||
if (Extra_Commands < 1)
|
if (Initial_Extended_Command->Sequence_Shift == 0)
|
||||||
{
|
{
|
||||||
*(__int32*)((unsigned __int32)Network_Channel + 8) += (Command->Tick_Number + ~-150) / 150 * 150 + (Reserve * 150);
|
__int32 Sequence_Shift = (*(__int32*)((unsigned __int32)Local_Player + 5324) - Extended_Command->Extra_Commands + ~-150) / 150 * 150 + (Reserve * 150);
|
||||||
|
|
||||||
|
if (Sequence_Shift > 0)
|
||||||
|
{
|
||||||
|
*(__int32*)((unsigned __int32)Network_Channel + 8) += Sequence_Shift;
|
||||||
|
|
||||||
|
Extended_Command->Sequence_Shift += Sequence_Shift;
|
||||||
|
|
||||||
|
__int32 Command_Number = Command->Command_Number;
|
||||||
|
|
||||||
|
Traverse_Command_Batch_Label:
|
||||||
|
{
|
||||||
|
Command_Number -= 1;
|
||||||
|
|
||||||
|
if (Command_Number >= *(__int32*)((unsigned __int32)Local_Player + 20))
|
||||||
|
{
|
||||||
|
Extended_Commands[Command_Number % 150].Sequence_Shift = Extended_Command->Sequence_Shift;
|
||||||
|
|
||||||
|
goto Traverse_Command_Batch_Label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Local_Player + 20) = 1 + (Reserve > 0);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Correct_Extended_Command();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((*(float*)((unsigned __int32)Local_Player + 4604) + 800 * Global_Variables->Interval_Per_Tick >= 560) + (*(__int8*)((unsigned __int32)Local_Player + 8068) + *(__int8*)((unsigned __int32)Local_Player + 9708)) != 0)
|
__int8 Action = *(void**)((unsigned __int32)Local_Player + 7076) == *(void**)((unsigned __int32)Local_Player + 376);
|
||||||
{
|
|
||||||
Command->Buttons &= ~10241;
|
|
||||||
|
|
||||||
|
__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)
|
||||||
|
{
|
||||||
Sequence_Shift(2);
|
Sequence_Shift(2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (Action + Reviving != 0)
|
||||||
|
{
|
||||||
|
Disable_Clock_Correction(Interface_Extra_Commands_Action.Integer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Correct_Extended_Command();
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Local_Player + 5620) = Command->Command_Number;
|
||||||
|
|
||||||
void* Prediction = (void*)((unsigned __int32)Client_Module + 8072728);
|
void* Prediction = (void*)((unsigned __int32)Client_Module + 8072728);
|
||||||
|
|
||||||
*(__int8*)((unsigned __int32)Prediction + 8) = 1;
|
*(__int8*)((unsigned __int32)Prediction + 8) = 1;
|
||||||
@ -225,20 +335,73 @@ 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)
|
||||||
{
|
{
|
||||||
if ((*(__int32*)((unsigned __int32)Local_Player + 5020) & 32) == 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);
|
||||||
|
|
||||||
if (Can_Attack_Type((unsigned __int32)Client_Module + 2541696)(Local_Player) == 1)
|
if (Can_Attack_Type((unsigned __int32)Client_Module + 2541696)(Local_Player) == 1)
|
||||||
{
|
{
|
||||||
void* Weapon = *(__int16*)((unsigned __int32)Local_Player + 7866) == 0 ? *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Local_Player + 4228) & 4095) - 4097) << 4)) : nullptr;
|
void* Weapon = *(__int8*)((unsigned __int32)Local_Player + 7867) == 0 ? *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Local_Player + 4228) & 4095) - 4097) << 4)) : nullptr;
|
||||||
|
|
||||||
if (Weapon == nullptr)
|
if (Weapon == nullptr)
|
||||||
{
|
{
|
||||||
Block_Buttons = 0;
|
Block_Buttons = 2048;
|
||||||
}
|
}
|
||||||
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*)();
|
||||||
@ -271,7 +434,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (*(__int32*)((unsigned __int32)Entity + 228) % 2 != *(__int32*)((unsigned __int32)Local_Player + 228) % 2)
|
if (*(__int32*)((unsigned __int32)Entity + 228) % 2 != *(__int32*)((unsigned __int32)Local_Player + 228) % 2)
|
||||||
{
|
{
|
||||||
float* Local_Player_Origin = (float*)((unsigned __int32)Local_Player + 292);
|
float* Local_Origin = (float*)((unsigned __int32)Local_Player + 292);
|
||||||
|
|
||||||
float* Entity_Origin = (float*)((unsigned __int32)Entity + 292);
|
float* Entity_Origin = (float*)((unsigned __int32)Entity + 292);
|
||||||
|
|
||||||
@ -285,7 +448,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
(__int8)(Identifier == 270 ? *(void**)((unsigned __int32)Entity + 8040) == *(void**)((unsigned __int32)Local_Player + 376) : 0),
|
(__int8)(Identifier == 270 ? *(void**)((unsigned __int32)Entity + 8040) == *(void**)((unsigned __int32)Local_Player + 376) : 0),
|
||||||
|
|
||||||
__builtin_powf(Local_Player_Origin[0] - Entity_Origin[0], 2) + __builtin_powf(Local_Player_Origin[1] - Entity_Origin[1], 2) + __builtin_powf(Local_Player_Origin[2] - Entity_Origin[2], 2),
|
__builtin_powf(Local_Origin[0] - Entity_Origin[0], 2.f) + __builtin_powf(Local_Origin[1] - Entity_Origin[1], 2.f) + __builtin_powf(Local_Origin[2] - Entity_Origin[2], 2.f),
|
||||||
|
|
||||||
(__int32)(Time / Global_Variables->Interval_Per_Tick + 0.5f)
|
(__int32)(Time / Global_Variables->Interval_Per_Tick + 0.5f)
|
||||||
};
|
};
|
||||||
@ -294,7 +457,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (Identifier == 277)
|
if (Identifier == 277)
|
||||||
{
|
{
|
||||||
if (*(float*)((unsigned __int32)Entity + 4844) == 1)
|
if (*(float*)((unsigned __int32)Entity + 4844) == 1.f)
|
||||||
{
|
{
|
||||||
Sorted_Target_List.push_back(Target);
|
Sorted_Target_List.push_back(Target);
|
||||||
}
|
}
|
||||||
@ -338,30 +501,54 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
size_t Target_Number = 0;
|
size_t Target_Number = 0;
|
||||||
|
|
||||||
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 Healing = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE;
|
|
||||||
|
|
||||||
__int8 Reloading = *(__int8*)((unsigned __int32)Weapon + 2493);
|
|
||||||
|
|
||||||
__int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
|
|
||||||
|
|
||||||
__int8 Is_Cold_Melee = Weapon_Identifier == 231;
|
|
||||||
|
|
||||||
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 + In_Shove > 1)
|
||||||
|
{
|
||||||
|
if (*(__int8*)((unsigned __int32)Local_Player + 8070) * (Weapon_Identifier == 231) == 0)
|
||||||
|
{
|
||||||
|
if (Interface_Shotgun_Shove.Integer == 1)
|
||||||
|
{
|
||||||
|
if ((Weapon_Identifier - 148) % 14 == 0)
|
||||||
|
{
|
||||||
|
if ((void*)((unsigned __int32)Weapon + Ammo) == Predicted_Shot)
|
||||||
|
{
|
||||||
|
Predicted_Shot = nullptr;
|
||||||
|
|
||||||
|
Command->Buttons |= 2048;
|
||||||
|
|
||||||
|
Block_Buttons = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__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:
|
Shove_Traverse_Sorted_Target_List_Label:
|
||||||
{
|
{
|
||||||
if (Target_Number != Sorted_Target_List.size())
|
if (Target_Number != Sorted_Target_List.size())
|
||||||
@ -370,7 +557,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
__int8 Forced = 0;
|
__int8 Forced = 0;
|
||||||
|
|
||||||
if (Is_Melee + Healing + Reloading != 0)
|
if (((Command->Buttons & 2048) + Reloading + Holstering + Is_Melee * (Is_Chainsaw ^ 1)) * (Action + Reviving ^ 1) != 0)
|
||||||
{
|
{
|
||||||
if ((Target->Identifier ^ 72) % 348 >= 72)
|
if ((Target->Identifier ^ 72) % 348 >= 72)
|
||||||
{
|
{
|
||||||
@ -380,23 +567,21 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Target->Identifier >= 263) + (Target->Identifier <= 270 - Is_Cold_Melee - (*(__int8*)((unsigned __int32)Local_Player + 8070) ^ 1)) == 2)
|
if ((270 - Target->Identifier ^ Target->Identifier - 263) >= 0)
|
||||||
{
|
{
|
||||||
Shove_Label:
|
Shove_Label:
|
||||||
{
|
{
|
||||||
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
__int8 Infected = (Target->Identifier == 264) * (Forced ^ 1);
|
||||||
|
|
||||||
if ((Infected ^ 1) + (*(__int32*)((unsigned __int32)Target->Self + 52) == 15) != 0)
|
__int32 Gender = *(__int32*)((unsigned __int32)Target->Self + 52);
|
||||||
{
|
|
||||||
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
|
||||||
|
|
||||||
if (__builtin_strstr(Get_Sequence_Name_Type((unsigned __int32)Client_Module + 203392)(Target->Self, *(__int32*)((unsigned __int32)Target->Self + 2212)), "hove") == nullptr)
|
if ((Infected ^ 1) + (Gender == 15) != 0)
|
||||||
|
{
|
||||||
|
if (__builtin_strstr(Get_Sequence_Name(Target->Self), "hove") == nullptr)
|
||||||
{
|
{
|
||||||
using Perform_Shove_Trace = __int8(__thiscall*)(void* Weapon, float* Direction);
|
using Perform_Shove_Trace = __int8(__thiscall*)(void* Weapon, float* Direction);
|
||||||
|
|
||||||
using Get_Center_Type = float*(__thiscall*)(void* Entity);
|
float* Target_Origin = Get_Center(Target->Self);
|
||||||
|
|
||||||
float* Target_Origin = Get_Center_Type((unsigned __int32)Client_Module + 114400)(Target->Self);
|
|
||||||
|
|
||||||
float Direction[3] =
|
float Direction[3] =
|
||||||
{
|
{
|
||||||
@ -409,50 +594,54 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Vector_Normalize(Direction);
|
Vector_Normalize(Direction);
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Weapon + 2724) = 75;
|
*(float*)((unsigned __int32)Weapon + 2724) = 75.f;
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Weapon + 3248) = 0;
|
*(__int32*)((unsigned __int32)Weapon + 3248) = 0;
|
||||||
|
|
||||||
Perform_Trace_Target = Target->Self;
|
Perform_Trace_Target = Target->Self;
|
||||||
|
|
||||||
Perform_Trace_Damage = 0;
|
Perform_Trace_Damage = 0.f;
|
||||||
|
|
||||||
Perform_Shove_Trace((unsigned __int32)Client_Module + 3220512)(Weapon, Direction);
|
Perform_Shove_Trace((unsigned __int32)Client_Module + 3220512)(Weapon, Direction);
|
||||||
|
|
||||||
Perform_Trace_Target = nullptr;
|
Perform_Trace_Target = nullptr;
|
||||||
|
|
||||||
if (Perform_Trace_Damage == 1)
|
if (Perform_Trace_Damage == 1.f)
|
||||||
|
{
|
||||||
|
if (Action == 0)
|
||||||
{
|
{
|
||||||
Command->Tick_Number = Target->Tick_Number;
|
Command->Tick_Number = Target->Tick_Number;
|
||||||
|
|
||||||
Command->Angles[0] = __builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180 / 3.1415927f;
|
Command->Angles[0] = __builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f;
|
||||||
|
|
||||||
Command->Angles[1] = __builtin_atan2f(Direction[1], Direction[0]) * 180 / 3.1415927f;
|
Command->Angles[1] = __builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f;
|
||||||
|
|
||||||
if (Cancelable_Shove == 1)
|
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);
|
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 * Shove_Multiplier + 45 * (1 - Shove_Multiplier);
|
Command->Angles[1] += -45.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Command->Angles[1] += 45;
|
Command->Angles[1] += 45.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Command->Buttons |= 2048;
|
Command->Buttons |= 2048;
|
||||||
|
|
||||||
Block_Buttons = 1;
|
Block_Buttons = 1;
|
||||||
|
|
||||||
if (Interface_Riot_Deprioritize.Integer == 1)
|
Cancelable_Shove = (Gender * Interface_Riot_Deprioritize.Integer * (Forced ^ 1)) == 15;
|
||||||
{
|
|
||||||
Cancelable_Shove = Infected * 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
*(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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -468,12 +657,12 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Cancelable_Shove != 0)
|
if (Cancelable_Shove != 0)
|
||||||
{
|
{
|
||||||
__int8 Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Current_Time) * (*(__int32*)((unsigned __int32)Weapon + 2436) > 0 - Is_Melee * 2) * (*(float*)((unsigned __int32)Local_Player + 3872) <= Global_Variables->Current_Time);
|
if (Reviving + (Can_Attack ^ 1) == 0)
|
||||||
|
|
||||||
if ((Can_Attack ^ 1) + (Weapon_Identifier == 96) + Healing == 0)
|
|
||||||
{
|
{
|
||||||
Target_Structure* Aim_Target = nullptr;
|
Target_Structure* Aim_Target = nullptr;
|
||||||
|
|
||||||
@ -499,12 +688,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (Weapon_Identifier == 153)
|
if (Weapon_Identifier == 153)
|
||||||
{
|
{
|
||||||
if (*(float*)((unsigned __int32)Weapon + 3392) + *(float*)((unsigned __int32)Weapon + 3396) != 0)
|
Compensate_Burst = *(double*)((unsigned __int32)Weapon + 3392) != 0.;
|
||||||
{
|
|
||||||
Compensate_Burst = 1;
|
|
||||||
|
|
||||||
Command->Buttons |= 1;
|
Command->Buttons |= Compensate_Burst;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -518,10 +704,10 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using Update_Spread_Type = void(__thiscall*)(void* Weapon);
|
|
||||||
|
|
||||||
if (Compensate_Burst == 0)
|
if (Compensate_Burst == 0)
|
||||||
{
|
{
|
||||||
|
using Update_Spread_Type = void(__thiscall*)(void* Weapon);
|
||||||
|
|
||||||
Update_Spread_Type((unsigned __int32)Client_Module + 3197648)(Weapon);
|
Update_Spread_Type((unsigned __int32)Client_Module + 3197648)(Weapon);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,7 +738,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Perform_Trace_Target = Target->Self;
|
Perform_Trace_Target = Target->Self;
|
||||||
|
|
||||||
Perform_Trace_Damage = 0;
|
Perform_Trace_Damage = 0.f;
|
||||||
|
|
||||||
void* Previous_Audio_Device = *(void**)((unsigned __int32)Engine_Module + 5050008);
|
void* Previous_Audio_Device = *(void**)((unsigned __int32)Engine_Module + 5050008);
|
||||||
|
|
||||||
@ -586,7 +772,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
*(__int32*)((unsigned __int32)Weapon_Data + 2520) = Bullets;
|
*(__int32*)((unsigned __int32)Weapon_Data + 2520) = Bullets;
|
||||||
|
|
||||||
return (Perform_Trace_Damage >= Interface_Penetration_Damage.Floating_Point) * (Perform_Trace_Damage != 0);
|
return (Perform_Trace_Damage >= Interface_Penetration_Damage.Floating_Point) * (Perform_Trace_Damage != 0.f);
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::unordered_map<__int32, __int32> Hitboxes =
|
static std::unordered_map<__int32, __int32> Hitboxes =
|
||||||
@ -620,11 +806,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
float Hitbox_Center[3]
|
float Hitbox_Center[3]
|
||||||
{
|
{
|
||||||
(Hitbox_Minimum[0] + Hitbox_Maximum[0]) / 2,
|
(Hitbox_Minimum[0] + Hitbox_Maximum[0]) / 2.f,
|
||||||
|
|
||||||
(Hitbox_Minimum[1] + Hitbox_Maximum[1]) / 2,
|
(Hitbox_Minimum[1] + Hitbox_Maximum[1]) / 2.f,
|
||||||
|
|
||||||
(Hitbox_Minimum[2] + Hitbox_Maximum[2]) / 2
|
(Hitbox_Minimum[2] + Hitbox_Maximum[2]) / 2.f
|
||||||
};
|
};
|
||||||
|
|
||||||
float Target_Origin[3] =
|
float Target_Origin[3] =
|
||||||
@ -649,18 +835,16 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
float Angles[3] =
|
float Angles[3] =
|
||||||
{
|
{
|
||||||
__builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180 / 3.1415927f,
|
__builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f,
|
||||||
|
|
||||||
__builtin_atan2f(Direction[1], Direction[0]) * 180 / 3.1415927f,
|
__builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f
|
||||||
|
|
||||||
0
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Perform_Trace(Angles) == 1)
|
if (Perform_Trace(Angles) == 1)
|
||||||
{
|
{
|
||||||
Command->Tick_Number = Target->Tick_Number;
|
Command->Tick_Number = Target->Tick_Number;
|
||||||
|
|
||||||
Byte_Manager::Copy_Bytes(0, Command->Angles, sizeof(Angles), Angles);
|
Byte_Manager::Copy_Bytes(1, Command->Angles, sizeof(Angles), Angles);
|
||||||
|
|
||||||
Command->Buttons |= 1;
|
Command->Buttons |= 1;
|
||||||
|
|
||||||
@ -686,7 +870,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
{
|
{
|
||||||
if (Shove_Target != nullptr)
|
if (Shove_Target != nullptr)
|
||||||
{
|
{
|
||||||
*(float*)((unsigned __int32)Shove_Target->Self + 16) = 0;
|
*(float*)((unsigned __int32)Shove_Target->Self + 16) = 0.f;
|
||||||
|
|
||||||
if (Aim_Target != nullptr)
|
if (Aim_Target != nullptr)
|
||||||
{
|
{
|
||||||
@ -711,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -727,12 +913,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
|||||||
|
|
||||||
Command->Buttons &= ~Block_Buttons;
|
Command->Buttons &= ~Block_Buttons;
|
||||||
|
|
||||||
Byte_Manager::Copy_Bytes(0, Command->Move, sizeof(Previous_Move), Previous_Move);
|
Byte_Manager::Copy_Bytes(1, Command->Move, sizeof(Previous_Move), Previous_Move);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
void Redirected_Draw_Crosshair()
|
void Redirected_Draw_Crosshair()
|
||||||
{
|
|
||||||
if ((*(__int32*)(*(unsigned __int32*)((unsigned __int32)Client_Module + 7498712) + 5008) | 55) == 55)
|
|
||||||
{
|
{
|
||||||
static float Rotation_Angle;
|
static float Rotation_Angle;
|
||||||
|
|
||||||
@ -14,9 +12,9 @@ void Redirected_Draw_Crosshair()
|
|||||||
|
|
||||||
using Draw_Circle_Type = void(__thiscall**)(void* Surface, __int32 X, __int32 Y, __int32 Radius, __int32 Segments);
|
using Draw_Circle_Type = void(__thiscall**)(void* Surface, __int32 X, __int32 Y, __int32 Radius, __int32 Segments);
|
||||||
|
|
||||||
X += Interface_Storm_Rotation_Radius.Integer * __builtin_cosf(__builtin_remainderf(Rotation_Angle + Additional_Rotation_Angle, 360) * 3.1415927f / 180);
|
X += Interface_Storm_Rotation_Radius.Integer * __builtin_cosf(__builtin_remainderf(Rotation_Angle + Additional_Rotation_Angle, 360.f) * 3.1415927f / 180.f);
|
||||||
|
|
||||||
Y += Interface_Storm_Rotation_Radius.Integer * __builtin_sinf(__builtin_remainderf(Rotation_Angle + Additional_Rotation_Angle, 360) * 3.1415927f / 180);
|
Y += Interface_Storm_Rotation_Radius.Integer * __builtin_sinf(__builtin_remainderf(Rotation_Angle + Additional_Rotation_Angle, 360.f) * 3.1415927f / 180.f);
|
||||||
|
|
||||||
(*Draw_Circle_Type(*(unsigned __int32*)Surface + 384))(Surface, X - 1, Y, Interface_Storm_Radius.Integer, Interface_Storm_Segments.Integer);
|
(*Draw_Circle_Type(*(unsigned __int32*)Surface + 384))(Surface, X - 1, Y, Interface_Storm_Radius.Integer, Interface_Storm_Segments.Integer);
|
||||||
|
|
||||||
@ -41,11 +39,17 @@ void Redirected_Draw_Crosshair()
|
|||||||
|
|
||||||
__int32 Storm_Number = 0;
|
__int32 Storm_Number = 0;
|
||||||
|
|
||||||
using Get_Screen_Size_Type = __int32(__cdecl*)();
|
using Get_Screen_Size_Type = __int32(__cdecl*)(__int32* Width, __int32* Height);
|
||||||
|
|
||||||
__int32 Screen_Width = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738576)() / 2;
|
__int32 Screen_Width;
|
||||||
|
|
||||||
__int32 Screen_Height = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738544)() / 2;
|
__int32 Screen_Height;
|
||||||
|
|
||||||
|
Get_Screen_Size_Type((unsigned __int32)Client_Module + 1780352)(&Screen_Width, &Screen_Height);
|
||||||
|
|
||||||
|
Screen_Width /= 2;
|
||||||
|
|
||||||
|
Screen_Height /= 2;
|
||||||
|
|
||||||
Draw_Storm_Label:
|
Draw_Storm_Label:
|
||||||
{
|
{
|
||||||
@ -59,6 +63,9 @@ void Redirected_Draw_Crosshair()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rotation_Angle = __builtin_remainderf(Rotation_Angle + (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Frame_Time * Interface_Storm_Speed.Integer, 360);
|
Rotation_Angle = __builtin_remainderf(Rotation_Angle + (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Frame_Time * Interface_Storm_Speed.Integer, 360.f);
|
||||||
}
|
|
||||||
|
using Get_Display_Type = void*(__cdecl*)();
|
||||||
|
|
||||||
|
*(__int32*)((unsigned __int32)Get_Display_Type((unsigned __int32)Client_Module + 2930128)() + 400) = 0;
|
||||||
}
|
}
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#define Bits_32
|
|
||||||
|
|
||||||
#include "Byte_Manager/Byte_Manager.hpp"
|
#include "Byte_Manager/Byte_Manager.hpp"
|
||||||
|
|
||||||
#include "Redirection_Manager/Redirection_Manager.hpp"
|
#include "Redirection_Manager/Redirection_Manager.hpp"
|
||||||
@ -18,6 +16,8 @@ void* Client_Module;
|
|||||||
|
|
||||||
#include "Post_Network_Data_Received.hpp"
|
#include "Post_Network_Data_Received.hpp"
|
||||||
|
|
||||||
|
#include "Set_Move_Type.hpp"
|
||||||
|
|
||||||
#include "Interpolate.hpp"
|
#include "Interpolate.hpp"
|
||||||
|
|
||||||
#include "Update_Animations.hpp"
|
#include "Update_Animations.hpp"
|
||||||
@ -117,7 +117,7 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)LoadLibraryW(L"vaudio_speex.dll") + 9440), 1, 195);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)LoadLibraryW(L"vaudio_speex.dll") + 9440), 1, 195);
|
||||||
|
|
||||||
AllocConsole();
|
AllocConsole();
|
||||||
|
|
||||||
@ -161,16 +161,11 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
GetConsoleScreenBufferInfo(Standard_Output_Handle, &Console_Screen_Buffer_Information);
|
GetConsoleScreenBufferInfo(Standard_Output_Handle, &Console_Screen_Buffer_Information);
|
||||||
|
|
||||||
COORD Top_Left =
|
COORD Top_Left = { };
|
||||||
{
|
|
||||||
0,
|
|
||||||
|
|
||||||
0
|
DWORD Characters_Written;
|
||||||
};
|
|
||||||
|
|
||||||
DWORD Characters_Written_Count;
|
FillConsoleOutputAttribute(Standard_Output_Handle, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY | BACKGROUND_BLUE, Console_Screen_Buffer_Information.dwSize.X * Console_Screen_Buffer_Information.dwSize.Y, Top_Left, &Characters_Written);
|
||||||
|
|
||||||
FillConsoleOutputAttribute(Standard_Output_Handle, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY | BACKGROUND_BLUE, Console_Screen_Buffer_Information.dwSize.X * Console_Screen_Buffer_Information.dwSize.Y, Top_Left, &Characters_Written_Count);
|
|
||||||
|
|
||||||
Engine_Module = GetModuleHandleW(L"engine.dll");
|
Engine_Module = GetModuleHandleW(L"engine.dll");
|
||||||
|
|
||||||
@ -183,29 +178,33 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
_putws(L"[ + ] Events");
|
_putws(L"[ + ] Events");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(Original_Post_Network_Data_Received_Caller, 0, (void*)((unsigned __int32)Client_Module + 1555264), 1, (void*)Redirected_Post_Network_Data_Received);
|
Original_Post_Network_Data_Received_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1555264), (void*)Redirected_Post_Network_Data_Received);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 316816), 1, 195);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 316816), 1, 195);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Engine_Module + 521741), 1, 235);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Engine_Module + 350575), 1, 94);
|
||||||
|
|
||||||
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Engine_Module + 521741), 1, 235);
|
||||||
|
|
||||||
|
*(void**)((unsigned __int32)Client_Module + 7492840) = (void*)Redirected_Set_Move_Type;
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Interpolation");
|
_putws(L"[ + ] Interpolation");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(Original_Interpolate_Caller, 0, (void*)((unsigned __int32)Client_Module + 214256), 1, (void*)Redirected_Interpolate);
|
Original_Interpolate_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 214256), (void*)Redirected_Interpolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
_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);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Estimate_Velocity_Caller, 0, (void*)((unsigned __int32)Client_Module + 311856), 1, (void*)Redirected_Estimate_Velocity);
|
Original_Estimate_Velocity_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 311856), (void*)Redirected_Estimate_Velocity);
|
||||||
|
|
||||||
unsigned __int8 Maintain_Sequence_Transitions_Bytes[3] = { 194, 24, 0 };
|
unsigned __int8 Maintain_Sequence_Transitions_Bytes[3] = { 194, 24, 0 };
|
||||||
|
|
||||||
Byte_Manager::Copy_Bytes(1, (void*)((unsigned __int32)Client_Module + 245232), sizeof(Maintain_Sequence_Transitions_Bytes), Maintain_Sequence_Transitions_Bytes);
|
Byte_Manager::Copy_Bytes(0, (void*)((unsigned __int32)Client_Module + 245232), sizeof(Maintain_Sequence_Transitions_Bytes), Maintain_Sequence_Transitions_Bytes);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 3244278), 1, 15);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 3244278), 1, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Prediction");
|
_putws(L"[ + ] Prediction");
|
||||||
@ -224,81 +223,85 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
|||||||
|
|
||||||
Prediction_Descriptor->Parent = &Original_Prediction_Descriptor;
|
Prediction_Descriptor->Parent = &Original_Prediction_Descriptor;
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Spawn_Grenade_Caller, 2, (void*)((unsigned __int32)Client_Module + 2227424), 1, (void*)Redirected_Spawn_Grenade);
|
Original_Spawn_Grenade_Caller = Redirection_Manager::Redirect_Function(2, (void*)((unsigned __int32)Client_Module + 2227424), (void*)Redirected_Spawn_Grenade);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Update_Caller, 0, (void*)((unsigned __int32)Client_Module + 1554304), 1, (void*)Redirected_Update);
|
Original_Update_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1554304), (void*)Redirected_Update);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 1554528), 1, 235);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 1554528), 1, 235);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 1557776), 1, 235);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 1557776), 1, 235);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Run_Command_Caller, 0, (void*)((unsigned __int32)Client_Module + 1553504), 1, (void*)Redirected_Run_Command);
|
Original_Run_Command_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1553504), (void*)Redirected_Run_Command);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Process_Movement_Caller, 2, (void*)((unsigned __int32)Client_Module + 2590832), 1, (void*)Redirected_Process_Movement);
|
Original_Process_Movement_Caller = Redirection_Manager::Redirect_Function(2, (void*)((unsigned __int32)Client_Module + 2590832), (void*)Redirected_Process_Movement);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Play_Footstep_Sound_Caller, 0, (void*)((unsigned __int32)Client_Module + 978464), 1, (void*)Redirected_Play_Footstep_Sound);
|
Original_Play_Footstep_Sound_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 978464), (void*)Redirected_Play_Footstep_Sound);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Finish_Move_Caller, 2, (void*)((unsigned __int32)Client_Module + 1553264), 1, (void*)Redirected_Finish_Move);
|
Original_Finish_Move_Caller = Redirection_Manager::Redirect_Function(2, (void*)((unsigned __int32)Client_Module + 1553264), (void*)Redirected_Finish_Move);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Item_Post_Frame_Caller, 3, (void*)((unsigned __int32)Client_Module + 2542896), 1, (void*)Redirected_Item_Post_Frame);
|
Original_Item_Post_Frame_Caller = Redirection_Manager::Redirect_Function(3, (void*)((unsigned __int32)Client_Module + 2542896), (void*)Redirected_Item_Post_Frame);
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Original_Item_Post_Frame_Caller + 5) = (__int32)((unsigned __int32)Client_Module + 2438551) - (__int32)Original_Item_Post_Frame_Caller;
|
*(__int32*)((unsigned __int32)Original_Item_Post_Frame_Caller + 5) = (__int32)((unsigned __int32)Client_Module + 2438551) - (__int32)Original_Item_Post_Frame_Caller;
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Perform_Trace_Caller, 0, (void*)((unsigned __int32)Client_Module + 3093744), 1, (void*)Redirected_Perform_Trace);
|
Original_Perform_Trace_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 3093744), (void*)Redirected_Perform_Trace);
|
||||||
|
|
||||||
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");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(Original_Read_Packets_Caller, 0, (void*)((unsigned __int32)Engine_Module + 499264), 1, (void*)Redirected_Read_Packets);
|
Original_Read_Packets_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Engine_Module + 499264), (void*)Redirected_Read_Packets);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Move_Caller, 3, (void*)((unsigned __int32)Engine_Module + 512288), 1, (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");
|
||||||
{
|
{
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 1250629), 3, 144);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 1250629), 3, 144);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 417204), 1, 235);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 417204), 1, 235);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Copy_Command_Caller, 0, (void*)((unsigned __int32)Client_Module + 1094624), 1, (void*)Redirected_Copy_Command);
|
Original_Copy_Command_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1094624), (void*)Redirected_Copy_Command);
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Effects");
|
_putws(L"[ + ] Effects");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(Original_Calculate_View_Caller, 0, (void*)((unsigned __int32)Client_Module + 132944), 1, (void*)Redirected_Calculate_View);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 407384), 1, 133);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 133424), 1, 235);
|
Original_Calculate_View_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 132944), (void*)Redirected_Calculate_View);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 2881566), 1, 246);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 133424), 1, 235);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Draw_Effect_Caller, 0, (void*)((unsigned __int32)Client_Module + 1425888), 1, (void*)Redirected_Draw_Effect);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2881566), 1, 246);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 1868237), 1, 52);
|
Original_Draw_Effect_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1425888), (void*)Redirected_Draw_Effect);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 2655546), 1, 216);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 1868237), 1, 52);
|
||||||
|
|
||||||
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2655546), 1, 216);
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Client_Module + 8115120) = (void*)((unsigned __int32)Client_Module + 955708);
|
*(void**)((unsigned __int32)Client_Module + 8115120) = (void*)((unsigned __int32)Client_Module + 955708);
|
||||||
}
|
}
|
||||||
|
|
||||||
_putws(L"[ + ] Paint");
|
_putws(L"[ + ] Paint");
|
||||||
{
|
{
|
||||||
Redirection_Manager::Redirect_Function(Original_Write_Texture_Caller, 0, (void*)((unsigned __int32)GetModuleHandleW(L"vguimatsurface.dll") + 100560), 1, (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);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(Original_Get_Glow_Color_Caller, 1, (void*)((unsigned __int32)Client_Module + 2455600), 1, (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);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 2301184), (void*)Redirected_Draw_Crosshair);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 3244715), 1, 49);
|
||||||
|
|
||||||
Byte_Manager::Set_Bytes(1, (void*)((unsigned __int32)Client_Module + 2930985), 1, 235);
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 2301184), (void*)Redirected_Draw_Crosshair);
|
||||||
|
|
||||||
Redirection_Manager::Redirect_Function(1, (void*)((unsigned __int32)Client_Module + 3118720), (void*)Redirected_Draw_Crosshair);
|
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2930985), 1, 235);
|
||||||
|
|
||||||
|
Redirection_Manager::Redirect_Function((void*)((unsigned __int32)Client_Module + 3118720), (void*)Redirected_Draw_Crosshair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
char* Get_Sequence_Name(void* Entity)
|
||||||
|
{
|
||||||
|
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
||||||
|
|
||||||
|
return Get_Sequence_Name_Type((unsigned __int32)Client_Module + 203392)(Entity, *(__int32*)((unsigned __int32)Entity + 2212));
|
||||||
|
}
|
||||||
|
|
||||||
__int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
__int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
||||||
{
|
{
|
||||||
using Get_Identifier_Type = void*(__cdecl**)();
|
using Get_Identifier_Type = void*(__cdecl**)();
|
||||||
@ -9,32 +16,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)
|
||||||
{
|
{
|
||||||
@ -50,13 +32,11 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
|||||||
{
|
{
|
||||||
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
||||||
{
|
{
|
||||||
if (*(__int32*)((unsigned __int32)Entity + 572) == 131088)
|
if ((*(__int32*)((unsigned __int32)Entity + 572) - 131088 & 255) == 0)
|
||||||
{
|
{
|
||||||
using Get_Sequence_Name_Type = char*(__thiscall*)(void* Entity, __int32 Sequence);
|
if (__builtin_strstr(Get_Sequence_Name(Entity), "eath") == nullptr)
|
||||||
|
|
||||||
if (__builtin_strstr(Get_Sequence_Name_Type((unsigned __int32)Client_Module + 203392)(Entity, *(__int32*)((unsigned __int32)Entity + 2212)), "eath") == nullptr)
|
|
||||||
{
|
{
|
||||||
Valid = 1;
|
Valid = Identifier == 264 ? *(__int8*)((unsigned __int32)Entity + 4493) ^ 1 : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,20 +73,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 +111,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 +123,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;
|
||||||
@ -37,11 +41,11 @@ Interface_Structure Interface_Storm_Speed;
|
|||||||
|
|
||||||
void Implement_Extended_Interface()
|
void Implement_Extended_Interface()
|
||||||
{
|
{
|
||||||
auto Create_Console_Interface = [](Interface_Structure* Interface, char* Name, char* Value, void* Handler)
|
auto Create_Interface = [](Interface_Structure* Interface, char* Name, char* Value, void* Handler)
|
||||||
{
|
{
|
||||||
using Create_Console_Variable_Type = void(__thiscall*)(Interface_Structure* Interface, char* Name, char* Value, void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Handler);
|
using Create_Variable_Type = void(__thiscall*)(Interface_Structure* Interface, char* Name, char* Value, void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Handler);
|
||||||
|
|
||||||
Create_Console_Variable_Type((unsigned __int32)Engine_Module + 2636656)(Interface, Name, Value, nullptr, nullptr, Handler);
|
Create_Variable_Type((unsigned __int32)Engine_Module + 2636368)(Interface, Name, Value, nullptr, nullptr, Handler);
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Interface + 20) &= ~10;
|
*(__int32*)((unsigned __int32)Interface + 20) &= ~10;
|
||||||
|
|
||||||
@ -50,29 +54,33 @@ void Implement_Extended_Interface()
|
|||||||
|
|
||||||
#define Pointer_Name(Interface) &Interface, (char*)#Interface + 10
|
#define Pointer_Name(Interface) &Interface, (char*)#Interface + 10
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Extra_Commands), (char*)"4", nullptr);
|
Create_Interface(Pointer_Name(Interface_Extra_Commands), (char*)"5", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Interpolate_Extra_Commands), (char*)"1", nullptr);
|
Create_Interface(Pointer_Name(Interface_Extra_Commands_Action), (char*)"10", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Target_On_Simulation), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Interpolate_Extra_Commands), (char*)"1", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Riot_Deprioritize), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Target_On_Simulation), (char*)"0", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Penetrate_Teammates), (char*)"0", nullptr);
|
Create_Interface(Pointer_Name(Interface_Shotgun_Shove), (char*)"1", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Aim_Intersection), (char*)"1", nullptr);
|
Create_Interface(Pointer_Name(Interface_Riot_Deprioritize), (char*)"0", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Penetration_Damage), (char*)"20", nullptr);
|
Create_Interface(Pointer_Name(Interface_Penetrate_Teammates), (char*)"0", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Equipment_Distance), (char*)"2048", nullptr);
|
Create_Interface(Pointer_Name(Interface_Aim_Intersection), (char*)"1", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Storm_Rotation_Radius), (char*)"24", nullptr);
|
Create_Interface(Pointer_Name(Interface_Penetration_Damage), (char*)"12", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Storm_Radius), (char*)"8", nullptr);
|
Create_Interface(Pointer_Name(Interface_Equipment_Distance), (char*)"2048", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Storm_Segments), (char*)"12", nullptr);
|
Create_Interface(Pointer_Name(Interface_Storm_Rotation_Radius), (char*)"24", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Storm_Iterations), (char*)"16", nullptr);
|
Create_Interface(Pointer_Name(Interface_Storm_Radius), (char*)"8", nullptr);
|
||||||
|
|
||||||
Create_Console_Interface(Pointer_Name(Interface_Storm_Speed), (char*)"512", nullptr);
|
Create_Interface(Pointer_Name(Interface_Storm_Segments), (char*)"12", nullptr);
|
||||||
|
|
||||||
|
Create_Interface(Pointer_Name(Interface_Storm_Iterations), (char*)"16", nullptr);
|
||||||
|
|
||||||
|
Create_Interface(Pointer_Name(Interface_Storm_Speed), (char*)"512", nullptr);
|
||||||
}
|
}
|
@ -4,9 +4,9 @@ void __thiscall Redirected_Finish_Move(void* Unknown_Parameter_1, void* Player,
|
|||||||
{
|
{
|
||||||
float X = *(float*)((unsigned __int32)Move_Data + 76);
|
float X = *(float*)((unsigned __int32)Move_Data + 76);
|
||||||
|
|
||||||
if (X > 180)
|
if (X > 180.f)
|
||||||
{
|
{
|
||||||
X -= 360;
|
X -= 360.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Move_Data + 76) = std::clamp(X, -90.f, 90.f);
|
*(float*)((unsigned __int32)Move_Data + 76) = std::clamp(X, -90.f, 90.f);
|
||||||
|
@ -2,7 +2,7 @@ void* Original_Get_Glow_Color_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Get_Glow_Color(void* Entity, void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, void* Unknown_Parameter_4)
|
void __thiscall Redirected_Get_Glow_Color(void* Entity, void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, void* Unknown_Parameter_4)
|
||||||
{
|
{
|
||||||
if (Get_Identifier(Entity, 0, 0) != 232)
|
if (Get_Identifier(Entity, 0, 0) == -1)
|
||||||
{
|
{
|
||||||
(decltype(&Redirected_Get_Glow_Color)(Original_Get_Glow_Color_Caller))(Entity, Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Unknown_Parameter_4);
|
(decltype(&Redirected_Get_Glow_Color)(Original_Get_Glow_Color_Caller))(Entity, Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Unknown_Parameter_4);
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,10 @@
|
|||||||
struct Global_Variables_Structure
|
|
||||||
{
|
|
||||||
__int8 Additional_Bytes_1[12];
|
|
||||||
|
|
||||||
float Current_Time;
|
|
||||||
|
|
||||||
float Frame_Time;
|
|
||||||
|
|
||||||
__int8 Additional_Bytes_2[8];
|
|
||||||
|
|
||||||
float Interval_Per_Tick;
|
|
||||||
};
|
|
||||||
|
|
||||||
void* Original_Interpolate_Caller;
|
void* Original_Interpolate_Caller;
|
||||||
|
|
||||||
__int8 __thiscall Redirected_Interpolate(void* Entity, float Time)
|
__int8 __thiscall Redirected_Interpolate(void* Entity, void* Unknown_Parameter)
|
||||||
{
|
{
|
||||||
if (Entity == *(void**)((unsigned __int32)Client_Module + 7498712))
|
if (Entity == *(void**)((unsigned __int32)Client_Module + 7498712))
|
||||||
{
|
{
|
||||||
Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time;
|
return (decltype(&Redirected_Interpolate)(Original_Interpolate_Caller))(Entity, Unknown_Parameter);
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Entity + 5328) -= *(__int32*)((unsigned __int32)Entity + 16);
|
|
||||||
|
|
||||||
return (decltype(&Redirected_Interpolate)(Original_Interpolate_Caller))(Entity, Time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2,7 +2,7 @@ void* Original_Item_Post_Frame_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Item_Post_Frame(void* Player)
|
void __thiscall Redirected_Item_Post_Frame(void* Player)
|
||||||
{
|
{
|
||||||
if (*(void**)((unsigned __int32)__builtin_frame_address(0) + 60) == (void*)((unsigned __int32)Client_Module + 423107))
|
if (*(void**)((unsigned __int32)__builtin_frame_address(0) + 88) == (void*)((unsigned __int32)Client_Module + 423107))
|
||||||
{
|
{
|
||||||
(decltype(&Redirected_Item_Post_Frame)(Original_Item_Post_Frame_Caller))(Player);
|
(decltype(&Redirected_Item_Post_Frame)(Original_Item_Post_Frame_Caller))(Player);
|
||||||
}
|
}
|
||||||
|
35
Move.hpp
35
Move.hpp
@ -1,32 +1,36 @@
|
|||||||
void* Original_Move_Caller;
|
|
||||||
|
|
||||||
__int32 Extra_Commands;
|
__int32 Extra_Commands;
|
||||||
|
|
||||||
|
__int32 Chainsaw_Cycles;
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
||||||
|
|
||||||
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)();
|
||||||
|
|
||||||
using Update_Animations_Type = void(__cdecl*)();
|
Redirected_Update_Animations();
|
||||||
|
|
||||||
Update_Animations_Type((unsigned __int32)Client_Module + 205296)();
|
using Fire_Events_Type = void(__cdecl*)();
|
||||||
|
|
||||||
|
Fire_Events_Type((unsigned __int32)Engine_Module + 521648)();
|
||||||
|
|
||||||
Update_Animation_Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time;
|
Update_Animation_Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time;
|
||||||
|
|
||||||
Update_Animation_Type = 1;
|
Update_Animation_Type = 1;
|
||||||
|
|
||||||
Update_Animations_Type((unsigned __int32)Client_Module + 205296)();
|
Redirected_Update_Animations();
|
||||||
|
|
||||||
Update_Animation_Type = 0;
|
Update_Animation_Type = 0;
|
||||||
|
|
||||||
using Fire_Events_Type = void(__cdecl*)();
|
|
||||||
|
|
||||||
Fire_Events_Type((unsigned __int32)Engine_Module + 521648)();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Extra_Commands = -1;
|
Extra_Commands = -1;
|
||||||
@ -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;
|
||||||
|
75
Paint.hpp
75
Paint.hpp
@ -24,7 +24,7 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
{
|
{
|
||||||
using Get_Origin_Type = float*(__thiscall*)(void* Entity);
|
using Get_Origin_Type = float*(__thiscall*)(void* Entity);
|
||||||
|
|
||||||
float* Local_Player_Origin = Get_Origin_Type((unsigned __int32)Client_Module + 297584)(Local_Player);
|
float* Local_Origin = Get_Origin_Type((unsigned __int32)Client_Module + 297584)(Local_Player);
|
||||||
|
|
||||||
float* Entity_Origin = Get_Origin_Type((unsigned __int32)Client_Module + 297584)(Entity);
|
float* Entity_Origin = Get_Origin_Type((unsigned __int32)Client_Module + 297584)(Entity);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
0,
|
0,
|
||||||
|
|
||||||
__builtin_powf(Local_Player_Origin[0] - Entity_Origin[0], 2) + __builtin_powf(Local_Player_Origin[1] - Entity_Origin[1], 2) + __builtin_powf(Local_Player_Origin[2] - Entity_Origin[2], 2)
|
__builtin_powf(Local_Origin[0] - Entity_Origin[0], 2.f) + __builtin_powf(Local_Origin[1] - Entity_Origin[1], 2.f) + __builtin_powf(Local_Origin[2] - Entity_Origin[2], 2.f)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Identifier >= 0)
|
if (Identifier >= 0)
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,9 +145,9 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
__int32 Screen_Height = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738544)();
|
__int32 Screen_Height = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738544)();
|
||||||
|
|
||||||
Screen[0] = Screen[0] / 2 * Screen_Width + Screen_Width / 2;
|
Screen[0] = Screen[0] / 2.f * Screen_Width + Screen_Width / 2.f;
|
||||||
|
|
||||||
Screen[1] = -Screen[1] / 2 * Screen_Height + Screen_Height / 2;
|
Screen[1] = -Screen[1] / 2.f * Screen_Height + Screen_Height / 2.f;
|
||||||
|
|
||||||
Bounds[0] = min(Bounds[0], Screen[0]);
|
Bounds[0] = min(Bounds[0], Screen[0]);
|
||||||
|
|
||||||
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -176,15 +176,15 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bounds[0] -= 2;
|
Bounds[0] -= 2.f;
|
||||||
|
|
||||||
Bounds[1] += 2;
|
Bounds[1] += 2.f;
|
||||||
|
|
||||||
Bounds[2] -= 2;
|
Bounds[2] -= 2.f;
|
||||||
|
|
||||||
Bounds[3] += 2;
|
Bounds[3] += 2.f;
|
||||||
|
|
||||||
return (Bounds[1] != 2) * (Bounds[3] != 2);
|
return (Bounds[1] != 2.f) * (Bounds[3] != 2.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -217,7 +217,7 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
{ 121, { { 255, 255, 255 }, (wchar_t*)L"Pain" } },
|
{ 121, { { 255, 255, 255 }, (wchar_t*)L"Pain" } },
|
||||||
|
|
||||||
{ 232, { { 0, 255, 0 }, (wchar_t*)L"Survivor" } },
|
{ 232, { { 0, 255, 0 } } },
|
||||||
|
|
||||||
{ 256, { { 255, 255, 255 }, (wchar_t*)L"Ammo" } },
|
{ 256, { { 255, 255, 255 }, (wchar_t*)L"Ammo" } },
|
||||||
|
|
||||||
@ -238,6 +238,13 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
Paint_Data_Structure* Paint_Data = &Paint_Data_List[Target->Identifier];
|
Paint_Data_Structure* Paint_Data = &Paint_Data_List[Target->Identifier];
|
||||||
|
|
||||||
|
if (Target->Identifier == 232)
|
||||||
|
{
|
||||||
|
static wchar_t* Survivors[8] = { (wchar_t*)L"Nick", (wchar_t*)L"Rochelle", (wchar_t*)L"Coach", (wchar_t*)L"Ellis", (wchar_t*)L"Bill", (wchar_t*)L"Zoey", (wchar_t*)L"Louis", (wchar_t*)L"Francis" };
|
||||||
|
|
||||||
|
Paint_Data->Name = Survivors[*(__int32*)((unsigned __int32)Target->Self + 7308) + 4 * (*(__int32*)((unsigned __int32)Client_Module + 8144624) == 1)];
|
||||||
|
}
|
||||||
|
|
||||||
__int8 Ghost = 0;
|
__int8 Ghost = 0;
|
||||||
|
|
||||||
if (*(__int32*)((unsigned __int32)Target->Self + 236) != 0)
|
if (*(__int32*)((unsigned __int32)Target->Self + 236) != 0)
|
||||||
@ -245,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);
|
||||||
@ -267,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 + 0.5f), (__int32)(Paint_Data->Color[1] / 2 + 0.5f), (__int32)(Paint_Data->Color[2] / 2 + 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]);
|
||||||
@ -304,7 +311,9 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
Write_Character = Text[0];
|
Write_Character = Text[0];
|
||||||
|
|
||||||
Draw_Text_Type((unsigned __int32)Engine_Module + 2219056)(Font, 0, 0, 0, 0, 0, 0, Text);
|
Draw_Text_Type((unsigned __int32)Engine_Module + 2218736)(Font, 0, 0, 0, 0, 0, 0, Text);
|
||||||
|
|
||||||
|
Write_Character = 0;
|
||||||
|
|
||||||
if (Character != L'~')
|
if (Character != L'~')
|
||||||
{
|
{
|
||||||
@ -358,19 +367,15 @@ void __thiscall Redirected_Paint(void* Panel)
|
|||||||
|
|
||||||
wchar_t Text[2] = { Paint_Data->Name[Character_Number] };
|
wchar_t Text[2] = { Paint_Data->Name[Character_Number] };
|
||||||
|
|
||||||
Write_Character = Text[0];
|
|
||||||
|
|
||||||
if (Ghost == 0)
|
if (Ghost == 0)
|
||||||
{
|
{
|
||||||
Draw_Text_Type((unsigned __int32)Engine_Module + 2219056)(Font, Bounds[1] + 7 + Offset_X - Character_Bounds[0], Bounds[2] + Offset_Y, Paint_Data->Color[0], Paint_Data->Color[1], Paint_Data->Color[2], 255, Text);
|
Draw_Text_Type((unsigned __int32)Engine_Module + 2218736)(Font, Bounds[1] + 7 + Offset_X - Character_Bounds[0], Bounds[2] + Offset_Y, Paint_Data->Color[0], Paint_Data->Color[1], Paint_Data->Color[2], 255, Text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Draw_Text_Type((unsigned __int32)Engine_Module + 2219056)(Font, Bounds[1] + 7 + Offset_X - Character_Bounds[0], Bounds[2] + Offset_Y, 128, 128, 128, 255, Text);
|
Draw_Text_Type((unsigned __int32)Engine_Module + 2218736)(Font, Bounds[1] + 7 + Offset_X - Character_Bounds[0], Bounds[2] + Offset_Y, 128, 128, 128, 255, Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
Write_Character = 0;
|
|
||||||
|
|
||||||
Offset_X += Character_Bounds[1] + 1;
|
Offset_X += Character_Bounds[1] + 1;
|
||||||
|
|
||||||
Character_Number += 1;
|
Character_Number += 1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
void __thiscall Perform_Shove_Trace(void* Stack)
|
void __thiscall Perform_Shove_Trace(void* Stack)
|
||||||
{
|
{
|
||||||
void* Entity = *(void**)((unsigned __int32)Stack - 276);
|
void* Entity = *(void**)((unsigned __int32)Stack + 332);
|
||||||
|
|
||||||
if (Entity == Perform_Trace_Target)
|
if (Entity == Perform_Trace_Target)
|
||||||
{
|
{
|
||||||
@ -10,7 +10,7 @@ void __thiscall Perform_Shove_Trace(void* Stack)
|
|||||||
|
|
||||||
void* Original_Perform_Shove_Trace_Caller;
|
void* Original_Perform_Shove_Trace_Caller;
|
||||||
|
|
||||||
void __declspec(naked) Redirected_Perform_Shove_Trace()
|
__attribute__((naked)) void Redirected_Perform_Shove_Trace()
|
||||||
{
|
{
|
||||||
asm("leal -304(%ebp), %eax");
|
asm("leal -304(%ebp), %eax");
|
||||||
asm("pushl %eax");
|
asm("pushl %eax");
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
void* Perform_Trace_Target;
|
void* Perform_Trace_Target;
|
||||||
|
|
||||||
|
float* Get_Center(void* Entity)
|
||||||
|
{
|
||||||
|
using Get_Center_Type = float*(__thiscall*)(void* Entity);
|
||||||
|
|
||||||
|
return Get_Center_Type((unsigned __int32)Client_Module + 114400)(Entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
float Perform_Trace_Damage;
|
||||||
|
|
||||||
float Vector_Normalize(float* Vector)
|
float Vector_Normalize(float* Vector)
|
||||||
{
|
{
|
||||||
using Vector_Normalize_Type = float(__thiscall*)(float* Vector);
|
using Vector_Normalize_Type = float(__thiscall*)(float* Vector);
|
||||||
|
|
||||||
return Vector_Normalize_Type((unsigned __int32)Client_Module + 3536176)(Vector);
|
return Vector_Normalize_Type((unsigned __int32)Client_Module + 3536192)(Vector);
|
||||||
};
|
};
|
||||||
|
|
||||||
void Angle_Vectors(float* Angles, float* Forward, float* Right, float* Up)
|
void Angle_Vectors(float* Angles, float* Forward, float* Right, float* Up)
|
||||||
{
|
{
|
||||||
using Angle_Vectors_Type = void(__cdecl*)(float* Angles, float* Forward, float* Right, float* Up);
|
using Angle_Vectors_Type = void(__cdecl*)(float* Angles, float* Forward, float* Right, float* Up);
|
||||||
|
|
||||||
Angle_Vectors_Type((unsigned __int32)Client_Module + 3539376)(Angles, Forward, Right, Up);
|
Angle_Vectors_Type((unsigned __int32)Client_Module + 3539392)(Angles, Forward, Right, Up);
|
||||||
};
|
};
|
||||||
|
|
||||||
float Perform_Trace_Damage;
|
|
||||||
|
|
||||||
void __thiscall Perform_Trace(void* Stack)
|
void __thiscall Perform_Trace(void* Stack)
|
||||||
{
|
{
|
||||||
void* Entity = *(void**)((unsigned __int32)Stack + 312);
|
void* Entity = *(void**)((unsigned __int32)Stack + 312);
|
||||||
@ -30,6 +37,10 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
|
|
||||||
if (*(__int32*)((unsigned __int32)Entity + 228) == *(__int32*)((unsigned __int32)Local_Player + 228))
|
if (*(__int32*)((unsigned __int32)Entity + 228) == *(__int32*)((unsigned __int32)Local_Player + 228))
|
||||||
{
|
{
|
||||||
|
Perform_Trace_Target = nullptr;
|
||||||
|
|
||||||
|
Perform_Trace_Damage = 0.f;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,13 +72,13 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
{
|
{
|
||||||
if (Interface_Penetration_Damage.Integer == 0)
|
if (Interface_Penetration_Damage.Integer == 0)
|
||||||
{
|
{
|
||||||
Perform_Trace_Damage = 1;
|
Perform_Trace_Damage = 1.f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
float* Start = (float*)((unsigned __int32)Stack + 236);
|
float* Start = (float*)((unsigned __int32)Stack + 236);
|
||||||
|
|
||||||
float Distance = __builtin_sqrtf(__builtin_powf(End[0] - Start[0], 2) + __builtin_powf(End[1] - Start[1], 2) + __builtin_powf(End[2] - Start[2], 2));
|
float Distance = __builtin_sqrtf(__builtin_powf(End[0] - Start[0], 2.f) + __builtin_powf(End[1] - Start[1], 2.f) + __builtin_powf(End[2] - Start[2], 2.f));
|
||||||
|
|
||||||
float Damage;
|
float Damage;
|
||||||
|
|
||||||
@ -95,7 +106,7 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
{
|
{
|
||||||
using Get_Difficulty_Type = __int32(__cdecl*)();
|
using Get_Difficulty_Type = __int32(__cdecl*)();
|
||||||
|
|
||||||
float Multipliers[3] = { 0.8f, 0.7f, 0.6f };
|
static float Multipliers[3] = { 0.8f, 0.7f, 0.6f };
|
||||||
|
|
||||||
Damage *= Multipliers[Get_Difficulty_Type((unsigned __int32)Client_Module + 2650448)()];
|
Damage *= Multipliers[Get_Difficulty_Type((unsigned __int32)Client_Module + 2650448)()];
|
||||||
};
|
};
|
||||||
@ -119,13 +130,11 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
{
|
{
|
||||||
using Get_Bounds_Type = void(__thiscall*)(void* Collision, float* Start, float* Bounds);
|
using Get_Bounds_Type = void(__thiscall*)(void* Collision, float* Start, float* Bounds);
|
||||||
|
|
||||||
using Get_Center_Type = float* (__thiscall*)(void* Entity);
|
|
||||||
|
|
||||||
void* Local_Player = *(void**)Trace_Information;
|
void* Local_Player = *(void**)Trace_Information;
|
||||||
|
|
||||||
float Bounds[3];
|
float Bounds[3];
|
||||||
|
|
||||||
Get_Bounds_Type((unsigned __int32)Client_Module + 878528)((void*)((unsigned __int32)Entity + 540), Get_Center_Type((unsigned __int32)Client_Module + 114400)(Local_Player), Bounds);
|
Get_Bounds_Type((unsigned __int32)Client_Module + 878528)((void*)((unsigned __int32)Entity + 540), Get_Center(Local_Player), Bounds);
|
||||||
|
|
||||||
using Calculate_Distance_Type = float(__thiscall*)(void* Collision, float* Bounds);
|
using Calculate_Distance_Type = float(__thiscall*)(void* Collision, float* Bounds);
|
||||||
|
|
||||||
@ -133,20 +142,15 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
|
|
||||||
if (Distance < 100)
|
if (Distance < 100)
|
||||||
{
|
{
|
||||||
Damage += 4.f * Damage * __builtin_powf(1.f - Distance / 100.f, 2);
|
Damage += 4.f * Damage * __builtin_powf(1.f - Distance / 100.f, 2.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Identifier == 277)
|
if (Identifier == 13)
|
||||||
{
|
{
|
||||||
if (Group != 1)
|
Damage *= *(float*)((unsigned __int32)Entity + 336) - *(float*)((unsigned __int32)Entity + 472) >= 0.5f;
|
||||||
{
|
|
||||||
Apply_Difficulty_Scaling();
|
|
||||||
}
|
|
||||||
|
|
||||||
Apply_Shotgun_Scaling();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -223,7 +227,16 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Identifier != 13)
|
if (Identifier == 277)
|
||||||
|
{
|
||||||
|
if (Group != 1)
|
||||||
|
{
|
||||||
|
Apply_Difficulty_Scaling();
|
||||||
|
}
|
||||||
|
|
||||||
|
Apply_Shotgun_Scaling();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (Identifier + Bullet_Type == 284)
|
if (Identifier + Bullet_Type == 284)
|
||||||
{
|
{
|
||||||
@ -232,9 +245,9 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
|
|
||||||
if ((Identifier != 276) + (Upgrade_Type != 1) == 2)
|
if ((Identifier != 276) + (Upgrade_Type != 1) == 2)
|
||||||
{
|
{
|
||||||
float Multipliers[8] = { 1.f, 4.f, 1.f, 1.25f, 1.f, 1.f, 0.75f, 0.75f };
|
static float Multipliers[8] = { 1.f, 4.f, 1.f, 1.25f, 1.f, 1.f, 0.75f, 0.75f };
|
||||||
|
|
||||||
Damage *= Multipliers[Group];
|
Damage *= min(Multipliers[Group], 4.f - 2.75f * Is_Shotgun);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Get_Identifier(Entity, 1, 0) == 99)
|
if (Get_Identifier(Entity, 1, 0) == 99)
|
||||||
@ -272,6 +285,14 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
{
|
{
|
||||||
Damage = (__int32)(Damage + 1.f * (Damage < 1));
|
Damage = (__int32)(Damage + 1.f * (Damage < 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Identifier == 276)
|
||||||
|
{
|
||||||
|
if (__builtin_strstr(Get_Sequence_Name(Entity), "limb") != nullptr)
|
||||||
|
{
|
||||||
|
Damage = min(Damage, *(__int32*)((unsigned __int32)Entity + 236) - 1.f);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,13 +301,11 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Upgrade_Type + Gender == 17)
|
if ((Upgrade_Type == 2) + (Gender == 15) == 2)
|
||||||
{
|
{
|
||||||
float Inflictor_Direction[3];
|
float Inflictor_Direction[3];
|
||||||
|
|
||||||
using Get_Center_Type = float*(__thiscall*)(void* Entity);
|
float* Start = Get_Center(*(void**)Trace_Information);
|
||||||
|
|
||||||
float* Start = Get_Center_Type((unsigned __int32)Client_Module + 114400)(*(void**)Trace_Information);
|
|
||||||
|
|
||||||
Inflictor_Direction[0] = End[0] - Start[0];
|
Inflictor_Direction[0] = End[0] - Start[0];
|
||||||
|
|
||||||
@ -308,7 +327,7 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
|
|
||||||
Angle_Vectors(Angle, Victim_Direction, nullptr, nullptr);
|
Angle_Vectors(Angle, Victim_Direction, nullptr, nullptr);
|
||||||
|
|
||||||
if (Inflictor_Direction[0] * Victim_Direction[0] + Inflictor_Direction[1] * Victim_Direction[1] + Inflictor_Direction[2] * Victim_Direction[2] >= 0)
|
if (Inflictor_Direction[0] * Victim_Direction[0] + Inflictor_Direction[1] * Victim_Direction[1] + Inflictor_Direction[2] * Victim_Direction[2] >= 0.f)
|
||||||
{
|
{
|
||||||
Compute_Damage();
|
Compute_Damage();
|
||||||
}
|
}
|
||||||
@ -322,7 +341,7 @@ void __thiscall Perform_Trace(void* Stack)
|
|||||||
|
|
||||||
void* Original_Perform_Trace_Caller;
|
void* Original_Perform_Trace_Caller;
|
||||||
|
|
||||||
void __declspec(naked) Redirected_Perform_Trace()
|
__attribute__((naked)) void Redirected_Perform_Trace()
|
||||||
{
|
{
|
||||||
asm("pushal");
|
asm("pushal");
|
||||||
asm("movl %esp, %ecx");
|
asm("movl %esp, %ecx");
|
||||||
|
@ -1,22 +1,3 @@
|
|||||||
struct Prediction_Field_Structure
|
|
||||||
{
|
|
||||||
__int32 Type;
|
|
||||||
|
|
||||||
char* Name;
|
|
||||||
|
|
||||||
__int32 Offset;
|
|
||||||
|
|
||||||
unsigned __int16 Size;
|
|
||||||
|
|
||||||
__int8 Additionals_Bytes_1[18];
|
|
||||||
|
|
||||||
__int32 Bytes;
|
|
||||||
|
|
||||||
__int8 Additionals_Bytes_2[12];
|
|
||||||
|
|
||||||
__int32 Flat_Offset[2];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Prediction_Copy_Structure
|
struct Prediction_Copy_Structure
|
||||||
{
|
{
|
||||||
__int8 Additionals_Bytes_1[8];
|
__int8 Additionals_Bytes_1[8];
|
||||||
@ -37,17 +18,37 @@ struct Prediction_Copy_Structure
|
|||||||
|
|
||||||
Prediction_Copy_Structure Predicton_Copy;
|
Prediction_Copy_Structure Predicton_Copy;
|
||||||
|
|
||||||
|
struct Prediction_Field_Structure
|
||||||
|
{
|
||||||
|
__int32 Type;
|
||||||
|
|
||||||
|
char* Name;
|
||||||
|
|
||||||
|
__int32 Offset;
|
||||||
|
|
||||||
|
unsigned __int16 Size;
|
||||||
|
|
||||||
|
__int8 Additionals_Bytes_1[18];
|
||||||
|
|
||||||
|
__int32 Bytes;
|
||||||
|
|
||||||
|
__int8 Additionals_Bytes_2[12];
|
||||||
|
|
||||||
|
__int32 Flat_Offset[2];
|
||||||
|
|
||||||
|
__int8 Additionals_Bytes_3[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
__int8 Consistent_Time;
|
||||||
|
|
||||||
void Predicton_Copy_Compare(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, void* Unknown_Parameter_4, void* Unknown_Parameter_5, void* Unknown_Parameter_6, __int8 Within_Tolerance, void* Unknown_Parameter_7)
|
void Predicton_Copy_Compare(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, void* Unknown_Parameter_4, void* Unknown_Parameter_5, void* Unknown_Parameter_6, __int8 Within_Tolerance, void* Unknown_Parameter_7)
|
||||||
{
|
{
|
||||||
Prediction_Field_Structure* Field = *(Prediction_Field_Structure**)((unsigned __int32)__builtin_frame_address(0) + 60);
|
Prediction_Field_Structure* Field = *(Prediction_Field_Structure**)((unsigned __int32)__builtin_frame_address(0) + 60);
|
||||||
|
|
||||||
if (Field->Flat_Offset[0] == 5324)
|
if (Field->Flat_Offset[0] * Consistent_Time == 5324)
|
||||||
{
|
|
||||||
if (*(__int32*)((unsigned __int32)Predicton_Copy.Destination + 20) != 0)
|
|
||||||
{
|
{
|
||||||
goto Copy_Label;
|
goto Copy_Label;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Within_Tolerance == 1)
|
if (Within_Tolerance == 1)
|
||||||
{
|
{
|
||||||
@ -55,7 +56,7 @@ void Predicton_Copy_Compare(void* Unknown_Parameter_1, void* Unknown_Parameter_2
|
|||||||
{
|
{
|
||||||
Copy_Label:
|
Copy_Label:
|
||||||
{
|
{
|
||||||
Byte_Manager::Copy_Bytes(0, (void*)((unsigned __int32)Predicton_Copy.Destination + Field->Flat_Offset[0]), Field->Bytes, (void*)((unsigned __int32)Predicton_Copy.Source + Field->Flat_Offset[1]));
|
Byte_Manager::Copy_Bytes(1, (void*)((unsigned __int32)Predicton_Copy.Destination + Field->Flat_Offset[0]), Field->Bytes, (void*)((unsigned __int32)Predicton_Copy.Source + Field->Flat_Offset[1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,7 +72,7 @@ struct Prediction_Descriptor_Structure
|
|||||||
|
|
||||||
Prediction_Descriptor_Structure* Parent;
|
Prediction_Descriptor_Structure* Parent;
|
||||||
|
|
||||||
__int8 Additional_Bytes_2[6];
|
__int8 Additional_Bytes_2[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
void* Original_Post_Network_Data_Received_Caller;
|
void* Original_Post_Network_Data_Received_Caller;
|
||||||
@ -80,11 +81,11 @@ void __thiscall Redirected_Post_Network_Data_Received(void* Unknown_Parameter, _
|
|||||||
{
|
{
|
||||||
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
void* Local_Player = *(void**)((unsigned __int32)Client_Module + 7498712);
|
||||||
|
|
||||||
void* Result = *(void**)((unsigned __int32)Local_Player + 900 + (150 - ((Commands_Acknowledged - 1) % 150 + 1) * 150 % -~150) * 4);
|
void* Prediction_Frame = *(void**)((unsigned __int32)Local_Player + 900 + (150 - ((Commands_Acknowledged - 1) % 150 + 1) * 150 % -~150) * 4);
|
||||||
|
|
||||||
if (Result != nullptr)
|
if (Prediction_Frame != nullptr)
|
||||||
{
|
{
|
||||||
Predicton_Copy.Construct(Local_Player, Result, (void*)Predicton_Copy_Compare);
|
Predicton_Copy.Construct(Local_Player, Prediction_Frame, (void*)Predicton_Copy_Compare);
|
||||||
|
|
||||||
using Transfer_Data_Type = __int32(__thiscall*)(Prediction_Copy_Structure* Prediction_Copy, void* Unknown_Parameter, __int32 Entity_Number, Prediction_Descriptor_Structure* Descriptor);
|
using Transfer_Data_Type = __int32(__thiscall*)(Prediction_Copy_Structure* Prediction_Copy, void* Unknown_Parameter, __int32 Entity_Number, Prediction_Descriptor_Structure* Descriptor);
|
||||||
|
|
||||||
|
@ -2,31 +2,24 @@ void* Original_Process_Movement_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Player, void* Move_Data)
|
void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Player, void* Move_Data)
|
||||||
{
|
{
|
||||||
__int32 Stunned = *(__int32*)((unsigned __int32)Player + 20);
|
if (*(__int32*)((unsigned __int32)Player + 5324) < 0)
|
||||||
|
|
||||||
if (Stunned == 2)
|
|
||||||
{
|
{
|
||||||
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
|
||||||
|
|
||||||
Global_Variables->Current_Time *= -1;
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Move_Data + 36) &= ~1564;
|
*(__int32*)((unsigned __int32)Move_Data + 36) &= ~1564;
|
||||||
|
|
||||||
if (*(__int8*)((unsigned __int32)Player + 4636) == 1)
|
*(__int32*)((unsigned __int32)Move_Data + 36) |= 4 * *(__int8*)((unsigned __int32)Player + 4636);
|
||||||
{
|
|
||||||
*(__int32*)((unsigned __int32)Move_Data + 36) |= 4;
|
*(double*)((unsigned __int32)Move_Data + 44) = 0.;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Move_Data + 44) = 0;
|
|
||||||
|
|
||||||
*(float*)((unsigned __int32)Move_Data + 48) = 0;
|
|
||||||
|
|
||||||
(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);
|
||||||
|
|
||||||
Global_Variables->Current_Time *= -1;
|
if (Get_Identifier(Player, 0, 0) == 272)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
(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 (Ability != nullptr)
|
||||||
|
{
|
||||||
|
*(float*)((unsigned __int32)Ability + 1636) = 0.f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
to achieve least interpolation time: `cl_updaterate -1;cl_interp_ratio 0;cl_interp 0`\
|
to achieve least (aligned) interpolation time: `cl_updaterate 30;cl_interp_ratio 0;cl_interp 0`\
|
||||||
to queue extra commands: `bind key +zoom`
|
to queue extra commands: `bind key +zoom`
|
||||||
```
|
```
|
||||||
code: https://github.com/qwertyuiop3/Storm
|
code: https://github.com/qwertyuiop3/Storm
|
||||||
|
@ -9,5 +9,5 @@ void Redirected_Read_Packets(__int8 Final)
|
|||||||
(decltype(&Redirected_Read_Packets)(Original_Read_Packets_Caller))(Final);
|
(decltype(&Redirected_Read_Packets)(Original_Read_Packets_Caller))(Final);
|
||||||
}
|
}
|
||||||
|
|
||||||
Parsed_Packets = __builtin_return_address(0) != (void*)((unsigned __int32)Engine_Module + 1631551);
|
Parsed_Packets = __builtin_return_address(0) != (void*)((unsigned __int32)Engine_Module + 1631183);
|
||||||
}
|
}
|
@ -1,6 +1,30 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
namespace Redirection_Manager
|
namespace Redirection_Manager
|
||||||
{
|
{
|
||||||
#include "Redirection_Manager_Functions.hpp"
|
void Redirect_Function(void* Original_Function, void* Redirected_Function)
|
||||||
|
{
|
||||||
|
DWORD Previous_Access_Rights;
|
||||||
|
|
||||||
|
VirtualProtect(Original_Function, 6, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
||||||
|
|
||||||
|
*(__int8*)Original_Function = 104;
|
||||||
|
|
||||||
|
*(void**)((unsigned __int32)Original_Function + 1) = Redirected_Function;
|
||||||
|
|
||||||
|
*(unsigned __int8*)((unsigned __int32)Original_Function + 5) = 195;
|
||||||
|
|
||||||
|
VirtualProtect(Original_Function, 6, Previous_Access_Rights, &Previous_Access_Rights);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* Redirect_Function(unsigned __int32 Offset, void* Original_Function, void* Redirected_Function)
|
||||||
|
{
|
||||||
|
void* Original_Function_Caller = VirtualAlloc(nullptr, 12 + Offset, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
|
||||||
|
|
||||||
|
__builtin_memcpy(Original_Function_Caller, Original_Function, 6 + Offset);
|
||||||
|
|
||||||
|
Redirect_Function((void*)((unsigned __int32)Original_Function_Caller + 6 + Offset), (void*)((unsigned __int32)Original_Function + 6 + Offset));
|
||||||
|
|
||||||
|
Redirect_Function(Original_Function, Redirected_Function);
|
||||||
|
|
||||||
|
return Original_Function_Caller;
|
||||||
|
}
|
||||||
};
|
};
|
@ -1,30 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void* Copy_Table(void* Table_Location)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
unsigned __int32 Functions_Count = 0;
|
|
||||||
#else
|
|
||||||
unsigned __int64 Functions_Count = 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Take_Function_Into_Account_Label:
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
if (*(void**)((unsigned __int32)Table_Location + Functions_Count) != nullptr)
|
|
||||||
#else
|
|
||||||
if (*(void**)((unsigned __int64)Table_Location + Functions_Count) != nullptr)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
Functions_Count += sizeof(void*);
|
|
||||||
|
|
||||||
goto Take_Function_Into_Account_Label;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void* Copied_Table_Location = malloc(Functions_Count);
|
|
||||||
|
|
||||||
__builtin_memcpy(Copied_Table_Location, Table_Location, Functions_Count);
|
|
||||||
|
|
||||||
return Copied_Table_Location;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Redirect_Function.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Restore_Function.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Restore_Redirection.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Copy_Table.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Redirect_Function_In_Table.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Redirect_Table.hpp"
|
|
||||||
|
|
||||||
#include "Redirection_Manager_Restore_Table.hpp"
|
|
@ -1,125 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Redirect_Function(__int8 Modify_Access_Rights, void* Original_Function_Location, void* Redirected_Function_Location)
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
*(__int8*)Original_Function_Location = 104;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Original_Function_Location + 1) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int32)Original_Function_Location + 5) = 195;
|
|
||||||
#else
|
|
||||||
*(__int8*)Original_Function_Location = 80;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int64)Original_Function_Location + 1) = 47176;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Location + 3) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int64)Original_Function_Location + 11) = 604276552;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int64)Original_Function_Location + 15) = 195;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
void Redirect_Function(void*& Original_Function_Caller_Location, unsigned __int32 Original_Function_Caller_Offset, void* Original_Function_Location, __int8 Modify_Access_Rights, void* Redirected_Function_Location)
|
|
||||||
#else
|
|
||||||
void Redirect_Function(void*& Original_Function_Caller_Location, unsigned __int64 Original_Function_Caller_Offset, void* Original_Function_Location, __int8 Modify_Access_Rights, void* Redirected_Function_Location)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
Original_Function_Caller_Location = malloc(12 + Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(void**)Original_Function_Caller_Location = *(void**)Original_Function_Location;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int32)Original_Function_Caller_Location + 4) = *(unsigned __int16*)((unsigned __int32)Original_Function_Location + 4);
|
|
||||||
|
|
||||||
__builtin_memcpy((void*)((unsigned __int32)Original_Function_Caller_Location + 6), (void*)((unsigned __int32)Original_Function_Location + 6), Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(__int8*)((unsigned __int32)Original_Function_Caller_Location + 6 + Original_Function_Caller_Offset) = 104;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Original_Function_Caller_Location + 7 + Original_Function_Caller_Offset) = (void*)((unsigned __int32)Original_Function_Location + 6 + Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int32)Original_Function_Caller_Location + 11 + Original_Function_Caller_Offset) = 195;
|
|
||||||
|
|
||||||
VirtualProtect(Original_Function_Caller_Location, 12 + Original_Function_Caller_Offset, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
Original_Function_Caller_Location = malloc(32 + Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(void**)Original_Function_Caller_Location = *(void**)Original_Function_Location;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Caller_Location + 8) = *(void**)((unsigned __int64)Original_Function_Location + 8);
|
|
||||||
|
|
||||||
__builtin_memcpy((void*)((unsigned __int64)Original_Function_Caller_Location + 16), (void*)((unsigned __int64)Original_Function_Location + 16), Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(__int8*)((unsigned __int64)Original_Function_Caller_Location + 16 + Original_Function_Caller_Offset) = 80;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int64)Original_Function_Caller_Location + 17 + Original_Function_Caller_Offset) = 47176;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Caller_Location + 19 + Original_Function_Caller_Offset) = (void*)((unsigned __int64)Original_Function_Location + 16 + Original_Function_Caller_Offset);
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int64)Original_Function_Caller_Location + 27 + Original_Function_Caller_Offset) = 604276552;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int64)Original_Function_Caller_Location + 31 + Original_Function_Caller_Offset) = 195;
|
|
||||||
|
|
||||||
VirtualProtect(Original_Function_Caller_Location, 32 + Original_Function_Caller_Offset, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
*(__int8*)Original_Function_Location = 104;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Original_Function_Location + 1) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int32)Original_Function_Location + 5) = 195;
|
|
||||||
#else
|
|
||||||
*(__int8*)Original_Function_Location = 80;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int64)Original_Function_Location + 1) = 47176;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Location + 3) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int64)Original_Function_Location + 11) = 604276552;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int64)Original_Function_Location + 15) = 195;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Redirect_Function_In_Table(__int8 Modify_Access_Rights, void* Original_Function_In_Table_Location, void* Redirected_Function_Location)
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Original_Function_In_Table_Location, sizeof(void*), PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
|
|
||||||
*(void**)Original_Function_In_Table_Location = Redirected_Function_Location;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
VirtualProtect(Original_Function_In_Table_Location, sizeof(void*), Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Redirect_Table(void* Original_Table_Container_Location, void* Redirected_Table_Location)
|
|
||||||
{
|
|
||||||
*(void**)Original_Table_Container_Location = Redirected_Table_Location;
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Restore_Function(__int8 Modify_Access_Rights, void* Original_Function_Location, void* Original_Function_Caller_Location, __int8 Delete_Original_Function_Caller)
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
*(void**)Original_Function_Location = *(void**)Original_Function_Caller_Location;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int32)Original_Function_Location + 4) = *(unsigned __int16*)((unsigned __int32)Original_Function_Caller_Location + 4);
|
|
||||||
#else
|
|
||||||
*(void**)Original_Function_Location = *(void**)Original_Function_Caller_Location;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Location + 8) = *(void**)((unsigned __int64)Original_Function_Caller_Location + 8);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Delete_Original_Function_Caller == 1)
|
|
||||||
{
|
|
||||||
free(Original_Function_Caller_Location);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Restore_Redirection(__int8 Modify_Access_Rights, void* Original_Function_Location, void* Redirected_Function_Location)
|
|
||||||
{
|
|
||||||
unsigned long __int32 Previous_Access_Rights;
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, PAGE_EXECUTE_READWRITE, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef Bits_32
|
|
||||||
*(__int8*)Original_Function_Location = 104;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Original_Function_Location + 1) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int32)Original_Function_Location + 5) = 195;
|
|
||||||
#else
|
|
||||||
*(__int8*)Original_Function_Location = 80;
|
|
||||||
|
|
||||||
*(unsigned __int16*)((unsigned __int64)Original_Function_Location + 1) = 47176;
|
|
||||||
|
|
||||||
*(void**)((unsigned __int64)Original_Function_Location + 3) = Redirected_Function_Location;
|
|
||||||
|
|
||||||
*(__int32*)((unsigned __int64)Original_Function_Location + 11) = 604276552;
|
|
||||||
|
|
||||||
*(unsigned __int8*)((unsigned __int64)Original_Function_Location + 15) = 195;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (Modify_Access_Rights == 1)
|
|
||||||
{
|
|
||||||
#ifdef Bits_32
|
|
||||||
VirtualProtect(Original_Function_Location, 6, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#else
|
|
||||||
VirtualProtect(Original_Function_Location, 16, Previous_Access_Rights, &Previous_Access_Rights);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
void Restore_Table(void* Original_Table_Container_Location, void* Original_Table_Location, __int8 Delete_Redirected_Table, void* Redirected_Table_Location)
|
|
||||||
{
|
|
||||||
*(void**)Original_Table_Container_Location = Original_Table_Location;
|
|
||||||
|
|
||||||
if (Delete_Redirected_Table == 1)
|
|
||||||
{
|
|
||||||
free(Redirected_Table_Location);
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,9 +8,7 @@ struct Command_Structure
|
|||||||
|
|
||||||
float Angles[3];
|
float Angles[3];
|
||||||
|
|
||||||
float Move[2];
|
float Move[3];
|
||||||
|
|
||||||
__int32 Frame_Number;
|
|
||||||
|
|
||||||
__int32 Buttons;
|
__int32 Buttons;
|
||||||
|
|
||||||
@ -22,17 +20,28 @@ struct Command_Structure
|
|||||||
struct Extended_Command_Structure
|
struct Extended_Command_Structure
|
||||||
{
|
{
|
||||||
__int32 Extra_Commands;
|
__int32 Extra_Commands;
|
||||||
|
|
||||||
|
__int32 Sequence_Shift;
|
||||||
};
|
};
|
||||||
|
|
||||||
Extended_Command_Structure Extended_Commands[150];
|
Extended_Command_Structure Extended_Commands[150];
|
||||||
|
|
||||||
void* Original_Run_Command_Caller;
|
void* Original_Run_Command_Caller;
|
||||||
|
|
||||||
void __thiscall Redirected_Run_Command(void* Prediction, void* Player, Command_Structure* Command, void* Unknown_Parameter)
|
void __thiscall Redirected_Run_Command(void* Prediction, void* Player, Command_Structure* Command, void* Move_Helper)
|
||||||
{
|
{
|
||||||
Extended_Command_Structure* Extended_Command = &Extended_Commands[Command->Frame_Number];
|
Extended_Command_Structure* Extended_Command = &Extended_Commands[*(__int32*)((unsigned __int32)Player + 5620) % 150];
|
||||||
|
|
||||||
*(__int32*)((unsigned __int32)Player + 5324) -= Extended_Command->Extra_Commands;
|
*(__int32*)((unsigned __int32)Player + 5324) -= Extended_Command->Extra_Commands + Extended_Command->Sequence_Shift;
|
||||||
|
|
||||||
(decltype(&Redirected_Run_Command)(Original_Run_Command_Caller))(Prediction, Player, Command, Unknown_Parameter);
|
(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;
|
||||||
|
}
|
||||||
}
|
}
|
@ -6,9 +6,9 @@ void Redirected_Send_Move()
|
|||||||
|
|
||||||
void Construct(__int8* Data, unsigned __int32 Size)
|
void Construct(__int8* Data, unsigned __int32 Size)
|
||||||
{
|
{
|
||||||
Byte_Manager::Set_Bytes(0, Message, sizeof(Message), 0);
|
Byte_Manager::Set_Bytes(1, Message, sizeof(Message), 0);
|
||||||
|
|
||||||
*(void**)Message = (void*)((unsigned __int32)Engine_Module + 3501348);
|
*(void**)Message = (void*)((unsigned __int32)Engine_Module + 3501364);
|
||||||
|
|
||||||
*(void**)((unsigned __int32)Message + 132) = Data;
|
*(void**)((unsigned __int32)Message + 132) = Data;
|
||||||
|
|
||||||
@ -62,9 +62,12 @@ 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);
|
||||||
|
|
||||||
|
if (*(__int32*)((unsigned __int32)Network_Channel + 16) != -1)
|
||||||
|
{
|
||||||
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
*(__int32*)((unsigned __int32)Network_Channel + 28) -= Extra_Commands_Queue;
|
||||||
|
}
|
||||||
using Send_Network_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);
|
||||||
(*Send_Network_Message_Type(*(unsigned __int32*)Network_Channel + 164))(Network_Channel, &Message, nullptr, nullptr);
|
|
||||||
|
(*Send_Message_Type(*(unsigned __int32*)Network_Channel + 164))(Network_Channel, &Message, nullptr, nullptr);
|
||||||
}
|
}
|
11
Set_Move_Type.hpp
Normal file
11
Set_Move_Type.hpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
void Redirected_Set_Move_Type(void* Input, void* Output)
|
||||||
|
{
|
||||||
|
if (*(__int8*)((unsigned __int32)Output + 324) == 0)
|
||||||
|
{
|
||||||
|
*(float*)((unsigned __int32)Output + 472) = *(float*)((unsigned __int32)Output + 336);
|
||||||
|
}
|
||||||
|
|
||||||
|
*(__int8*)((unsigned __int32)Output + 324) = *(__int8*)((unsigned __int32)Input + 4);
|
||||||
|
|
||||||
|
*(__int8*)((unsigned __int32)Output + 325) = 0;
|
||||||
|
}
|
@ -6,20 +6,20 @@ void __thiscall Redirected_Spawn_Grenade(void* Entity)
|
|||||||
|
|
||||||
float Minimum[3] =
|
float Minimum[3] =
|
||||||
{
|
{
|
||||||
-16,
|
-16.f,
|
||||||
|
|
||||||
-16,
|
-16.f,
|
||||||
|
|
||||||
-16
|
-16.f
|
||||||
};
|
};
|
||||||
|
|
||||||
float Maximum[3] =
|
float Maximum[3] =
|
||||||
{
|
{
|
||||||
16,
|
16.f,
|
||||||
|
|
||||||
16,
|
16.f,
|
||||||
|
|
||||||
16
|
16.f
|
||||||
};
|
};
|
||||||
|
|
||||||
Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);
|
Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Calculate_View.hpp" />
|
<ClInclude Include="Calculate_View.hpp" />
|
||||||
<ClInclude Include="Process_Movement.hpp" />
|
<ClInclude Include="Process_Movement.hpp" />
|
||||||
|
<ClInclude Include="Set_Move_Type.hpp" />
|
||||||
<ClInclude Include="Update.hpp" />
|
<ClInclude Include="Update.hpp" />
|
||||||
<ClInclude Include="Send_Move.hpp" />
|
<ClInclude Include="Send_Move.hpp" />
|
||||||
<ClInclude Include="Spawn_Grenade.hpp" />
|
<ClInclude Include="Spawn_Grenade.hpp" />
|
||||||
|
@ -88,5 +88,8 @@
|
|||||||
<ClInclude Include="Update_Animations.hpp">
|
<ClInclude Include="Update_Animations.hpp">
|
||||||
<Filter>Header++</Filter>
|
<Filter>Header++</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Set_Move_Type.hpp">
|
||||||
|
<Filter>Header++</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -2,5 +2,7 @@ void* Original_Update_Caller;
|
|||||||
|
|
||||||
void __thiscall Redirected_Update(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, __int32 Incoming_Sequence_Number, int Outgoing_Sequence_Number)
|
void __thiscall Redirected_Update(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, __int32 Incoming_Sequence_Number, int Outgoing_Sequence_Number)
|
||||||
{
|
{
|
||||||
|
Consistent_Time = Outgoing_Sequence_Number - Incoming_Sequence_Number > 150;
|
||||||
|
|
||||||
(decltype(&Redirected_Update)(Original_Update_Caller))(Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Incoming_Sequence_Number, Incoming_Sequence_Number + (Outgoing_Sequence_Number - Incoming_Sequence_Number) % 150);
|
(decltype(&Redirected_Update)(Original_Update_Caller))(Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Incoming_Sequence_Number, Incoming_Sequence_Number + (Outgoing_Sequence_Number - Incoming_Sequence_Number) % 150);
|
||||||
}
|
}
|
@ -1,8 +1,21 @@
|
|||||||
|
struct Global_Variables_Structure
|
||||||
|
{
|
||||||
|
__int8 Additional_Bytes_1[12];
|
||||||
|
|
||||||
|
float Current_Time;
|
||||||
|
|
||||||
|
float Frame_Time;
|
||||||
|
|
||||||
|
__int8 Additional_Bytes_2[8];
|
||||||
|
|
||||||
|
float Interval_Per_Tick;
|
||||||
|
};
|
||||||
|
|
||||||
float Update_Animation_Time;
|
float Update_Animation_Time;
|
||||||
|
|
||||||
__int8 Update_Animation_Type;
|
__int8 Update_Animation_Type;
|
||||||
|
|
||||||
void __cdecl 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);
|
||||||
|
|
||||||
|
@ -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