-#include "player_animation.h"
-#include "player_audio.h"
-
-/*
- * -----------------------------------------------------------------------------
- * Events
- * -----------------------------------------------------------------------------
- */
-
-static void player_init(void) /* 1 */
-{
- rb_init( &player.phys.rb );
- rb_init( &player.collide_front );
- rb_init( &player.collide_back );
-
- vg_convar_push( (struct vg_convar){
- .name = "walk_speed",
- .data = &k_walkspeed,
- .data_type = k_convar_dtype_f32,
- .opt_f32 = { .clamp = 0 },
- .persistent = 1
- });
-
- vg_convar_push( (struct vg_convar){
- .name = "run_speed",
- .data = &k_runspeed,
- .data_type = k_convar_dtype_f32,
- .opt_f32 = { .clamp = 0 },
- .persistent = 1
- });
-
- vg_convar_push( (struct vg_convar){
- .name = "walk_accel",
- .data = &k_walk_accel,
- .data_type = k_convar_dtype_f32,
- .opt_f32 = { .clamp = 0 },
- .persistent = 1
- });
-
- vg_convar_push( (struct vg_convar){
- .name = "fc",
- .data = &freecam,
- .data_type = k_convar_dtype_i32,
- .opt_i32 = { .min=0, .max=1, .clamp=1 },
- .persistent = 1
- });
-
- vg_convar_push( (struct vg_convar){
- .name = "fcs",
- .data = &fc_speed,
- .data_type = k_convar_dtype_f32,
- .opt_f32 = { .clamp = 0 },
- .persistent = 1
- });
-
- vg_function_push( (struct vg_cmd){
- .name = "reset",
- .function = reset_player
- });
-
- /* other systems */
- vg_loader_highwater( player_model_init, player_model_free, NULL );
-}
-
-/* Deal with input etc */
-static void player_update_pre(void)
-{
- struct player_phys *phys = &player.phys;
-
- if( vg_get_button_down( "reset" ) )
- {
- player.is_dead = 0;
- player.death_tick_allowance = 30;
- player_restore_frame();
-
- if( !phys->on_board )
- {
- player.angles[0] = atan2f( -phys->rb.forward[2],
- -phys->rb.forward[0] );
- }
-
- player.mdl.shoes[0] = 1;
- player.mdl.shoes[1] = 1;
-
- world_routes_notify_reset();
- }
-
- if( vg_get_button_down( "switchmode" ) )
- {
- phys->on_board ^= 0x1;