Changeset 148:0474df61d5b1


Ignore:
Timestamp:
Apr 5, 2011, 3:13:32 PM (9 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Message:

Clamp very slow horizontal motion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/player.py

    r147 r148  
    5454        v_x, v_y = self.velocity
    5555        self._animation_frame += abs(v_x) / 3000.0
    56         if v_x == 0:
     56        if abs(v_x) < 10:
     57            # Clamp when we're not moving at least 5 pixel / s
     58            self.velocity = (0, v_y)
    5759            self.running = False
    5860        else:
Note: See TracChangeset for help on using the changeset viewer.