glider stuff
[carveJwlIkooP6JGAAIwe30JlM.git] / player_drive.c
index 90036a66f2549007a1f511b7d0c0fc0c93f024e3..7881302865b1a2bd2fbe0ad474abf98958a50390 100644 (file)
@@ -17,16 +17,16 @@ static void player__drive_pre_update(void){
 static void player__drive_update(void){}
 
 static void player__drive_post_update(void){
-   v3_copy( player_drive.vehicle->obj.rb.co,localplayer.rb.co );
-   v3_copy( player_drive.vehicle->obj.rb.v, localplayer.rb.v );
-   v4_copy( player_drive.vehicle->obj.rb.q, localplayer.rb.q );
-   v3_copy( player_drive.vehicle->obj.rb.w, localplayer.rb.w );
+   v3_copy( player_drive.vehicle->rb.co,localplayer.rb.co );
+   v3_copy( player_drive.vehicle->rb.v, localplayer.rb.v );
+   v4_copy( player_drive.vehicle->rb.q, localplayer.rb.q );
+   v3_copy( player_drive.vehicle->rb.w, localplayer.rb.w );
 }
 
 static void player__drive_animate(void){}
 
 static void player__drive_pose( void *animator, player_pose *pose ){
-   struct skeleton *sk = &localplayer.playeravatar->sk;
+   struct skeleton *sk = &localplayer.skeleton;
 
    skeleton_sample_anim( sk, player_drive.anim_drive, 0.0f, pose->keyframes );
    v3_copy( localplayer.rb.co, pose->root_co );
@@ -39,7 +39,7 @@ static void player__drive_post_animate(void){
    else
       localplayer.cam_velocity_influence = 1.0f;
 
-   rigidbody *rb = &gzoomer.obj.rb;
+   rigidbody *rb = &gzoomer.rb;
    float yaw = atan2f( -rb->to_world[2][0], rb->to_world[2][2] ),
        pitch = atan2f
                ( 
@@ -60,14 +60,9 @@ static void player__drive_im_gui(void){
 }
 
 static void player__drive_bind(void){
-   struct player_avatar *av = localplayer.playeravatar;
-   struct skeleton *sk = &av->sk;
-
+   struct skeleton *sk = &localplayer.skeleton;
    player_drive.vehicle = &gzoomer;
    player_drive.anim_drive = skeleton_get_anim( sk, "idle_cycle+y" );
 }
 
-static void player__drive_reset( ent_spawn *rp ){
-}
-
 #endif /* PLAYER_DRIVE_C */