comparison skaapsteker/sprites/player.py @ 398:6850a3ab3aac

Remove redundant check
author Neil Muller <drnlmuller@gmail.com>
date Sat, 09 Apr 2011 16:40:01 +0200
parents dc534c2c475c
children bbfc2cc07ba4
comparison
equal deleted inserted replaced
397:00dbc053f9a0 398:6850a3ab3aac
134 # Prune stale objects from the list 134 # Prune stale objects from the list
135 self._last_collide.remove(obj) 135 self._last_collide.remove(obj)
136 continue 136 continue
137 clip = obj.collide_rect.clip(self.collide_rect) 137 clip = obj.collide_rect.clip(self.collide_rect)
138 clip_area += clip.width * clip.height 138 clip_area += clip.width * clip.height
139 if (obj.floor or obj.block) and \ 139 if clip.width > TILE_SIZE[0] / 2 and \
140 clip.width > TILE_SIZE[0] / 2 and \
141 self.collide_rect.bottom < obj.collide_rect.top + TILE_SIZE[1] / 3: 140 self.collide_rect.bottom < obj.collide_rect.top + TILE_SIZE[1] / 3:
142 delta = self.rect.bottom - self.collide_rect.bottom 141 delta = self.rect.bottom - self.collide_rect.bottom
143 self.collide_rect.bottom = obj.collide_rect.top - 1 142 self.collide_rect.bottom = obj.collide_rect.top - 1
144 self.rect.bottom = self.collide_rect.bottom + delta 143 self.rect.bottom = self.collide_rect.bottom + delta
145 self.init_pos() 144 self.init_pos()