fix: Sometimes C4 Position bugged if you look behind the C4, or C4 Screen Pos not in Screen Area

This commit is contained in:
tokinaa
2023-10-24 14:55:24 +07:00
parent aa163a178b
commit c6031adcce
+8
View File
@@ -40,6 +40,13 @@ namespace hack {
const Vector3 c4ScreenPos = c4Origin.world_to_screen(view_matrix);
/**
* Sometimes C4 Position bugged if you look behind the C4, or C4 Screen Pos not in Screen Area
*
* Tested in my side
*/
if (c4ScreenPos.z >= 0.01f) {
float distance = localOrigin.calculate_distance(c4Origin);
float roundedDistance = std::round(distance / 500.f);
@@ -64,6 +71,7 @@ namespace hack {
10
);
}
}
int playerIndex = 0;
uintptr_t list_entry;