Mercurial > rinkhals
changeset 196:edcb5edfa0ff
If the closest chicken is gone, clear it.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Fri, 04 Sep 2009 19:27:26 +0000 |
parents | 9d31cfc3afde |
children | d74693555b86 |
files | gamelib/animal.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/animal.py Fri Sep 04 19:26:02 2009 +0000 +++ b/gamelib/animal.py Fri Sep 04 19:27:26 2009 +0000 @@ -284,6 +284,7 @@ min_dist = 999 if self.closest not in gameboard.chickens: # Either no target, or someone ate it + self.closest = None for chicken in gameboard.chickens: dist = chicken.pos.dist(self.pos) if chicken.abode: