Skip to content

Commit

Permalink
Fixed jumping in air bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyyzhang03 committed Jun 1, 2021
1 parent 750503d commit 291cd71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traits/jump.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self, entity):

def jump(self, jumping):
if jumping:
if not self.entity.inAir and not self.entity.inJump: # redundant check
if self.entity.onGround:
self.entity.sound.play_sfx(self.entity.sound.jump)
self.entity.vel.y = self.verticalSpeed
self.entity.inAir = True
Expand Down

0 comments on commit 291cd71

Please sign in to comment.