1 Commits

Author SHA1 Message Date
dc27eb98bd stability
implementing logic for custom hitboxes isn't trivial, but at least to not crash; stumbled upon junk in `m_survivorCharacter` at `hehe30_9`
2025-02-20 15:59:52 +03:00
14 changed files with 223 additions and 166 deletions

View File

@ -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); (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));
} }

View File

@ -22,7 +22,7 @@ void* Get_Studio_Header(void* 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 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)
{ {
@ -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) 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) 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 + 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); Disable_Clock_Correction(Interface_Extra_Commands_Action.Integer);
} }
@ -349,7 +351,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
} }
else 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); __int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0);
@ -367,9 +369,9 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
Cancelable_Shove = min(1 + (*(float*)((unsigned __int32)Weapon + 3312) == -1.f), Cancelable_Shove); 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); In_Shove = *(__int8*)((unsigned __int32)Weapon + 2720);
} }
@ -394,11 +396,11 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
} }
else 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) 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 +482,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.Priority < Y.Priority;
{
return X.Distance < Y.Distance;
}
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; size_t Target_Number = 0;
@ -535,7 +544,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
using Get_Deploy_Activity_Type = __int32(__thiscall**)(void* Weapon); 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); 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 else
{ {
@ -611,7 +620,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
if (Cancelable_Shove == 1) 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); Command->Angles[1] += -45.f * Shove_Multiplier + 45.f * (1.f - Shove_Multiplier);
} }
@ -714,7 +723,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
float Bones[128][3][4]; 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) if (Hitbox_Set != nullptr)
{ {
@ -724,7 +733,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
__int32 Bullets = *(__int32*)((unsigned __int32)Weapon_Data + 2520); __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; *(__int32*)((unsigned __int32)Weapon_Data + 2520) = 1;
} }

View File

@ -2,9 +2,11 @@ void* Original_Draw_Effect_Caller;
__int8 __thiscall Redirected_Draw_Effect(void* Effect, void* Unknown_Parameter_1, void* Unknown_Parameter_2) __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); return (decltype(&Redirected_Draw_Effect)(Original_Draw_Effect_Caller))(Effect, Unknown_Parameter_1, Unknown_Parameter_2);
} }

View File

@ -2,6 +2,8 @@
#include <TlHelp32.h> #include <TlHelp32.h>
#include <cstdio>
#include "Byte_Manager/Byte_Manager.hpp" #include "Byte_Manager/Byte_Manager.hpp"
#include "Redirection_Manager/Redirection_Manager.hpp" #include "Redirection_Manager/Redirection_Manager.hpp"
@ -20,6 +22,10 @@ void* Client_Module;
#include "Update_Animations.hpp" #include "Update_Animations.hpp"
#include <unordered_set>
#include <unordered_map>
#include "Estimate_Velocity.hpp" #include "Estimate_Velocity.hpp"
#include "Spawn_Grenade.hpp" #include "Spawn_Grenade.hpp"
@ -32,6 +38,8 @@ void* Client_Module;
#include "Play_Footstep_Sound.hpp" #include "Play_Footstep_Sound.hpp"
#include <algorithm>
#include "Finish_Move.hpp" #include "Finish_Move.hpp"
#include "Item_Post_Frame.hpp" #include "Item_Post_Frame.hpp"
@ -46,6 +54,8 @@ void* Client_Module;
#include "Send_Move.hpp" #include "Send_Move.hpp"
#include <vector>
#include "Copy_Command.hpp" #include "Copy_Command.hpp"
#include "Calculate_View.hpp" #include "Calculate_View.hpp"
@ -177,7 +187,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); 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); Byte_Manager::Copy_Bytes(0, (void*)((unsigned __int32)Client_Module + 245232), sizeof(Maintain_Sequence_Transitions_Bytes), Maintain_Sequence_Transitions_Bytes);
@ -242,8 +252,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 + 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); Original_Copy_Command_Caller = Redirection_Manager::Redirect_Function(0, (void*)((unsigned __int32)Client_Module + 1094624), (void*)Redirected_Copy_Command);
} }

View File

@ -24,7 +24,7 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final)
Fire_Events_Type((unsigned __int32)Engine_Module + 521648)(); 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; Update_Animation_Type = 1;

View File

@ -77,13 +77,13 @@ void __thiscall Redirected_Paint(void* Panel)
{ {
Target_Structure* Target = &Sorted_Target_List.at(Target_Number); Target_Structure* Target = &Sorted_Target_List.at(Target_Number);
float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff() }; float Bounds[4] = { __builtin_inff(), -__builtin_inff(), __builtin_inff(), -__builtin_inff()};
auto Get_Bounds = [&]() -> __int8 auto Get_Bounds = [&]() -> __int8
{ {
float Bones[128][3][4]; 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) if (Hitbox_Set != nullptr)
{ {
@ -176,6 +176,8 @@ void __thiscall Redirected_Paint(void* Panel)
goto Get_Bounds_Label; goto Get_Bounds_Label;
} }
return 0;
} }
} }
@ -186,9 +188,11 @@ void __thiscall Redirected_Paint(void* Panel)
Bounds[2] -= 2.f; Bounds[2] -= 2.f;
Bounds[3] += 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) if (Get_Bounds() == 1)

View File

@ -1,8 +1,10 @@
void __thiscall Perform_Shove_Trace(void* Stack) 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;
} }
} }

View File

@ -70,7 +70,7 @@ void __thiscall Perform_Trace(void* Stack)
auto Compute_Damage = [&]() -> void auto Compute_Damage = [&]() -> void
{ {
if (Interface_Penetration_Damage.Floating_Point == 0.f) if (Interface_Penetration_Damage.Integer == 0)
{ {
Perform_Trace_Damage = 1.f; 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); 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); 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(); Apply_Shotgun_Scaling();
__int8 Is_Sniper_Rifle = Bullet_Type > 8; __int8 Is_Sniper_Rifle = (Bullet_Type - 8) > 0;
if (Group == 1) if (Group == 1)
{ {
if (Gender == 14) 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(); Damage = __builtin_inff();
} }
@ -201,7 +213,7 @@ void __thiscall Perform_Trace(void* Stack)
{ {
if (Is_Sniper_Rifle * Realism == 0) if (Is_Sniper_Rifle * Realism == 0)
{ {
Damage = 450.f; Damage = 450;
} }
} }
else else
@ -253,7 +265,7 @@ void __thiscall Perform_Trace(void* Stack)
{ {
if (*(void**)((unsigned __int32)Entity + 8040) != INVALID_HANDLE_VALUE) 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; __int8 Competitive = ('v' - Mode[0] ^ Mode[0] - 's') == 3;
@ -273,7 +285,7 @@ void __thiscall Perform_Trace(void* Stack)
if (Damage != __builtin_inff()) if (Damage != __builtin_inff())
{ {
Damage = (__int32)(Damage + 1.f * (Damage < 1.f)); Damage = (__int32)(Damage + 1.f * (Damage < 1));
if (Raw_Identifier == 276) if (Raw_Identifier == 276)
{ {

View File

@ -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) 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);
} }

View File

@ -15,9 +15,7 @@ void __thiscall Redirected_Process_Movement(void* Unknown_Parameter, void* Playe
if (Get_Identifier(Player, 0, 0) == 272) if (Get_Identifier(Player, 0, 0) == 272)
{ {
using Get_Ability_Type = void*(__thiscall*)(void* Entity); void* Ability = *(void**)((unsigned __int32)Client_Module + 7644532 + (((*(unsigned __int32*)((unsigned __int32)Player + 7892) & 4095) - 4097) << 4));
void* Ability = Get_Ability_Type((unsigned __int32)Client_Module + 2438560)(Player);
if (Ability != nullptr) if (Ability != nullptr)
{ {

View File

@ -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_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;
} }
} }

View File

@ -4,9 +4,23 @@ void __thiscall Redirected_Spawn_Grenade(void* Entity)
{ {
using Set_Size_Type = void(__thiscall*)(void* Entity, float* Minimum, float* Maximum); 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); Set_Size_Type((unsigned __int32)Client_Module + 281664)(Entity, Minimum, Maximum);

View File

@ -1,114 +1,113 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<ProjectGuid>{9e56cc0a-5a40-4957-8031-ab3cc4108170}</ProjectGuid> <ProjectGuid>{9e56cc0a-5a40-4957-8031-ab3cc4108170}</ProjectGuid>
<RootNamespace>Storm</RootNamespace> <RootNamespace>Storm</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset> <PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" /> <ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest> <GenerateManifest>false</GenerateManifest>
<TargetExt>.cpl</TargetExt> <TargetExt>.cpl</TargetExt>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Vcpkg"> <PropertyGroup Label="Vcpkg">
<VcpkgEnabled>false</VcpkgEnabled> <VcpkgEnabled>false</VcpkgEnabled>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>false</SDLCheck> <SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpplatest</LanguageStandard> <LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat> <DebugInformationFormat>None</DebugInformationFormat>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers> <OmitFramePointers>true</OmitFramePointers>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel> <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> <StringPooling>true</StringPooling>
<ControlFlowGuard>false</ControlFlowGuard> <ControlFlowGuard>false</ControlFlowGuard>
<FloatingPointExceptions>false</FloatingPointExceptions> <FloatingPointExceptions>false</FloatingPointExceptions>
<RuntimeTypeInfo>false</RuntimeTypeInfo> <RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<ForcedIncludeFiles>__msvc_all_public_headers.hpp</ForcedIncludeFiles> </ClCompile>
</ClCompile> <Link>
<Link> <SubSystem>Windows</SubSystem>
<SubSystem>Windows</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences>
<OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>false</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <StackReserveSize>
<StackReserveSize> </StackReserveSize>
</StackReserveSize> <StackCommitSize>
<StackCommitSize> </StackCommitSize>
</StackCommitSize> <RandomizedBaseAddress>false</RandomizedBaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention>false</DataExecutionPrevention>
<DataExecutionPrevention>false</DataExecutionPrevention> </Link>
</Link> </ItemDefinitionGroup>
</ItemDefinitionGroup> <ItemGroup>
<ItemGroup> <ClCompile Include="Entry_Point.cpp" />
<ClCompile Include="Entry_Point.cpp" /> </ItemGroup>
</ItemGroup> <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="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" /> <ClInclude Include="Run_Command.hpp" />
<ClInclude Include="Run_Command.hpp" /> <ClInclude Include="Draw_Crosshair.hpp" />
<ClInclude Include="Draw_Crosshair.hpp" /> <ClInclude Include="Draw_Effect.hpp" />
<ClInclude Include="Draw_Effect.hpp" /> <ClInclude Include="Extended_Interface.hpp" />
<ClInclude Include="Extended_Interface.hpp" /> <ClInclude Include="Estimate_Velocity.hpp" />
<ClInclude Include="Estimate_Velocity.hpp" /> <ClInclude Include="Get_Glow_Color.hpp" />
<ClInclude Include="Get_Glow_Color.hpp" /> <ClInclude Include="Interpolate.hpp" />
<ClInclude Include="Interpolate.hpp" /> <ClInclude Include="Finish_Move.hpp" />
<ClInclude Include="Finish_Move.hpp" /> <ClInclude Include="Move.hpp" />
<ClInclude Include="Move.hpp" /> <ClInclude Include="Copy_Command.hpp" />
<ClInclude Include="Copy_Command.hpp" /> <ClInclude Include="Paint.hpp" />
<ClInclude Include="Paint.hpp" /> <ClInclude Include="Perform_Trace.hpp" />
<ClInclude Include="Perform_Trace.hpp" /> <ClInclude Include="Post_Network_Data_Received.hpp" />
<ClInclude Include="Post_Network_Data_Received.hpp" /> <ClInclude Include="Item_Post_Frame.hpp" />
<ClInclude Include="Item_Post_Frame.hpp" /> <ClInclude Include="Read_Packets.hpp" />
<ClInclude Include="Read_Packets.hpp" /> <ClInclude Include="Play_Footstep_Sound.hpp" />
<ClInclude Include="Play_Footstep_Sound.hpp" /> <ClInclude Include="Perform_Shove_Trace.hpp" />
<ClInclude Include="Perform_Shove_Trace.hpp" /> <ClInclude Include="Update_Animations.hpp" />
<ClInclude Include="Update_Animations.hpp" /> <ClInclude Include="Write_Texture.hpp" />
<ClInclude Include="Write_Texture.hpp" /> </ItemGroup>
</ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets" />
<ImportGroup Label="ExtensionTargets" />
</Project> </Project>

View File

@ -2,7 +2,7 @@ struct Global_Variables_Structure
{ {
__int8 Additional_Bytes_1[12]; __int8 Additional_Bytes_1[12];
float Time; float Current_Time;
float Frame_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); 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; 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->Frame_Time = Previous_Frame_Time;
Global_Variables->Time = Previous_Time; Global_Variables->Current_Time = Previous_Current_Time;
} }