# HG changeset patch # User Neil Muller # Date 1302360098 -7200 # Node ID 488ab520408c9ecd80b7d56cf1177794c4f71ebd # Parent 6850a3ab3aac1b525aa742fe19d4d8364fc9c0ff Collide with floors diff -r 6850a3ab3aac -r 488ab520408c skaapsteker/sprites/base.py --- a/skaapsteker/sprites/base.py Sat Apr 09 16:40:01 2011 +0200 +++ b/skaapsteker/sprites/base.py Sat Apr 09 16:41:38 2011 +0200 @@ -229,12 +229,14 @@ def collided(self, other): Monster.collided(self, other) # Check if the object we've collided with is the same height our higher than us - if other.block and other.collide_rect.bottom <= self.collide_rect.bottom: + if (other.block or other.floor) and other.collide_rect.bottom <= self.collide_rect.bottom: # Change direction if self.facing == 'left': self.facing = 'right' + self._update_image(True) else: self.facing = 'left' + self._update_image(True) class NPC(AnimatedGameSprite):