- if( w->state.outro_anim )
- {
- float outro_length = (float)w->state.outro_anim->length /
- w->state.outro_anim->rate,
- outro_time = vg.time - w->state.outro_start_time;
-
- if( outro_time >= outro_length )
- {
- w->state.outro_anim = NULL;
- if( w->state.outro_type == k_walk_outro_drop_in )
- {
- temp_drop_in_finish( player );
+ return (struct skeleton_anim *[]){
+ [k_walk_outro_none] = NULL,
+ [k_walk_outro_jump_to_air] = w->anim_jump_to_air,
+ [k_walk_outro_regular] = w->anim_intro,
+ [k_walk_outro_drop_in] = w->anim_drop_in
+ }[ type ];
+}
+
+
+static void player__walk_pre_update(void){
+ struct player_walk *w = &player_walk;
+
+ if( !localplayer.immobile )
+ player_look( localplayer.angles, skaterift.time_rate );
+
+ v2f steer;
+ joystick_state( k_srjoystick_steer, steer );
+
+ if( w->state.activity == k_walk_activity_sit ){
+ if( w->state.sit_t < 1.0f )
+ w->state.sit_t = vg_minf( 1.0f, w->state.sit_t + vg.time_delta );
+
+ if( button_down(k_srbind_sit) || (v2_length2(steer)>0.2f) ||
+ button_down(k_srbind_jump) ){
+ w->state.activity = k_walk_activity_sit_up;
+ }
+ return;
+ }
+ else if( w->state.activity == k_walk_activity_sit_up ){
+ if( w->state.sit_t > 0.0f )
+ w->state.sit_t = vg_maxf( 0.0f, w->state.sit_t - vg.time_delta );
+ else
+ w->state.activity = k_walk_activity_ground;
+
+ if( button_down(k_srbind_sit) )
+ w->state.activity = k_walk_activity_sit;
+
+ return;
+ }
+ else if( w->state.activity == k_walk_activity_ground ){
+ if( button_down(k_srbind_sit) ){
+ v3_zero( localplayer.rb.v );
+ w->state.activity = k_walk_activity_sit;
+ return;
+ }
+ }
+
+ w->state.sit_t = 0.0f;
+
+ if( w->state.outro_type ){
+ struct skeleton_anim *anim = player_walk_outro_anim(w->state.outro_type);
+
+ f32 outro_length = (f32)anim->length / anim->rate,
+ outro_time = vg.time - w->state.outro_start_time;
+
+ if( outro_time >= outro_length ){
+ if( w->state.outro_type == k_walk_outro_drop_in ){
+ player_walk_drop_in_to_skate();
+ }
+ else if( w->state.outro_type == k_walk_outro_jump_to_air ){
+ player_walk_generic_to_skate( k_skate_activity_air, 0.0f );