- if( player->input_jump->button.value ){
- float d = v3_dot( player->basis[1], player->rb.v );
- v3_muladds( player->rb.v, player->basis[1], -d, player->rb.v );
- v3_muladds( player->rb.v, player->basis[1], 5.0f, player->rb.v );
- w->state.activity = k_walk_activity_air;
- prev_state = k_walk_activity_air;
- accel_speed = k_walk_air_accel;
- nominal_speed = k_airspeed;
+ if( w->state.jump_queued ){
+ w->state.jump_queued = 0;
+
+ f32 t = vg.time - w->state.jump_input_time;
+ if( t < PLAYER_JUMP_EPSILON ){
+ float d = v3_dot( player->basis[1], player->rb.v );
+ v3_muladds( player->rb.v, player->basis[1], -d, player->rb.v );
+ v3_muladds( player->rb.v, player->basis[1], 5.0f, player->rb.v );
+ w->state.activity = k_walk_activity_air;
+ prev_state = k_walk_activity_air;
+ accel_speed = k_walk_air_accel;
+ nominal_speed = k_airspeed;
+ }