Update hack.hpp

- Moved the flag_render_distance so that nothing will be drawn unless player is in range

Feel free to change this how you see fit
This commit is contained in:
ifBars
2023-10-14 01:51:12 -06:00
committed by GitHub
parent 9a6bbd0537
commit b05614ee63
+10 -5
View File
@@ -106,6 +106,15 @@ namespace hack {
float distance = localOrigin.calculate_distance(origin); float distance = localOrigin.calculate_distance(origin);
int roundedDistance = std::round(distance / 10); int roundedDistance = std::round(distance / 10);
/**
* I know is not the best way but a simple way to not saturate the screen with a ton of information
* From IfBars - I decided to move this up here so that it will not render anything unless the player is within the flag_render_distance
* I did this so people aren't confused on why only half the players hp values are showing, however feel free to change this however you see fit
* Personally I prefer to see everyone no matter the difference, but everyone has their preferences
*/
if (roundedDistance > config::flag_render_distance)
continue;
render::DrawBorderBox( render::DrawBorderBox(
g::hdcBuffer, g::hdcBuffer,
screenHead.x - width / 2, screenHead.x - width / 2,
@@ -137,11 +146,7 @@ namespace hack {
10 10
); );
/**
* I know is not the best way but a simple way to not saturate the screen with a ton of information
*/
if (roundedDistance > config::flag_render_distance)
continue;
render::RenderText( render::RenderText(
g::hdcBuffer, g::hdcBuffer,