From 6a5d45ba14fcea9b77461a45be817ca03e787402 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Sun, 9 Dec 2018 21:20:53 -0600 Subject: [PATCH] Fixed faces counting bug when removing bb --- lib/renderer/bounding_box_renderer.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/renderer/bounding_box_renderer.rb b/lib/renderer/bounding_box_renderer.rb index 70f3517..78921fa 100644 --- a/lib/renderer/bounding_box_renderer.rb +++ b/lib/renderer/bounding_box_renderer.rb @@ -189,7 +189,10 @@ class IMICFPS glPopMatrix found = ObjectManager.objects.detect { |o| o == bounding_box[:object] } - @bounding_boxes.delete(key) unless found + unless found + @vertex_count -= @bounding_boxes[key][:vertices_size] + @bounding_boxes.delete(key) + end end end