menu stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / player.h
index 82381c27b84e14fbb0f706c62dc151e7f06fa04e..c9502a32493d780a6504663af4423c78a3a38d63 100644 (file)
--- a/player.h
+++ b/player.h
@@ -17,7 +17,8 @@ static float
    k_board_radius          = 0.3f,
    k_board_length          = 0.45f,
    k_board_allowance       = 0.04f,
-   k_friction_lat          = 8.8f,
+   //k_friction_lat          = 8.8f,
+   k_friction_lat          = 12.0f,
    k_friction_resistance   = 0.01f,
    k_max_push_speed        = 16.0f,
    k_push_accel            = 10.0f,
@@ -88,7 +89,6 @@ static struct gplayer
    
    v3f camera_pos, smooth_localcam;
    v2f angles;
-   m4x3f camera, camera_inverse;
 
    /* animation */
    double jump_time;
@@ -283,11 +283,6 @@ static void player_update_fixed(void)                                    /* 2 */
    {
       player_do_motion();
    }
-
-   player_audio(); /* FUTURE: can probably move this to post()
-                              BUT, it uses deltas from fixed step physics,
-                              AND this *might* be what we want for realtime
-                              audio, anyway. */
 }
 
 static void player_update_post(void)
@@ -314,10 +309,15 @@ static void player_update_post(void)
    if( freecam )
       player_freecam();
 
-   player_camera_update();
+   /* CAMERA POSITIONING: LAYER 0 */
+   v2_copy( player.angles, camera_angles );
+   v3_copy( player.camera_pos, camera_pos );
+   camera_update();
+
+   player_audio();
 }
 
-static void draw_player(void)                                            /* 3 */
+static void draw_player( m4x3f cam )
 {
    if( player.is_dead )
       player_model_copy_ragdoll();
@@ -325,7 +325,7 @@ static void draw_player(void)                                            /* 3 */
    shader_viewchar_use();
    vg_tex2d_bind( &tex_characters, 0 );
    shader_viewchar_uTexMain( 0 );
-   shader_viewchar_uCamera( player.camera[3] );
+   shader_viewchar_uCamera( cam[3] );
    shader_viewchar_uPv( vg.pv );
    shader_link_standard_ub( _shader_viewchar.id, 2 );
    glUniformMatrix4x3fv( _uniform_viewchar_uTransforms,