Mercurial > boomslang
changeset 484:a7ed199f69d5
Call thing.leave not scene.leave when removing things
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 29 Aug 2010 19:40:06 +0200 |
parents | dd42f75297ba |
children | 5bd6bd3d42fa |
files | gamelib/state.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/state.py Sun Aug 29 17:16:56 2010 +0200 +++ b/gamelib/state.py Sun Aug 29 19:40:06 2010 +0200 @@ -285,7 +285,9 @@ def remove_thing(self, thing): del self.things[thing.name] - self.leave() + if thing is self.state.current_thing: + self.state.current_thing.leave() + self.state.current_thing = None def _get_description(self): text = (self.state.current_thing and