- if( player.is_dead )
- player_model_copy_ragdoll();
-
- shader_viewchar_use();
- vg_tex2d_bind( &tex_characters, 0 );
- shader_viewchar_uTexMain( 0 );
- shader_viewchar_uCamera( player.camera[3] );
- shader_viewchar_uPv( vg_pv );
- shader_link_standard_ub( _shader_viewchar.id, 2 );
- glUniformMatrix4x3fv( _uniform_viewchar_uTransforms,
- player.mdl.sk.bone_count,
- 0,
- (float *)player.mdl.sk.final_mtx );
-
- mesh_bind( &player.mdl.mesh );
- mesh_draw( &player.mdl.mesh );
+ /* transform definition */
+ rigidbody rb;
+ v3f angles;
+
+ bool have_glider, glider_orphan, drowned;
+
+ /*
+ * Camera management
+ * ---------------------------
+ */
+ vg_camera cam;
+ struct player_cam_controller cam_control;
+ f32 cam_trackshake;
+
+ float cam_velocity_influence,
+ cam_velocity_coefficient,
+ cam_velocity_constant,
+ cam_velocity_coefficient_smooth,
+ cam_velocity_constant_smooth,
+ cam_velocity_influence_smooth,
+ cam_dist,
+ cam_dist_smooth;
+
+ v3f cam_land_punch, cam_land_punch_v;
+ ent_gate *gate_waiting;
+ int deferred_frame_record;
+
+ int immobile;
+
+ int rewinded_since_last_gate;
+
+ /*
+ * Network
+ * --------------------------------------------------
+ */
+ u16 boundary_hash;
+ struct net_sfx {
+ u8 system, priority, id;
+ f32 subframe, volume;
+ v3f location;
+ }
+ sfx_buffer[4], /* large timeframe 1/10s; for networking */
+ local_sfx_buffer[2]; /* per framerate 1/30s; for replay */
+ u32 sfx_buffer_count,
+ local_sfx_buffer_count;
+
+ /*
+ * Animation
+ * --------------------------------------------------
+ */
+
+ struct player_ragdoll ragdoll;
+ struct player_model fallback_model;
+ struct player_board fallback_board;
+
+ u16 board_view_slot, playermodel_view_slot;
+
+ player_pose pose;
+ player_pose holdout_pose;
+ float holdout_time;
+
+ m4x3f *final_mtx;
+
+ /*
+ * Subsystems
+ * -------------------------------------------------
+ */
+
+ enum player_subsystem subsystem,
+ observing_system;
+
+ /*
+ * Rendering
+ */
+ mdl_context skeleton_meta;
+ struct skeleton skeleton;
+
+ u8 id_hip,
+ id_chest,
+ id_ik_hand_l,
+ id_ik_hand_r,
+ id_ik_elbow_l,
+ id_ik_elbow_r,
+ id_head,
+ id_foot_l,
+ id_foot_r,
+ id_ik_foot_l,
+ id_ik_foot_r,
+ id_ik_knee_l,
+ id_ik_knee_r,
+ id_wheel_l,
+ id_wheel_r,
+ id_board,
+ id_eyes,
+ id_world;
+
+ u8 skeleton_mirror[32];
+
+ struct player_effects_data effect_data;