|
@@ -74,7 +74,8 @@
|
|
var index = watchedKeyCodes.indexOf( e.keyCode );
|
|
var index = watchedKeyCodes.indexOf( e.keyCode );
|
|
if ( index >= 0 ) {
|
|
if ( index >= 0 ) {
|
|
|
|
|
|
- keysPressed[ watchedKeyCodes[ index ] ] = down; e.preventDefault();
|
|
|
|
|
|
+ keysPressed[ watchedKeyCodes[ index ] ] = down;
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -138,9 +139,13 @@
|
|
if ( pads[ j ].distanceToSquared( motion.position ) < 2.3 ) {
|
|
if ( pads[ j ].distanceToSquared( motion.position ) < 2.3 ) {
|
|
|
|
|
|
// calculate velocity towards another side of platform from jump pad position
|
|
// calculate velocity towards another side of platform from jump pad position
|
|
- temp.copy( pads[ j ] ); temp.y = 0; temp.setLength( - 0.8 ); temp.y = 0.7;
|
|
|
|
|
|
+ temp.copy( pads[ j ] );
|
|
|
|
+ temp.y = 0; temp.setLength( - 0.8 );
|
|
|
|
+ temp.y = 0.7;
|
|
|
|
|
|
- motion.airborne = true; motion.velocity.copy( temp ); break;
|
|
|
|
|
|
+ motion.airborne = true;
|
|
|
|
+ motion.velocity.copy( temp );
|
|
|
|
+ break;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|