Skip to content

Commit

Permalink
bugfix: put end-of-screen handling back into the collision detection
Browse files Browse the repository at this point in the history
code
  • Loading branch information
schaul committed Oct 30, 2013
1 parent 4527d04 commit d3e4553
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vgdl/core.py
Expand Up @@ -449,6 +449,14 @@ def _eventHandling(self):
tmp.extend(v)
ss[g] = (tmp, len(tmp))

# special case for end-of-screen
if g2 == "EOS":
ss1, l1 = ss[g1]
for s1 in ss1:
if not pygame.Rect((0,0), self.screensize).contains(s1.rect):
effect(s1, None, self, **kwargs)
continue

# iterate over the shorter one
ss1, l1 = ss[g1]
ss2, l2 = ss[g2]
Expand Down

0 comments on commit d3e4553

Please sign in to comment.