Use pre-created LIT_BY filter.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 17:42:17 +0000 (19:42 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 17:42:17 +0000 (19:42 +0200)
tabakrolletjie/lights.py

index 27f349e65ec5c586738acdcaad946bd020ee6fa7..d9f2b2b660fbfddb3cb52e8278f18d7e696e6a1e 100644 (file)
@@ -66,7 +66,7 @@ class LightManager(object):
             surface = pygame.display.get_surface()
             pos = pymunk.pygame_util.from_pygame(pos, surface)
         point_info_list = self._space.point_query(
-            pos, max_distance, pymunk.ShapeFilter(mask=LIGHT_CATEGORY))
+            pos, max_distance, LIT_BY_FILTER)
         lights = [p.shape.body.light for p in point_info_list]
         return [
             light for light in lights