craftyjs/Crafty — pull request #305 by Aldream (2012-06-26 21:11:31+00:00)
Title: Twoway - Jumps & Collisions

Introduction
----------
Hey,

During a Game Dev' Party, we used your game engine and enjoyed some of its features. However, we also found some bugs and limitations ... I thus hope to participate in your project, with my small experience but great motivation ... ;-)

Issue
----------
As a 1st fix, I picked up an easy one :
In the "Twoway" controls, the ***jump* movement** isn't calculated like the others one (in the Multiway keydown handler), but in a Twoway handler. Unlike the Multiway's handler, this one didn't trigger the *Moved* event ... This omission has in particular for consequence **not to trigger the Collision component** (*Mario would jump through the blocks ...*).

Contribution
----------
Simple : I triggered the *Moved* event at the end of this handler (and updated the attribute *movement.y*) ...

*Hoping to be of some help ...
Best regards.*