minor fix
This commit is contained in:
parent
c2b107b18e
commit
f60870ec64
@ -13,7 +13,9 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
set(CMAKE_BUILD_TYPE_VALUES "Debug;Release" CACHE INTERNAL "List of supported build")
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_BUILD_TYPE_VALUES})
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
endif()
|
||||
set(Force_CXX_23B 0 CACHE BOOL "Force 23B as the CXX Standard, useful for disrepancies in compiler and IDE")
|
||||
|
||||
project(cathook VERSION 0.0.1)
|
||||
@ -163,9 +165,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-march=native -rdynamic -ggdb -Og")
|
||||
if (Internal_Symbolized)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=auto -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=auto -s -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -s -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
endif()
|
||||
if (Force_CXX_23B)
|
||||
set(CMAKE_CXX_FLAGS "-std=gnu++2b ${CMAKE_CXX_FLAGS}")
|
||||
|
@ -1641,7 +1641,6 @@ void _FASTCALL Draw3DBox(CachedEntity *ent, const rgba_t &clr)
|
||||
corners[7] = mins + Vector(0, y, z);
|
||||
|
||||
// Rotate the box and check if any point of the box isnt on the screen
|
||||
bool success = true;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
float yaw = NET_VECTOR(RAW_ENT(ent), netvar.m_angEyeAngles).y;
|
||||
@ -1654,13 +1653,8 @@ void _FASTCALL Draw3DBox(CachedEntity *ent, const rgba_t &clr)
|
||||
corners[i] += origin;
|
||||
|
||||
if (!draw::WorldToScreen(corners[i], points[i]))
|
||||
success = false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't continue if a point isn't on the screen
|
||||
if (!success)
|
||||
return;
|
||||
|
||||
rgba_t draw_clr = clr;
|
||||
// Draw the actual box
|
||||
for (int i = 1; i <= 4; i++)
|
||||
@ -1800,16 +1794,11 @@ bool GetCollide(CachedEntity *ent)
|
||||
points_r[6] = mins + Vector(x, y, z);
|
||||
points_r[7] = mins + Vector(0, y, z);
|
||||
|
||||
// Check if any point of the box isnt on the screen
|
||||
bool success = true;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (!draw::WorldToScreen(points_r[i], points[i]))
|
||||
success = false;
|
||||
return false;
|
||||
}
|
||||
// If a point isnt on the screen, return here
|
||||
if (!success)
|
||||
return false;
|
||||
|
||||
// Get max and min of the box using the newly created screen vector
|
||||
int max_x = -1;
|
||||
|
Reference in New Issue
Block a user