6 VG_STATIC
void player__dead_update ( player_instance
*player
)
8 player_ragdoll_iter( &player
->ragdoll
);
11 VG_STATIC
void player__dead_animate ( player_instance
*player
,
12 player_animation
*anim
)
14 v3_zero( anim
->root_co
);
15 q_identity( anim
->root_q
);
17 for( int i
=0; i
<vg_list_size( anim
->pose
); i
++ ){
18 v3_zero( anim
->pose
[i
].co
);
19 v3_fill( anim
->pose
[i
].s
, 1.0f
);
20 q_identity( anim
->pose
[i
].q
);
24 VG_STATIC
void player__dead_post_animate( player_instance
*player
)
26 struct player_avatar
*av
= player
->playeravatar
;
27 struct player_dead
*d
= &player
->_dead
;
29 copy_ragdoll_pose_to_avatar( &player
->ragdoll
, player
->playeravatar
);
30 player
->cam_velocity_influence
= 1.0f
;
32 struct ragdoll_part
*part
= &player
->ragdoll
.parts
[ av
->id_hip
-1 ];
34 v3_lerp( d
->co_lpf
, part
->rb
.co
, vg
.frame_delta
*4.0f
, d
->co_lpf
);
35 v3_lerp( d
->v_lpf
, part
->rb
.v
, vg
.frame_delta
*4.0f
, d
->v_lpf
);
36 v3_lerp( d
->w_lpf
, part
->rb
.w
, vg
.frame_delta
*4.0f
, d
->w_lpf
);
38 v3_copy( d
->co_lpf
, player
->rb
.co
);
39 v3_copy( d
->v_lpf
, player
->rb
.v
);
40 v3_copy( d
->w_lpf
, player
->rb
.w
);
43 VG_STATIC
void player__dead_im_gui ( player_instance
*player
)
48 VG_STATIC
void player__dead_transition ( player_instance
*player
)
50 player
->subsystem
= k_player_subsystem_dead
;
51 copy_avatar_pose_to_ragdoll( player
->playeravatar
, &player
->ragdoll
,
54 struct player_avatar
*av
= player
->playeravatar
;
55 struct ragdoll_part
*part
= &player
->ragdoll
.parts
[ av
->id_hip
-1 ];
56 struct player_dead
*d
= &player
->_dead
;
57 v3_copy( part
->rb
.co
, d
->co_lpf
);
58 v3_copy( part
->rb
.v
, d
->v_lpf
);
59 v3_copy( part
->rb
.w
, d
->w_lpf
);
62 #endif /* PLAYER_DEAD_C */