Fix count bug in _get_polygon_count - #1430
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Redot-Engine/redot-engine/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe editor now reports ChangesOccluder polygon count
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The light occluder returns the vertex count instead of the poly count in the _get_polygon_count function (override).
It looks like this caused the polygon to redraw unnecessarily for each vertex, which also caused the light blue color of the selected vertex not to show up on a LightOccluder2D.
This fixes that, and just returns 1 for the number of polygons (as the base does), and we can see the blue return to the selected vertex.
I despaired at removing the override entirely out of risk aversity :-P.
Summary by CodeRabbit