Kapt9 / EEPhysics

MIT License
5 stars 0 forks source link

Error in PhysicsPlayer.cs #10

Closed rubixguy closed 9 years ago

rubixguy commented 9 years ago

I found a bug in line 446 of PhysicsPlayer.cs

The bug was introduced in an edit made to it a few days ago. "moy" should become "mox", as shown below.

Line 446 now says: if ((my == 0 && moy != 0) || (speedY < 0 && my > 0) || (speedY > 0 && my < 0) || ItemId.isClimbable(current))

But it should say: if ((my == 0 && mox != 0) || (speedY < 0 && my > 0) || (speedY > 0 && my < 0) || ItemId.isClimbable(current))

Kapt9 commented 9 years ago

Thanks, fixed!

rubixguy commented 9 years ago

I think you made an error fixing the bug. You made the change at line 409 instead of line 446.

It is important for line 409 to say: if ((mx == 0 && moy != 0) || (speedX < 0 && mx > 0) || (speedX > 0 && mx < 0) || ItemId.isClimbable(current))

And line 446 should say: if ((my == 0 && mox != 0) || (speedY < 0 && my > 0) || (speedY > 0 && my < 0) || ItemId.isClimbable(current))

Kapt9 commented 9 years ago

Oh true, fixed