Skip to content

Commit

Permalink
[#291] Disable ObjectEntity falling flag when there is no gravity.
Browse files Browse the repository at this point in the history
- Thanks @Deathspike for #478
  • Loading branch information
parasyte committed Apr 10, 2014
1 parent 5719fe0 commit 989f1d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/entity/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,9 @@
// going up, collision with ceiling
else if (collision.y < 0) {
if (!prop.isPlatform && !prop.isLadder && !prop.isTopLadder) {
this.falling = true;
if (this.gravity) {
this.falling = true;
}
// cancel the y velocity
this.vel.y = 0;
}
Expand Down

0 comments on commit 989f1d6

Please sign in to comment.