float left_damage = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player).damage;
float right_damage = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player).damage;
if (left_damage > 0.0f && right_damage > 0.0f) {
if (left_damage > right_damage)
{
player_record->type = DIRECTIONAL;
player_record->side = RESOLVER_FIRST;
}
else if (left_damage < right_damage)
{
player_record->type = DIRECTIONAL;
player_record->side = RESOLVER_SECOND;
}
}
else {
auto first_position = g_ctx.globals.eye_pos./*wtf*/(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));
auto second_position = g_ctx.globals.eye_pos./*wtf*/(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));
auto distance = /* wtf don't know how to find the distance very well you are a bad paster*/;
if (fabsf(first_position) > distance)
{
player_record->type = DIRECTIONAL;
player_record->side = RESOLVER_FIRST;
}
else if (fabsf(second_position) > distance)
{
player_record->type = DIRECTIONAL;
player_record->side = RESOLVER_SECOND;
}
else
{
player_record->type = DIRECTIONAL;
player_record->side = RESOLVER_ZERO;
}
}