Mercurial > nagslang
changeset 656:2d408092bbae bugfixes
Cleanup collision handlers when we're done with the space
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 08 Sep 2013 04:33:55 +0200 |
parents | baacd0462d8e |
children | 2b9f3bd74635 |
files | nagslang/screens/area.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nagslang/screens/area.py Sun Sep 08 03:15:30 2013 +0200 +++ b/nagslang/screens/area.py Sun Sep 08 04:33:55 2013 +0200 @@ -101,6 +101,13 @@ def teardown(self): sound.stop() + for collision_type in CALLBACK_COLLIDERS: + self.space.remove_collision_handler( + COLLISION_TYPE_PLAYER, collision_type) + self.space.remove_collision_handler( + COLLISION_TYPE_FURNITURE, collision_type) + self.space.remove_collision_handler( + COLLISION_TYPE_WEREWOLF_ATTACK, collision_type) @classmethod def list_areas(self):