X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_drive.c;h=1c83205e0f5529fc65014d03984a216ba2063040;hb=53597f45307d8a2120e3a0bbe71797b216e8750b;hp=2423d35189274fe859d71092ce7da8ed27ed14d5;hpb=223e75026f958029f9664380ed20a5daa3ee2ae7;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_drive.c b/player_drive.c index 2423d35..1c83205 100644 --- a/player_drive.c +++ b/player_drive.c @@ -29,19 +29,20 @@ VG_STATIC void player__drive_post_update( player_instance *player ) v3_copy( drive->vehicle->obj.rb.w, player->rb.w ); } -VG_STATIC void player__drive_animate( player_instance *player, - player_animation *dest ) -{ +VG_STATIC void player__drive_animate( player_instance *player ){} + +VG_STATIC void player__drive_pose( player_instance *player, player_pose *pose ){ struct player_drive *drive = &player->_drive; struct skeleton *sk = &player->playeravatar->sk; - skeleton_sample_anim( sk, drive->anim_drive, 0.0f, dest->pose ); - v3_copy( player->rb.co, dest->root_co ); - v4_copy( player->rb.q, dest->root_q ); + + skeleton_sample_anim( sk, drive->anim_drive, 0.0f, pose->keyframes ); + v3_copy( player->rb.co, pose->root_co ); + v4_copy( player->rb.q, pose->root_q ); } VG_STATIC void player__drive_post_animate( player_instance *player ) { - if( player->camera_mode == k_cam_firstperson ) + if( player->cam_control.camera_mode == k_cam_firstperson ) player->cam_velocity_influence = 0.0f; else player->cam_velocity_influence = 1.0f;