Skip to content

Commit

Permalink
fix test_platformer.py on slow hardware like raspi3 (player was falli…
Browse files Browse the repository at this point in the history
…ng bellow floor)
  • Loading branch information
ccanepa committed May 1, 2017
1 parent fc67b01 commit 6f67913
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/test_platformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ def start(self):

def step(self, dt):
global keyboard, scroller
if dt > 0.1:
# a too big dt will move the player through walls
# dt can be big at startup in slow hardware, as a raspi3
# so do nothing on big dt
return
vx, vy = self.target.velocity

# using the player controls, gravity and other acceleration influences
Expand Down

0 comments on commit 6f67913

Please sign in to comment.