diff --git a/src/bin/flat/main.rs b/src/bin/flat/main.rs index 51e5983..86908bb 100644 --- a/src/bin/flat/main.rs +++ b/src/bin/flat/main.rs @@ -119,19 +119,16 @@ fn draw_ray_2(gc: &mut Vec, space: &Space, base: Vec2, dir: Vec2) { break; } let sub = space.which_subspace(ray.pos); - if sub == Boundary { - continue; - } + let ret = match sub { + Inner => space.trace_inner(ray), + Outer => space.trace_outer(ray), + Boundary => continue, + }; gc.stroke(); gc.new_dash_pattern(); // gc.dash_length(6.0); gc.new_path(); gc.move_to(ray.pos.x, ray.pos.y); - let ret = match sub { - Inner => space.trace_inner(ray), - Outer => space.trace_outer(ray), - Boundary => panic!(), - }; for hit in ret.objects { let obj = space.objs[hit.id as usize]; hits.move_to(obj.loc.pos.x, obj.loc.pos.y);