diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2022-11-22 23:09:30 +0100 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-02-07 14:30:16 +0100 |
commit | 826e54fa7356a16f67730f08e4a6fcc8c33c6622 (patch) | |
tree | 41a48c14ec1787163462327ff3507e745bd27050 /scene/main | |
parent | 3f02cf7ced320f25ac5f4f72d7a57d98296bfcd1 (diff) |
Some code simplifications
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index cbb34a480b..25499d4a2b 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -380,7 +380,7 @@ void Viewport::_notification(int p_what) { if (get_tree()->is_debugging_collisions_hint()) { PhysicsServer2D::get_singleton()->space_set_debug_contacts(find_world_2d()->get_space(), get_tree()->get_collision_debug_contact_count()); contact_2d_debug = RenderingServer::get_singleton()->canvas_item_create(); - RenderingServer::get_singleton()->canvas_item_set_parent(contact_2d_debug, find_world_2d()->get_canvas()); + RenderingServer::get_singleton()->canvas_item_set_parent(contact_2d_debug, current_canvas); #ifndef _3D_DISABLED PhysicsServer3D::get_singleton()->space_set_debug_contacts(find_world_3d()->get_space(), get_tree()->get_collision_debug_contact_count()); contact_3d_debug_multimesh = RenderingServer::get_singleton()->multimesh_create(); |