mirror of
https://github.com/qwertyuiop3/Storm.git
synced 2025-09-19 20:16:15 +08:00
Compare commits
1 Commits
master
...
04.02.2025
Author | SHA1 | Date | |
---|---|---|---|
1136c1d430 |
@ -4,5 +4,7 @@ void __thiscall Redirected_Calculate_View(void* Player, void* Unknown_Parameter_
|
||||
{
|
||||
(decltype(&Redirected_Calculate_View)(Original_Calculate_View_Caller))(Player, Unknown_Parameter_1, Angles, Unknown_Parameter_2);
|
||||
|
||||
Byte_Manager::Copy_Bytes(1, Angles, sizeof(float[3]), (float*)((unsigned __int32)Player + 4996));
|
||||
using Get_Eye_Angles_Type = float*(__thiscall*)(void* Entity);
|
||||
|
||||
Byte_Manager::Copy_Bytes(1, Angles, sizeof(float[3]), Get_Eye_Angles_Type((unsigned __int32)Client_Module + 2237296)(Player));
|
||||
}
|
130
Copy_Command.hpp
130
Copy_Command.hpp
@ -22,7 +22,7 @@ void* Get_Studio_Header(void* Entity)
|
||||
|
||||
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 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)
|
||||
{
|
||||
@ -93,7 +93,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
if ((Command->Buttons & 2) + *(__int8*)((unsigned __int32)Local_Player + 324) == 4)
|
||||
{
|
||||
Command->Move[0] = 0.f;
|
||||
Command->Move[0] = 0;
|
||||
|
||||
if (*(void**)((unsigned __int32)Local_Player + 316) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
@ -269,9 +269,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
{
|
||||
if (*(void**)((unsigned __int32)Local_Player + 10008) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if ((*(void**)((unsigned __int32)Local_Player + 10012) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10024) != INVALID_HANDLE_VALUE) + (*(void**)((unsigned __int32)Local_Player + 10056) != INVALID_HANDLE_VALUE) != 0)
|
||||
__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 |= (*(void**)((unsigned __int32)Local_Player + 10056) != INVALID_HANDLE_VALUE) * 2;
|
||||
Command->Buttons |= Is_Jockey_Victim * 2;
|
||||
|
||||
Disable_Clock_Correction(Interface_Extra_Commands_Action.Integer);
|
||||
}
|
||||
@ -339,9 +341,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
if (Can_Attack_Type((unsigned __int32)Client_Module + 2541696)(Local_Player) == 1)
|
||||
{
|
||||
using Get_Weapon_Type = void*(__thiscall*)(void* Entity);
|
||||
|
||||
void* Weapon = *(__int8*)((unsigned __int32)Local_Player + 7867) == 0 ? Get_Weapon_Type((unsigned __int32)Client_Module + 74304)(Local_Player) : 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)
|
||||
{
|
||||
@ -349,7 +349,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
}
|
||||
else
|
||||
{
|
||||
__int8 Cancelable_Shove = 1 + (*(float*)((unsigned __int32)Local_Player + 7336) < Global_Variables->Time) * (*(float*)((unsigned __int32)Weapon + 2404) <= Global_Variables->Time);
|
||||
__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);
|
||||
|
||||
@ -367,9 +367,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
Cancelable_Shove = min(1 + (*(float*)((unsigned __int32)Weapon + 3312) == -1.f), Cancelable_Shove);
|
||||
}
|
||||
|
||||
__int8 In_Shove = Global_Variables->Time >= *(float*)((unsigned __int32)Local_Player + 7904);
|
||||
__int8 In_Shove = Global_Variables->Current_Time >= *(float*)((unsigned __int32)Local_Player + 7904);
|
||||
|
||||
if (Global_Variables->Time >= *(float*)((unsigned __int32)Weapon + 2704))
|
||||
if (Global_Variables->Current_Time >= *(float*)((unsigned __int32)Weapon + 2704))
|
||||
{
|
||||
In_Shove = *(__int8*)((unsigned __int32)Weapon + 2720);
|
||||
}
|
||||
@ -394,11 +394,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
}
|
||||
else
|
||||
{
|
||||
Can_Attack = (*(float*)((unsigned __int32)Weapon + 2400) <= Global_Variables->Time) * (Ammo > 0 - Is_Melee * 2) * (Reloading ^ 1);
|
||||
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->Time;
|
||||
Can_Attack *= *(float*)((unsigned __int32)Weapon + 3400) <= Global_Variables->Current_Time;
|
||||
}
|
||||
}
|
||||
|
||||
@ -480,17 +480,24 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
}
|
||||
}
|
||||
|
||||
auto Target_List_Sort = [](Target_Structure& X, Target_Structure& Y) -> __int8
|
||||
auto Target_List_Sort_Prepare = [](Target_Structure& X, Target_Structure& Y) -> __int8
|
||||
{
|
||||
if (X.Priority == Y.Priority)
|
||||
{
|
||||
return X.Distance < Y.Distance;
|
||||
}
|
||||
|
||||
return X.Priority > Y.Priority;
|
||||
return X.Priority < Y.Priority;
|
||||
};
|
||||
|
||||
std::sort(Sorted_Target_List.begin(), Sorted_Target_List.end(), Target_List_Sort);
|
||||
std::sort(Sorted_Target_List.begin(), Sorted_Target_List.end(), Target_List_Sort_Prepare);
|
||||
|
||||
auto Target_List_Sort_Finish = [](Target_Structure& X, Target_Structure& Y) -> __int8
|
||||
{
|
||||
if (X.Priority > Y.Priority)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return X.Distance < Y.Distance;
|
||||
};
|
||||
|
||||
std::sort(Sorted_Target_List.begin(), Sorted_Target_List.end(), Target_List_Sort_Finish);
|
||||
|
||||
size_t Target_Number = 0;
|
||||
|
||||
@ -531,11 +538,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
using Select_Sequence_Type = __int32(__thiscall*)(void* Entity, __int32 Activity);
|
||||
|
||||
using Translate_Activity_Type = __int32(__thiscall**)(void* Weapon, __int32 Activity);
|
||||
|
||||
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon);
|
||||
|
||||
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->Time) * (Can_Attack ^ 1);
|
||||
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
|
||||
{
|
||||
@ -611,7 +618,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
if (Cancelable_Shove == 1)
|
||||
{
|
||||
float Shove_Multiplier = min((Global_Variables->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.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier);
|
||||
}
|
||||
@ -714,7 +721,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
float Bones[128][3][4];
|
||||
|
||||
void* Hitbox_Set = Get_Hitbox_Set(Target, Bones, Global_Variables->Time);
|
||||
void* Hitbox_Set = Get_Hitbox_Set(Target, Bones, Global_Variables->Current_Time);
|
||||
|
||||
if (Hitbox_Set != nullptr)
|
||||
{
|
||||
@ -724,7 +731,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
__int32 Bullets = *(__int32*)((unsigned __int32)Weapon_Data + 2520);
|
||||
|
||||
if (Interface_Penetration_Damage.Floating_Point == 0.f)
|
||||
if (Interface_Penetration_Damage.Floating_Point == 0)
|
||||
{
|
||||
*(__int32*)((unsigned __int32)Weapon_Data + 2520) = 1;
|
||||
}
|
||||
@ -793,60 +800,57 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
|
||||
|
||||
void* Hitbox = (void*)((unsigned __int32)Hitbox_Set + 12 + Hitboxes[Target->Identifier] * 68);
|
||||
|
||||
if (*(__int32*)Hitbox < sizeof(Bones) / sizeof(Bones[0]))
|
||||
float* Hitbox_Minimum = (float*)((unsigned __int32)Hitbox + 8);
|
||||
|
||||
float* Hitbox_Maximum = (float*)((unsigned __int32)Hitbox + 20);
|
||||
|
||||
float Hitbox_Center[3]
|
||||
{
|
||||
float* Hitbox_Minimum = (float*)((unsigned __int32)Hitbox + 8);
|
||||
(Hitbox_Minimum[0] + Hitbox_Maximum[0]) / 2.f,
|
||||
|
||||
float* Hitbox_Maximum = (float*)((unsigned __int32)Hitbox + 20);
|
||||
(Hitbox_Minimum[1] + Hitbox_Maximum[1]) / 2.f,
|
||||
|
||||
float Hitbox_Center[3]
|
||||
{
|
||||
(Hitbox_Minimum[0] + Hitbox_Maximum[0]) / 2.f,
|
||||
(Hitbox_Minimum[2] + Hitbox_Maximum[2]) / 2.f
|
||||
};
|
||||
|
||||
(Hitbox_Minimum[1] + Hitbox_Maximum[1]) / 2.f,
|
||||
float Target_Origin[3] =
|
||||
{
|
||||
Bones[*(__int32*)Hitbox][0][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][0][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][0][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][0][3],
|
||||
|
||||
(Hitbox_Minimum[2] + Hitbox_Maximum[2]) / 2.f
|
||||
};
|
||||
Bones[*(__int32*)Hitbox][1][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][1][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][1][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][1][3],
|
||||
|
||||
float Target_Origin[3] =
|
||||
{
|
||||
Bones[*(__int32*)Hitbox][0][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][0][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][0][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][0][3],
|
||||
Bones[*(__int32*)Hitbox][2][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][2][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][2][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][2][3]
|
||||
};
|
||||
|
||||
Bones[*(__int32*)Hitbox][1][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][1][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][1][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][1][3],
|
||||
float Direction[3] =
|
||||
{
|
||||
Target_Origin[0] - Eye_Position[0],
|
||||
|
||||
Bones[*(__int32*)Hitbox][2][0] * Hitbox_Center[0] + Bones[*(__int32*)Hitbox][2][1] * Hitbox_Center[1] + Bones[*(__int32*)Hitbox][2][2] * Hitbox_Center[2] + Bones[*(__int32*)Hitbox][2][3]
|
||||
};
|
||||
Target_Origin[1] - Eye_Position[1],
|
||||
|
||||
float Direction[3] =
|
||||
{
|
||||
Target_Origin[0] - Eye_Position[0],
|
||||
Target_Origin[2] - Eye_Position[2]
|
||||
};
|
||||
|
||||
Target_Origin[1] - Eye_Position[1],
|
||||
Vector_Normalize(Direction);
|
||||
|
||||
Target_Origin[2] - Eye_Position[2]
|
||||
};
|
||||
float Angles[3] =
|
||||
{
|
||||
__builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f,
|
||||
|
||||
Vector_Normalize(Direction);
|
||||
__builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f
|
||||
};
|
||||
|
||||
float Angles[3] =
|
||||
{
|
||||
__builtin_atan2f(-Direction[2], __builtin_hypotf(Direction[0], Direction[1])) * 180.f / 3.1415927f,
|
||||
if (Perform_Trace(Angles) == 1)
|
||||
{
|
||||
Command->Tick_Number = Target->Tick_Number;
|
||||
|
||||
__builtin_atan2f(Direction[1], Direction[0]) * 180.f / 3.1415927f
|
||||
};
|
||||
Byte_Manager::Copy_Bytes(1, Command->Angles, sizeof(Angles), Angles);
|
||||
|
||||
if (Perform_Trace(Angles) == 1)
|
||||
{
|
||||
Command->Tick_Number = Target->Tick_Number;
|
||||
Command->Buttons |= 1;
|
||||
|
||||
Byte_Manager::Copy_Bytes(1, Command->Angles, sizeof(Angles), Angles);
|
||||
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
||||
|
||||
Command->Buttons |= 1;
|
||||
|
||||
*(float*)((unsigned __int32)Target->Self + 16) = Get_Target_Time(Target);
|
||||
|
||||
goto Aim_Found_Target_Label;
|
||||
}
|
||||
goto Aim_Found_Target_Label;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,11 @@ void* Original_Draw_Effect_Caller;
|
||||
|
||||
__int8 __thiscall Redirected_Draw_Effect(void* Effect, void* Unknown_Parameter_1, void* Unknown_Parameter_2)
|
||||
{
|
||||
using Get_Effect_Name_Type = char*(__thiscall*)(void* Effect);
|
||||
using Get_Effect_Name_Type = char*(__thiscall*)(void* a1);
|
||||
|
||||
if (__builtin_strstr(Get_Effect_Name_Type((unsigned __int32)Client_Module + 1423120)((void*)((unsigned __int32)Effect - 8)), "ecloud_ca") == nullptr)
|
||||
char* Effect_Name = Get_Effect_Name_Type((unsigned __int32)Client_Module + 1423120)((void*)((unsigned __int32)Effect - 8));
|
||||
|
||||
if (__builtin_strstr(Effect_Name, "ecloud_") == nullptr)
|
||||
{
|
||||
return (decltype(&Redirected_Draw_Effect)(Original_Draw_Effect_Caller))(Effect, Unknown_Parameter_1, Unknown_Parameter_2);
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
#include <TlHelp32.h>
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "Byte_Manager/Byte_Manager.hpp"
|
||||
|
||||
#include "Redirection_Manager/Redirection_Manager.hpp"
|
||||
@ -20,6 +22,10 @@ void* Client_Module;
|
||||
|
||||
#include "Update_Animations.hpp"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
#include "Estimate_Velocity.hpp"
|
||||
|
||||
#include "Spawn_Grenade.hpp"
|
||||
@ -32,6 +38,8 @@ void* Client_Module;
|
||||
|
||||
#include "Play_Footstep_Sound.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "Finish_Move.hpp"
|
||||
|
||||
#include "Item_Post_Frame.hpp"
|
||||
@ -46,6 +54,8 @@ void* Client_Module;
|
||||
|
||||
#include "Send_Move.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Copy_Command.hpp"
|
||||
|
||||
#include "Calculate_View.hpp"
|
||||
@ -119,11 +129,29 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
||||
|
||||
HANDLE Standard_Output_Handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
CONSOLE_FONT_INFOEX Console_Font_Information = { sizeof(CONSOLE_FONT_INFOEX), 0, { 0, 12 }, FF_DONTCARE, FW_NORMAL, { L"Terminal" } };
|
||||
CONSOLE_FONT_INFOEX Console_Font_Information;
|
||||
|
||||
Console_Font_Information.cbSize = sizeof(CONSOLE_FONT_INFOEX);
|
||||
|
||||
Console_Font_Information.nFont = 0;
|
||||
|
||||
Console_Font_Information.dwFontSize.X = 0;
|
||||
|
||||
Console_Font_Information.dwFontSize.Y = 12;
|
||||
|
||||
Console_Font_Information.FontFamily = FF_DONTCARE;
|
||||
|
||||
Console_Font_Information.FontWeight = FW_NORMAL;
|
||||
|
||||
wcscpy(Console_Font_Information.FaceName, L"Terminal");
|
||||
|
||||
SetCurrentConsoleFontEx(Standard_Output_Handle, 0, &Console_Font_Information);
|
||||
|
||||
CONSOLE_CURSOR_INFO Console_Cursor_Information = { sizeof(Console_Cursor_Information) };
|
||||
CONSOLE_CURSOR_INFO Console_Cursor_Information;
|
||||
|
||||
Console_Cursor_Information.bVisible = 0;
|
||||
|
||||
Console_Cursor_Information.dwSize = sizeof(Console_Cursor_Information);
|
||||
|
||||
SetConsoleTextAttribute(Standard_Output_Handle, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY | BACKGROUND_BLUE);
|
||||
|
||||
@ -141,11 +169,6 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
||||
|
||||
Engine_Module = GetModuleHandleW(L"engine.dll");
|
||||
|
||||
_putws(L"[ + ] Delimit Interface");
|
||||
{
|
||||
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Engine_Module + 1423205), 1, 235);
|
||||
}
|
||||
|
||||
_putws(L"[ + ] Extend Interface");
|
||||
{
|
||||
Implement_Extended_Interface();
|
||||
@ -177,7 +200,7 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
||||
|
||||
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 };
|
||||
unsigned __int8 Maintain_Sequence_Transitions_Bytes[3] = { 194, 24, 0 };
|
||||
|
||||
Byte_Manager::Copy_Bytes(0, (void*)((unsigned __int32)Client_Module + 245232), sizeof(Maintain_Sequence_Transitions_Bytes), Maintain_Sequence_Transitions_Bytes);
|
||||
|
||||
@ -242,8 +265,6 @@ __int32 __stdcall DllMain(HMODULE This_Module, unsigned __int32 Call_Reason, voi
|
||||
|
||||
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 417204), 1, 235);
|
||||
|
||||
Byte_Manager::Set_Bytes(0, (void*)((unsigned __int32)Client_Module + 2538675), 1, 255);
|
||||
|
||||
Original_Copy_Command_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1094624), (void*)Redirected_Copy_Command);
|
||||
}
|
||||
|
||||
|
@ -16,21 +16,21 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
||||
return Identifier;
|
||||
}
|
||||
|
||||
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
||||
static std::unordered_set<__int32> Targets = { 0, 13, 99, 232, 263, 264, 265, 270, 272, 275, 276, 277 };
|
||||
|
||||
if (Targets.contains(Identifier) == 1)
|
||||
{
|
||||
static std::unordered_set<__int32> Targets = { 0, 13, 99, 232, 263, 264, 265, 270, 272, 275, 276, 277 };
|
||||
__int8 Valid = 0;
|
||||
|
||||
if (Targets.contains(Identifier) == 1)
|
||||
if (Identifier == 13)
|
||||
{
|
||||
__int8 Valid = 0;
|
||||
*(__int32*)((unsigned __int32)Entity + 228) = 1;
|
||||
|
||||
if (Identifier == 13)
|
||||
{
|
||||
*(__int32*)((unsigned __int32)Entity + 228) = 1;
|
||||
|
||||
Valid = *(__int8*)((unsigned __int32)Entity + 324) == 5;
|
||||
}
|
||||
else
|
||||
Valid = *(__int8*)((unsigned __int32)Entity + 324) == 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*(__int8*)((unsigned __int32)Entity + 221) == 0)
|
||||
{
|
||||
if ((*(__int32*)((unsigned __int32)Entity + 572) - 131088 & 255) == 0)
|
||||
{
|
||||
@ -40,67 +40,64 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Valid == 1)
|
||||
if (Valid == 1)
|
||||
{
|
||||
if (Identifier * (*(__int32*)((unsigned __int32)Entity + 228) == 3) == 232)
|
||||
{
|
||||
if (Identifier * (*(__int32*)((unsigned __int32)Entity + 228) == 3) == 232)
|
||||
static std::unordered_map<__int32, __int32> Translators =
|
||||
{
|
||||
{ 1, 270 },
|
||||
|
||||
{ 2, 0 },
|
||||
|
||||
{ 3, 263 },
|
||||
|
||||
{ 4, 272 },
|
||||
|
||||
{ 5, 265 },
|
||||
|
||||
{ 6, 99 },
|
||||
|
||||
{ 8, 276 }
|
||||
};
|
||||
|
||||
Identifier = Translators[*(__int32*)((unsigned __int32)Entity + 7312)];
|
||||
}
|
||||
|
||||
return (Identifier - 232) % 43 ? Identifier : 232;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Equipment == 1)
|
||||
{
|
||||
static std::unordered_set<__int32> Equipment_List = { 73, 105, 109, 121, 256, 260 };
|
||||
|
||||
if (Equipment_List.contains(Identifier) == 1)
|
||||
{
|
||||
if (Identifier == 260)
|
||||
{
|
||||
static std::unordered_map<__int32, __int32> Translators =
|
||||
{
|
||||
{ 1, 270 },
|
||||
{ 12, 73 },
|
||||
|
||||
{ 2, 0 },
|
||||
{ 15, 121 },
|
||||
|
||||
{ 3, 263 },
|
||||
{ 23, 105 },
|
||||
|
||||
{ 4, 272 },
|
||||
|
||||
{ 5, 265 },
|
||||
|
||||
{ 6, 99 },
|
||||
|
||||
{ 8, 276 }
|
||||
{ 24, 109 }
|
||||
};
|
||||
|
||||
Identifier = Translators[*(__int32*)((unsigned __int32)Entity + 7312)];
|
||||
Identifier = Translators[*(__int32*)((unsigned __int32)Entity + 2392)];
|
||||
}
|
||||
|
||||
return (Identifier - 232) % 43 ? Identifier : 232;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Equipment == 1)
|
||||
{
|
||||
if ((*(__int32*)((unsigned __int32)Entity + 224) & 32) == 0)
|
||||
if (Identifier != 0)
|
||||
{
|
||||
static std::unordered_set<__int32> Equipment_List = { 73, 105, 109, 121, 256, 260 };
|
||||
|
||||
if (Equipment_List.contains(Identifier) == 1)
|
||||
if (*(void**)((unsigned __int32)Entity + 312) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (Identifier == 260)
|
||||
{
|
||||
static std::unordered_map<__int32, __int32> Translators =
|
||||
{
|
||||
{ 12, 73 },
|
||||
|
||||
{ 15, 121 },
|
||||
|
||||
{ 23, 105 },
|
||||
|
||||
{ 24, 109 }
|
||||
};
|
||||
|
||||
Identifier = Translators[*(__int32*)((unsigned __int32)Entity + 2392)];
|
||||
}
|
||||
|
||||
if (Identifier != 0)
|
||||
{
|
||||
if (*(void**)((unsigned __int32)Entity + 312) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return -Identifier;
|
||||
}
|
||||
}
|
||||
return -Identifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
Move.hpp
2
Move.hpp
@ -24,7 +24,7 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final)
|
||||
|
||||
Fire_Events_Type((unsigned __int32)Engine_Module + 521648)();
|
||||
|
||||
Update_Animation_Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Time;
|
||||
Update_Animation_Time = (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time;
|
||||
|
||||
Update_Animation_Type = 1;
|
||||
|
||||
|
153
Paint.hpp
153
Paint.hpp
@ -77,13 +77,13 @@ void __thiscall Redirected_Paint(void* Panel)
|
||||
{
|
||||
Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
|
||||
|
||||
float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff() };
|
||||
float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff()};
|
||||
|
||||
auto Get_Bounds = [&]() -> __int8
|
||||
{
|
||||
float Bones[128][3][4];
|
||||
|
||||
void* Hitbox_Set = Get_Hitbox_Set(Target, Bones, (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Time);
|
||||
void* Hitbox_Set = Get_Hitbox_Set(Target, Bones, (*(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744))->Current_Time);
|
||||
|
||||
if (Hitbox_Set != nullptr)
|
||||
{
|
||||
@ -95,87 +95,84 @@ void __thiscall Redirected_Paint(void* Panel)
|
||||
{
|
||||
void* Hitbox = (void*)((unsigned __int32)Hitbox_Set + 12 + Hitbox_Number * 68);
|
||||
|
||||
if (*(__int32*)Hitbox < sizeof(Bones) / sizeof(Bones[0]))
|
||||
float* Hitbox_Minimum = (float*)((unsigned __int32)Hitbox + 8);
|
||||
|
||||
float* Hitbox_Maximum = (float*)((unsigned __int32)Hitbox + 20);
|
||||
|
||||
float Hitbox_Vertices[8][3];
|
||||
|
||||
__int32 Axis_Number = 0;
|
||||
|
||||
Initialize_Vertices_Label:
|
||||
{
|
||||
float* Hitbox_Minimum = (float*)((unsigned __int32)Hitbox + 8);
|
||||
Hitbox_Vertices[0][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
float* Hitbox_Maximum = (float*)((unsigned __int32)Hitbox + 20);
|
||||
Hitbox_Vertices[1][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
float Hitbox_Vertices[8][3];
|
||||
Hitbox_Vertices[2][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Maximum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
__int32 Axis_Number = 0;
|
||||
Hitbox_Vertices[3][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Initialize_Vertices_Label:
|
||||
Hitbox_Vertices[4][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_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[5][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[6][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[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];
|
||||
|
||||
Axis_Number += 1;
|
||||
|
||||
if (Axis_Number != sizeof(Hitbox_Vertices[0]) / sizeof(float))
|
||||
{
|
||||
Hitbox_Vertices[0][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[1][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[2][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Maximum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[3][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[4][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_Minimum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[5][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Maximum[0] + Bones[*(__int32*)Hitbox][Axis_Number][1] * Hitbox_Minimum[1] + Bones[*(__int32*)Hitbox][Axis_Number][2] * Hitbox_Maximum[2] + Bones[*(__int32*)Hitbox][Axis_Number][3];
|
||||
|
||||
Hitbox_Vertices[6][Axis_Number] = Bones[*(__int32*)Hitbox][Axis_Number][0] * Hitbox_Minimum[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];
|
||||
|
||||
Axis_Number += 1;
|
||||
|
||||
if (Axis_Number != sizeof(Hitbox_Vertices[0]) / sizeof(float))
|
||||
{
|
||||
goto Initialize_Vertices_Label;
|
||||
}
|
||||
goto Initialize_Vertices_Label;
|
||||
}
|
||||
|
||||
__int32 Vertex_Number = 0;
|
||||
|
||||
Transform_Vertices_Label:
|
||||
{
|
||||
using Screen_Transform_Type = __int8(__cdecl*)(float* World, float* Screen);
|
||||
|
||||
float Screen[3];
|
||||
|
||||
if (Screen_Transform_Type((unsigned __int32)Client_Module + 1841648)(Hitbox_Vertices[Vertex_Number], Screen) == 0)
|
||||
{
|
||||
using Get_Screen_Size_Type = __int32(__cdecl*)();
|
||||
|
||||
__int32 Screen_Width = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738576)();
|
||||
|
||||
__int32 Screen_Height = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738544)();
|
||||
|
||||
Screen[0] = Screen[0] / 2.f * Screen_Width + Screen_Width / 2.f;
|
||||
|
||||
Screen[1] = -Screen[1] / 2.f * Screen_Height + Screen_Height / 2.f;
|
||||
|
||||
Bounds[0] = min(Bounds[0], Screen[0]);
|
||||
|
||||
Bounds[1] = max(Bounds[1], Screen[0]);
|
||||
|
||||
Bounds[2] = min(Bounds[2], Screen[1]);
|
||||
|
||||
Bounds[3] = max(Bounds[3], Screen[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vertex_Number += 1;
|
||||
|
||||
if (Vertex_Number != sizeof(Hitbox_Vertices) / sizeof(Hitbox_Vertices[0]))
|
||||
{
|
||||
goto Transform_Vertices_Label;
|
||||
}
|
||||
}
|
||||
|
||||
Hitbox_Number += 1;
|
||||
|
||||
goto Get_Bounds_Label;
|
||||
}
|
||||
|
||||
__int32 Vertex_Number = 0;
|
||||
|
||||
Transform_Vertices_Label:
|
||||
{
|
||||
using Screen_Transform_Type = __int8(__cdecl*)(float* World, float* Screen);
|
||||
|
||||
float Screen[3];
|
||||
|
||||
if (Screen_Transform_Type((unsigned __int32)Client_Module + 1841648)(Hitbox_Vertices[Vertex_Number], Screen) == 0)
|
||||
{
|
||||
using Get_Screen_Size_Type = __int32(__cdecl*)();
|
||||
|
||||
__int32 Screen_Width = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738576)();
|
||||
|
||||
__int32 Screen_Height = Get_Screen_Size_Type((unsigned __int32)Client_Module + 738544)();
|
||||
|
||||
Screen[0] = Screen[0] / 2.f * Screen_Width + Screen_Width / 2.f;
|
||||
|
||||
Screen[1] = -Screen[1] / 2.f * Screen_Height + Screen_Height / 2.f;
|
||||
|
||||
Bounds[0] = min(Bounds[0], Screen[0]);
|
||||
|
||||
Bounds[1] = max(Bounds[1], Screen[0]);
|
||||
|
||||
Bounds[2] = min(Bounds[2], Screen[1]);
|
||||
|
||||
Bounds[3] = max(Bounds[3], Screen[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Vertex_Number += 1;
|
||||
|
||||
if (Vertex_Number != sizeof(Hitbox_Vertices) / sizeof(Hitbox_Vertices[0]))
|
||||
{
|
||||
goto Transform_Vertices_Label;
|
||||
}
|
||||
}
|
||||
|
||||
Hitbox_Number += 1;
|
||||
|
||||
goto Get_Bounds_Label;
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,9 +183,11 @@ void __thiscall Redirected_Paint(void* Panel)
|
||||
Bounds[2] -= 2.f;
|
||||
|
||||
Bounds[3] += 2.f;
|
||||
|
||||
return (Bounds[1] != 2.f) * (Bounds[3] != 2.f);
|
||||
}
|
||||
|
||||
return __builtin_isfinite(Bounds[0]) * (Bounds[1] != 2.f) * (Bounds[3] != 2.f);
|
||||
return 0;
|
||||
};
|
||||
|
||||
if (Get_Bounds() == 1)
|
||||
@ -243,7 +242,7 @@ void __thiscall Redirected_Paint(void* Panel)
|
||||
{
|
||||
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[std::clamp(*(__int32*)((unsigned __int32)Target->Self + 7308), 0, 7) + 4 * (*(__int32*)((unsigned __int32)Client_Module + 8144624) == 1)];
|
||||
Paint_Data->Name = Survivors[*(__int32*)((unsigned __int32)Target->Self + 7308) + 4 * (*(__int32*)((unsigned __int32)Client_Module + 8144624) == 1)];
|
||||
}
|
||||
|
||||
__int8 Ghost = 0;
|
||||
|
@ -1,8 +1,10 @@
|
||||
void __thiscall Perform_Shove_Trace(void* Stack)
|
||||
{
|
||||
if (*(void**)((unsigned __int32)Stack + 332) == Perform_Trace_Target)
|
||||
void* Entity = *(void**)((unsigned __int32)Stack + 332);
|
||||
|
||||
if (Entity == Perform_Trace_Target)
|
||||
{
|
||||
Perform_Trace_Damage = 1.f;
|
||||
Perform_Trace_Damage = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
|
||||
auto Compute_Damage = [&]() -> void
|
||||
{
|
||||
if (Interface_Penetration_Damage.Floating_Point == 0.f)
|
||||
if (Interface_Penetration_Damage.Integer == 0)
|
||||
{
|
||||
Perform_Trace_Damage = 1.f;
|
||||
}
|
||||
@ -140,7 +140,7 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
|
||||
float Distance = Calculate_Distance_Type((unsigned __int32)Client_Module + 878608)((void*)((unsigned __int32)Local_Player + 540), Bounds);
|
||||
|
||||
if (Distance < 100.f)
|
||||
if (Distance < 100)
|
||||
{
|
||||
Damage += 4.f * Damage * __builtin_powf(1.f - Distance / 100.f, 2.f);
|
||||
}
|
||||
@ -164,15 +164,27 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
{
|
||||
Apply_Shotgun_Scaling();
|
||||
|
||||
__int8 Is_Sniper_Rifle = Bullet_Type > 8;
|
||||
__int8 Is_Sniper_Rifle = (Bullet_Type - 8) > 0;
|
||||
|
||||
if (Group == 1)
|
||||
{
|
||||
if (Gender == 14)
|
||||
{
|
||||
static std::unordered_set<__int32> Neutrals = { 563, 567, 592, 600, 648 };
|
||||
auto Is_Neutral = [&]() -> __int8
|
||||
{
|
||||
__int32 Sequence_Activity = *(__int32*)((unsigned __int32)Entity + 4688);
|
||||
|
||||
if (Neutrals.contains(*(__int32*)((unsigned __int32)Entity + 4688)) == 1)
|
||||
unsigned __int32 Absolute_Sequence_Activity = Sequence_Activity - 563;
|
||||
|
||||
if (Absolute_Sequence_Activity <= 29)
|
||||
{
|
||||
return (536870929 & (1 << (Absolute_Sequence_Activity & 31))) != 0;
|
||||
}
|
||||
|
||||
return (Sequence_Activity == 600) + (Sequence_Activity == 648);
|
||||
};
|
||||
|
||||
if (Is_Neutral() == 1)
|
||||
{
|
||||
Damage = __builtin_inff();
|
||||
}
|
||||
@ -201,7 +213,7 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
{
|
||||
if (Is_Sniper_Rifle * Realism == 0)
|
||||
{
|
||||
Damage = 450.f;
|
||||
Damage = 450;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -238,9 +250,7 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
Damage *= min(Multipliers[Group], 4.f - 2.75f * Is_Shotgun);
|
||||
}
|
||||
|
||||
__int32 Raw_Identifier = Get_Identifier(Entity, 1, 0);
|
||||
|
||||
if (Raw_Identifier == 99)
|
||||
if (Get_Identifier(Entity, 1, 0) == 99)
|
||||
{
|
||||
if (*(__int32*)((unsigned __int32)Entity + 2212) == 5)
|
||||
{
|
||||
@ -253,7 +263,7 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
{
|
||||
if (*(void**)((unsigned __int32)Entity + 8040) != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (Damage > 50.f)
|
||||
if (Damage > 50)
|
||||
{
|
||||
__int8 Competitive = ('v' - Mode[0] ^ Mode[0] - 's') == 3;
|
||||
|
||||
@ -273,14 +283,14 @@ void __thiscall Perform_Trace(void* Stack)
|
||||
|
||||
if (Damage != __builtin_inff())
|
||||
{
|
||||
Damage = (__int32)(Damage + 1.f * (Damage < 1.f));
|
||||
Damage = (__int32)(Damage + 1.f * (Damage < 1));
|
||||
}
|
||||
|
||||
if (Raw_Identifier == 276)
|
||||
if (Identifier == 276)
|
||||
{
|
||||
if (__builtin_strstr(Get_Sequence_Name(Entity), "limb") != nullptr)
|
||||
{
|
||||
if (__builtin_strstr(Get_Sequence_Name(Entity), "limb") != nullptr)
|
||||
{
|
||||
Damage = min(Damage, *(__int32*)((unsigned __int32)Entity + 236) - 1.f);
|
||||
}
|
||||
Damage = min(Damage, *(__int32*)((unsigned __int32)Entity + 236) - 1.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,15 @@ void* Original_Play_Footstep_Sound_Caller;
|
||||
|
||||
void __thiscall Redirected_Play_Footstep_Sound(void* Unknown_Parameter_1, void* Unknown_Parameter_2, void* Unknown_Parameter_3, void* Unknown_Parameter_4, void* Unknown_Parameter_5, void* Unknown_Parameter_6)
|
||||
{
|
||||
if (*(__int8*)((unsigned __int32)Client_Module + 8072736) <= *(__int8*)((unsigned __int32)Client_Module + 8072752))
|
||||
void* Prediction = (void*)((unsigned __int32)Client_Module + 8072728);
|
||||
|
||||
if (*(__int8*)((unsigned __int32)Prediction + 8) == 1)
|
||||
{
|
||||
(decltype(&Redirected_Play_Footstep_Sound)(Original_Play_Footstep_Sound_Caller))(Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Unknown_Parameter_4, Unknown_Parameter_5, Unknown_Parameter_6);
|
||||
if (*(__int8*)((unsigned __int32)Prediction + 24) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
(decltype(&Redirected_Play_Footstep_Sound)(Original_Play_Footstep_Sound_Caller))(Unknown_Parameter_1, Unknown_Parameter_2, Unknown_Parameter_3, Unknown_Parameter_4, Unknown_Parameter_5, Unknown_Parameter_6);
|
||||
}
|
@ -15,9 +15,7 @@ void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Playe
|
||||
|
||||
if (Get_Identifier(Player, 0, 0) == 272)
|
||||
{
|
||||
using Get_Ability_Type = void*(__thiscall*)(void* Entity);
|
||||
|
||||
void* Ability = Get_Ability_Type((unsigned __int32)Client_Module + 2438560)(Player);
|
||||
void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
|
||||
|
||||
if (Ability != nullptr)
|
||||
{
|
||||
|
@ -42,6 +42,6 @@ void __thiscall Redirected_Run_Command(void* Prediction, void* Player, Command_S
|
||||
|
||||
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
||||
|
||||
Global_Variables->Time = (*(__int32*)((unsigned __int32)Player + 5324) - 1) * Global_Variables->Interval_Per_Tick;
|
||||
Global_Variables->Current_Time = (*(__int32*)((unsigned __int32)Player + 5324) - 1) * Global_Variables->Interval_Per_Tick;
|
||||
}
|
||||
}
|
@ -4,9 +4,23 @@ void __thiscall Redirected_Spawn_Grenade(void* Entity)
|
||||
{
|
||||
using Set_Size_Type = void(__thiscall*)(void* Entity, float* Minimum, float* Maximum);
|
||||
|
||||
float Minimum[3] = { -16.f, -16.f, -16.f };
|
||||
float Minimum[3] =
|
||||
{
|
||||
-16.f,
|
||||
|
||||
float Maximum[3] = { 16.f, 16.f, 16.f };
|
||||
-16.f,
|
||||
|
||||
-16.f
|
||||
};
|
||||
|
||||
float Maximum[3] =
|
||||
{
|
||||
16.f,
|
||||
|
||||
16.f,
|
||||
|
||||
16.f
|
||||
};
|
||||
|
||||
Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalOptions>/Zc:threadSafeInit- /clang:-fno-unwind-tables -Wno-microsoft-goto %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions>/Zc:threadSafeInit- /clang:-fno-unwind-tables -Wno-multichar -Wno-microsoft-goto %(AdditionalOptions)</AdditionalOptions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
<FloatingPointExceptions>false</FloatingPointExceptions>
|
||||
@ -62,7 +62,6 @@
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
|
||||
<ForcedIncludeFiles>__msvc_all_public_headers.hpp</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -2,7 +2,7 @@ struct Global_Variables_Structure
|
||||
{
|
||||
__int8 Additional_Bytes_1[12];
|
||||
|
||||
float Time;
|
||||
float Current_Time;
|
||||
|
||||
float Frame_Time;
|
||||
|
||||
@ -19,9 +19,9 @@ void Redirected_Update_Animations()
|
||||
{
|
||||
Global_Variables_Structure* Global_Variables = *(Global_Variables_Structure**)((unsigned __int32)Client_Module + 7096744);
|
||||
|
||||
float Previous_Time = Global_Variables->Time;
|
||||
float Previous_Current_Time = Global_Variables->Current_Time;
|
||||
|
||||
Global_Variables->Time = Update_Animation_Time;
|
||||
Global_Variables->Current_Time = Update_Animation_Time;
|
||||
|
||||
float Previous_Frame_Time = Global_Variables->Frame_Time;
|
||||
|
||||
@ -54,5 +54,5 @@ void Redirected_Update_Animations()
|
||||
|
||||
Global_Variables->Frame_Time = Previous_Frame_Time;
|
||||
|
||||
Global_Variables->Time = Previous_Time;
|
||||
Global_Variables->Current_Time = Previous_Current_Time;
|
||||
}
|
Reference in New Issue
Block a user