restrict to spaces the user can actually see
This commit is contained in:
parent
0a6682946e
commit
06ea24bf10
1 changed files with 1 additions and 1 deletions
|
@ -326,7 +326,7 @@ class Router:
|
||||||
continue
|
continue
|
||||||
if self.spaces[space].geometry_prep.contains(point):
|
if self.spaces[space].geometry_prep.contains(point):
|
||||||
return self.spaces[space]
|
return self.spaces[space]
|
||||||
spaces = (self.spaces[space] for space in level.spaces)
|
spaces = (self.spaces[space] for space in level.spaces if space not in excluded_spaces)
|
||||||
spaces = ((space, space.geometry.distance(point)) for space in spaces)
|
spaces = ((space, space.geometry.distance(point)) for space in spaces)
|
||||||
spaces = tuple((space, distance) for space, distance in spaces if distance < 0.5)
|
spaces = tuple((space, distance) for space, distance in spaces if distance < 0.5)
|
||||||
if not spaces:
|
if not spaces:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue