- v2f input = { player->input_js2h->axis.value,
- player->input_js2v->axis.value };
-
- if( cl_invert_y )
- input[1] *= -1.0f;
-
- if( (v2_length2(last_input) > 0.001f) && (v2_length2(input) > 0.001f) ){
- v2_sub( input, last_input, vel );
- v2_muls( vel, 1.0f/vg.time_delta, vel );
- }
- else{
- v2_zero( vel );
- }
-
- v2_lerp( vel_smooth, vel, vg.time_delta*8.0f, vel_smooth );
-
- v2_muladds( angles, vel_smooth, vg.time_delta, angles );
- v2_copy( input, last_input );
- }
- else{
- angles[0] += player->input_js2h->axis.value * vg.time_delta * 4.0f;
-
- float input_y = player->input_js2v->axis.value * vg.time_delta * 4.0f;
- if( cl_invert_y )
- input_y *= -1.0f;