diff --git a/units/rat.py b/units/rat.py index fb5b8fe..df31f1d 100644 --- a/units/rat.py +++ b/units/rat.py @@ -202,7 +202,9 @@ class Rat(Unit): return # Internal tunnel passage or crossroad: draw the rat normally # so it stays visible while walking through the tunnel. - self.game.render_engine.draw_image(self.render_x, self.render_y, image, anchor="nw", tag="unit") + frame = min(3, int(self.partial_move * 4)) + source_rect = (frame * image_size[0], 0, image_size[0], image_size[1]) + self.game.render_engine.draw_image(self.render_x, self.render_y, image, anchor="nw", tag="unit", source_rect=source_rect) return if not self.game.map.is_empty(cell_x, cell_y): return