stability

implementing logic for custom hitboxes isn't trivial, but at least to not crash; stumbled upon junk in `m_survivorCharacter` at `hehe30_9`
This commit is contained in:
explorer 2025-02-20 15:59:52 +03:00
parent 7070f6a68c
commit dc27eb98bd
2 changed files with 112 additions and 104 deletions

View File

@ -802,6 +802,8 @@ 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);
@ -855,6 +857,7 @@ void __thiscall Redirected_Copy_Command(void* Unknown_Parameter, Command_Structu
goto Aim_Found_Target_Label;
}
}
}
Target_Number += 1;

View File

@ -95,6 +95,8 @@ 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);
@ -174,6 +176,9 @@ void __thiscall Redirected_Paint(void* Panel)
goto Get_Bounds_Label;
}
return 0;
}
}
Bounds[0] -= 2.f;
@ -242,7 +247,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[*(__int32*)((unsigned __int32)Target->Self + 7308) + 4 * (*(__int32*)((unsigned __int32)Client_Module + 8144624) == 1)];
Paint_Data->Name = Survivors[std::clamp(*(__int32*)((unsigned __int32)Target->Self + 7308), 0, 7) + 4 * (*(__int32*)((unsigned __int32)Client_Module + 8144624) == 1)];
}
__int8 Ghost = 0;