+#ifndef PLAYER_DEAD_C
+#define PLAYER_DEAD_C
+
+#include "player.h"
+
+VG_STATIC void player__dead_update ( player_instance *player )
+{
+ player_ragdoll_iter( &player->ragdoll );
+}
+
+VG_STATIC void player__dead_animate ( player_instance *player,
+ player_animation *anim )
+{
+ v3_zero( anim->root_co );
+ q_identity( anim->root_q );
+
+ for( int i=0; i<vg_list_size( anim->pose ); i ++ )
+ {
+ v3_zero( anim->pose[i].co );
+ v3_fill( anim->pose[i].s, 1.0f );
+ q_identity( anim->pose[i].q );
+ }
+}
+
+VG_STATIC void player__dead_post_animate( player_instance *player )
+{
+ struct player_avatar *av = player->playeravatar;
+ struct player_dead *d = &player->_dead;
+
+ copy_ragdoll_pose_to_avatar( &player->ragdoll, player->playeravatar );
+ player->cam_velocity_influence = 1.0f;
+
+ struct ragdoll_part *part = &player->ragdoll.parts[ av->id_hip-1 ];
+
+ v3_lerp( d->co_lpf, part->rb.co, vg.frame_delta*4.0f, d->co_lpf );
+ v3_lerp( d->v_lpf, part->rb.v, vg.frame_delta*4.0f, d->v_lpf );
+ v3_lerp( d->w_lpf, part->rb.w, vg.frame_delta*4.0f, d->w_lpf );
+
+ v3_copy( d->co_lpf, player->rb.co );
+ v3_copy( d->v_lpf, player->rb.v );
+ v3_copy( d->w_lpf, player->rb.w );
+}
+
+VG_STATIC void player__dead_im_gui ( player_instance *player )
+{
+
+}
+
+VG_STATIC void player__dead_transition ( player_instance *player )
+{
+ player->subsystem = k_player_subsystem_dead;
+ copy_avatar_pose_to_ragdoll( player->playeravatar, &player->ragdoll,
+ player->rb.v );
+
+ struct player_avatar *av = player->playeravatar;
+ struct ragdoll_part *part = &player->ragdoll.parts[ av->id_hip-1 ];
+ struct player_dead *d = &player->_dead;
+ v3_copy( part->rb.co, d->co_lpf );
+ v3_copy( part->rb.v, d->v_lpf );
+ v3_copy( part->rb.w, d->w_lpf );
+}
+
+#endif /* PLAYER_DEAD_C */