From cd9edcd3835f3b537b69af1ca69f8ad1981dba57 Mon Sep 17 00:00:00 2001 From: AllyTally Date: Sun, 13 Aug 2023 13:23:47 -0300 Subject: [PATCH] Add gravity line true hitbox visuals --- desktop_version/src/LevelDebugger.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/desktop_version/src/LevelDebugger.cpp b/desktop_version/src/LevelDebugger.cpp index 735a414015..431014b5ab 100644 --- a/desktop_version/src/LevelDebugger.cpp +++ b/desktop_version/src/LevelDebugger.cpp @@ -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++)