projects
/
tabakrolletjie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fetch pygame polys from ray manager.
[tabakrolletjie.git]
/
tabakrolletjie
/
lights.py
diff --git
a/tabakrolletjie/lights.py
b/tabakrolletjie/lights.py
index 39b1815fc782b02972ef9d91233d44d7b9b739d8..c143b98862326dc385658b53998934d45b7ff179 100644
(file)
--- a/
tabakrolletjie/lights.py
+++ b/
tabakrolletjie/lights.py
@@
-155,12
+155,7
@@
class BaseLight(object):
white, black = (255, 255, 255), (0, 0, 0)
ray_mask.fill(black)
white, black = (255, 255, 255), (0, 0, 0)
ray_mask.fill(black)
- for shape in self.body.shapes:
- if shape is self.fitting:
- continue
- pygame_poly = [
- pymunk.pygame_util.to_pygame(v, surface) for v in
- shape.get_vertices()]
+ for pygame_poly in self.ray_manager.pygame_polys(surface):
pygame.draw.polygon(ray_mask, white, pygame_poly, 0)
pygame.draw.aalines(ray_mask, white, True, pygame_poly, 1)
pygame.draw.polygon(ray_mask, white, pygame_poly, 0)
pygame.draw.aalines(ray_mask, white, True, pygame_poly, 1)