+}
+static player_skate;
+
+static float
+ k_friction_lat = 12.0f,
+ k_friction_resistance = 0.01f,
+
+ k_max_push_speed = 16.0f,
+ k_push_accel = 10.0f,
+ k_push_cycle_rate = 8.0f,
+
+ k_steer_ground = 2.5f,
+ k_steer_air = 3.6f,
+
+ k_jump_charge_speed = (1.0f/0.4f),
+ k_jump_force = 5.0f,
+
+ k_cog_spring = 0.2f,
+ k_cog_damp = 0.02f,
+ k_cog_mass_ratio = 0.9f,
+
+ k_mmthrow_steer = 1.0f,
+ k_mmthrow_scale = 6.0f,
+ k_mmcollect_lat = 2.0f,
+ k_mmcollect_vert = 0.0f,
+ k_mmdecay = 12.0f,
+ k_spring_angular = 1.0f,
+
+ k_spring_force = 300.0f,
+ k_spring_dampener = 5.0f,
+
+ k_grind_spring = 50.0f,
+ k_grind_aligment = 10.0f,
+ k_grind_dampener = 5.0f,
+
+ k_surface_spring = 100.0f,
+ k_surface_dampener = 40.0f,
+ k_manul_spring = 200.0f,
+ k_manul_dampener = 30.0f,
+ k_board_interia = 8.0f,
+
+ k_grind_decayxy = 30.0f,
+ k_grind_axel_min_vel = 1.0f,
+ k_grind_axel_max_angle = 0.95f, /* cosine(|a|) */
+ k_grind_axel_max_vangle = 0.4f,
+ k_grind_max_friction = 3.0f,
+ k_grind_max_edge_angle = 0.97f,
+
+ k_board_length = 0.45f,
+ k_board_width = 0.13f,
+ k_board_end_radius = 0.1f,
+ k_board_radius = 0.14f, /* 0.07 */
+
+ k_grind_balance = -40.0f;
+
+static void player__skate_register(void)
+{
+ VG_VAR_F32( k_grind_dampener, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_spring, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_aligment, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_surface_spring, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_surface_dampener, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_board_interia, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_decayxy, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_axel_min_vel, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_axel_max_angle, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_max_friction, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_grind_balance, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_friction_lat, flags=VG_VAR_CHEAT );
+
+ VG_VAR_F32( k_cog_spring, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_cog_damp, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_cog_mass_ratio, flags=VG_VAR_CHEAT );
+
+ VG_VAR_F32( k_spring_force, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_spring_dampener, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_spring_angular, flags=VG_VAR_CHEAT );
+
+ VG_VAR_F32( k_mmthrow_scale, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_mmcollect_lat, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_mmcollect_vert, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_mmdecay, flags=VG_VAR_CHEAT );
+ VG_VAR_F32( k_mmthrow_steer, flags=VG_VAR_CHEAT );
+}
+
+static void player__skate_bind (void);
+static void player__skate_pre_update (void);
+static void player__skate_update (void);
+static void player__skate_post_update (void);
+static void player__skate_im_gui (void);
+static void player__skate_animate (void);
+static void player__skate_pose (void *animator, player_pose *pose);
+static void player__skate_post_animate (void);
+static void player__skate_reset (ent_spawn *rp);
+
+static void player__skate_clear_mechanics(void);
+static void player__skate_reset_animator(void);
+static void player__approximate_best_trajectory(void);
+
+struct player_subsystem_interface static player_subsystem_skate = {
+ .system_register = player__skate_register,
+ .bind = player__skate_bind,
+ .reset = player__skate_reset,
+ .pre_update = player__skate_pre_update,
+ .update = player__skate_update,
+ .post_update = player__skate_post_update,
+ .im_gui = player__skate_im_gui,
+ .animate = player__skate_animate,
+ .pose = player__skate_pose,
+ .post_animate = player__skate_post_animate,
+
+ .animator_data = &player_skate.animator,
+ .animator_size = sizeof(player_skate.animator),
+ .name = "Skate"