menu stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / player.h
index 0d773389945602aea7344500dfb410c8317024a0..c9502a32493d780a6504663af4423c78a3a38d63 100644 (file)
--- a/player.h
+++ b/player.h
@@ -89,7 +89,6 @@ static struct gplayer
    
    v3f camera_pos, smooth_localcam;
    v2f angles;
-   m4x3f camera, camera_inverse;
 
    /* animation */
    double jump_time;
@@ -284,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)
@@ -315,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();
@@ -326,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,