Skip to content

Commit

Permalink
Add gravity line true hitbox visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyTally committed Aug 13, 2023
1 parent e2c3ab9 commit cd9edcd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions desktop_version/src/LevelDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,17 @@ namespace level_debugger
}

graphics.draw_rect(bounding_box.x, bounding_box.y, bounding_box.w, bounding_box.h, graphics.getRGB(15, 90, 90));

// For gravity lines, show the true hitbox.
if (obj.entities[i].type == 9)
{
graphics.draw_rect(bounding_box.x - 1, bounding_box.y + 1, bounding_box.w + 2, bounding_box.h, graphics.getRGB(90, 90, 15));
}
else if (obj.entities[i].type == 10)
{
graphics.fill_rect(bounding_box.x - 2, bounding_box.y - 1, bounding_box.w + 1, bounding_box.h + 2, graphics.getRGB(90, 90, 15));
}

}

for (int i = 0; i < (int) obj.blocks.size(); i++)
Expand Down

0 comments on commit cd9edcd

Please sign in to comment.