From 31043114f0cc06ce305fa3bd918e49f238325c1f Mon Sep 17 00:00:00 2001 From: explorer Date: Tue, 4 Feb 2025 13:27:57 +0300 Subject: [PATCH] recompute climbing damage --- Copy_Command.hpp | 4 +--- Estimate_Velocity.hpp | 11 ++++++++--- Perform_Trace.hpp | 8 ++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Copy_Command.hpp b/Copy_Command.hpp index 46711ef..177e18e 100644 --- a/Copy_Command.hpp +++ b/Copy_Command.hpp @@ -577,9 +577,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu if ((Infected ^ 1) + (Gender == 15) != 0) { - 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 (__builtin_strstr(Get_Sequence_Name(Target->Self), "hove") == nullptr) { using Perform_Shove_Trace = __int8(__thiscall*)(void* Weapon, float* Direction); diff --git a/Estimate_Velocity.hpp b/Estimate_Velocity.hpp index bc3f2be..3835ba2 100755 --- a/Estimate_Velocity.hpp +++ b/Estimate_Velocity.hpp @@ -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) { using Get_Identifier_Type = void*(__cdecl**)(); @@ -27,9 +34,7 @@ __int32 Get_Identifier(void* Entity, __int8 Raw, __int8 Equipment) { 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_Type((unsigned __int32)Client_Module + 203392)(Entity, *(__int32*)((unsigned __int32)Entity + 2212)), "eath") == nullptr) + if (__builtin_strstr(Get_Sequence_Name(Entity), "eath") == nullptr) { Valid = Identifier == 264 ? *(__int8*)((unsigned __int32)Entity + 4493) ^ 1 : 1; } diff --git a/Perform_Trace.hpp b/Perform_Trace.hpp index cc17bae..727954c 100755 --- a/Perform_Trace.hpp +++ b/Perform_Trace.hpp @@ -285,6 +285,14 @@ void __thiscall Perform_Trace(void* Stack) { Damage = (__int32)(Damage + 1.f * (Damage < 1)); } + + if (Identifier == 276) + { + if (__builtin_strstr(Get_Sequence_Name(Entity), "limb") != nullptr) + { + Damage = std::clamp(Damage, 0.f, *(__int32*)((unsigned __int32)Entity + 236) - 1.f); + } + } } } }