changeset 422:7c0643e51f33

Pass bounds to sprite.fix_bounds
author Neil Muller <drnlmuller@gmail.com>
date Sat, 09 Apr 2011 18:11:56 +0200
parents c9f8413fe644
children b858b38edea4
files skaapsteker/physics.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/physics.py	Sat Apr 09 18:11:32 2011 +0200
+++ b/skaapsteker/physics.py	Sat Apr 09 18:11:56 2011 +0200
@@ -168,8 +168,8 @@
         self.rect = old_rect
         return not bool(new_collisions - old_collisions)
 
-    def fix_bounds(self):
-        print "Killing", self, self.rect, self._float_pos
+    def fix_bounds(self, bounds):
+        print "Killing", self, self.rect, self._float_pos, bounds
         self.kill()
 
 
@@ -273,7 +273,7 @@
         inbound = self._bounds.colliderect
         for sprite in self._mobiles:
             if not inbound(sprite):
-                sprite.fix_bounds()
+                sprite.fix_bounds(self._bounds)
 
         # position update and collision check (do last)
         for sprite in self._mobiles: