respect Penetrate_Teammates; guaranteed +use

This commit is contained in:
explorer 2024-12-13 12:57:10 +03:00
parent 6026914241
commit 309a0f2c27
3 changed files with 15 additions and 8 deletions

View File

@ -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 =

View File

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

View File

@ -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
{