Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
MjnMixael committed Dec 30, 2024
1 parent f411332 commit b1b7c85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/hud/hudconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ void hud_config_init_ui(bool API_Access, int x, int y, int w)
HC_gauge_coords.resize(NUM_HUD_GAUGES);

// Clear the mouse coords array
for (int count = 0; count < NUM_HUD_GAUGES; ++count) {
HC_gauge_mouse_coords[count] = {-1, -1, -1, -1};
for (auto& coord : HC_gauge_mouse_coords) {
coord = {-1, -1, -1, -1};
}

if (w < 0) {
Expand Down
8 changes: 4 additions & 4 deletions code/hud/hudconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ class BoundingBox {

bool isOverlapping(const BoundingBox& other) const
{
return !(x2 < other.x1 || // Completely to the left
x1 > other.x2 || // Completely to the right
y2 < other.y1 || // Completely above
y1 > other.y2); // Completely below
return (x2 >= other.x1 && // Not completely to the left
x1 <= other.x2 && // Not completely to the right
y2 >= other.y1 && // Not completely above
y1 <= other.y2); // Not completely below
}

// Check if the bounding box is valid (no negative coordinates)
Expand Down

0 comments on commit b1b7c85

Please sign in to comment.