From 309a0f2c279cfac5dd49ef51b94e476214751a43 Mon Sep 17 00:00:00 2001 From: explorer Date: Fri, 13 Dec 2024 12:57:10 +0300 Subject: [PATCH] respect Penetrate_Teammates; guaranteed +use --- Copy_Command.hpp | 16 +++++++++------- Move.hpp | 1 + Perform_Trace.hpp | 6 +++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Copy_Command.hpp b/Copy_Command.hpp index 85a8d1c..5995064 100644 --- a/Copy_Command.hpp +++ b/Copy_Command.hpp @@ -271,7 +271,9 @@ 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 + 5020) & 32) == 0) + __int8 Action = *(__int32*)((unsigned __int32)Local_Player + 7080) != 0; + + if ((*(__int32*)((unsigned __int32)Local_Player + 5020) & 32) * (Action ^ 1) == 0) { using Can_Attack_Type = __int8(__thiscall*)(void* Player); @@ -406,8 +408,6 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu Holstering *= Can_Attack ^ 1; - __int8 Action = *(__int32*)((unsigned __int32)Local_Player + 7080) != 0; - __int8 Reviving = *(void**)((unsigned __int32)Local_Player + 8076) != INVALID_HANDLE_VALUE; __int32 Weapon_Identifier = Get_Identifier(Weapon, 1, 0); @@ -424,6 +424,8 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu Target_Structure* Shove_Target = nullptr; + //td: timing condition + Shove_Traverse_Sorted_Target_List_Label: { if (Target_Number != Sorted_Target_List.size()) @@ -477,13 +479,13 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu 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_Trace_Target = nullptr; - if (Perform_Trace_Damage == 1) + if (Perform_Trace_Damage == 1.f) { if (Action == 0) { @@ -616,7 +618,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu Perform_Trace_Target = Target->Self; - Perform_Trace_Damage = 0; + Perform_Trace_Damage = 0.f; void* Previous_Audio_Device = *(void**)((unsigned __int32)Engine_Module + 5050008); @@ -650,7 +652,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu *(__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 = diff --git a/Move.hpp b/Move.hpp index 3dac581..1da623f 100644 --- a/Move.hpp +++ b/Move.hpp @@ -35,6 +35,7 @@ void Redirected_Move(float Unknown_Parameter, __int8 Final) { (decltype(&Redirected_Move)(Original_Move_Caller))(Unknown_Parameter, Final); + //td: reprediction timing Run_Prediction_Type((unsigned __int32)Engine_Module + 527776)(); if (Extra_Commands > 0) diff --git a/Perform_Trace.hpp b/Perform_Trace.hpp index a12ab62..dd8891f 100755 --- a/Perform_Trace.hpp +++ b/Perform_Trace.hpp @@ -37,6 +37,10 @@ void __thiscall Perform_Trace(void* Stack) if (*(__int32*)((unsigned __int32)Entity + 228) == *(__int32*)((unsigned __int32)Local_Player + 228)) { + Perform_Trace_Target = nullptr; + + Perform_Trace_Damage = 0.f; + return; } } @@ -68,7 +72,7 @@ void __thiscall Perform_Trace(void* Stack) { if (Interface_Penetration_Damage.Integer == 0) { - Perform_Trace_Damage = 1; + Perform_Trace_Damage = 1.f; } else {