Skip to content

Commit

Permalink
Merge pull request #516 from mnemotic/speed-fix
Browse files Browse the repository at this point in the history
Fix `multiway`'s behavior when dealing with zero-valued axis of `speed`.
  • Loading branch information
starwed committed Aug 11, 2013
2 parents b4cd71d + 68a116d commit f28ae34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ Crafty.c("Multiway", {
this._speed = { x: 3, y: 3 };

if (keys) {
if (speed.x && speed.y) {
if (speed.x !== undefined && speed.y !== undefined) {
this._speed.x = speed.x;
this._speed.y = speed.y;
} else {
Expand Down

0 comments on commit f28ae34

Please sign in to comment.