X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_glide.h;h=f8f6dd99dffee4de2a9d85f47d91c8c6b025826f;hb=888e62fcd8f9777cee774fbb8fab2e52660303a7;hp=2e2d1eb288d67ae52f5999d47971263011ef169c;hpb=a5d462e0b43a8f0c4a36a17a11636a56f324e45f;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_glide.h b/player_glide.h index 2e2d1eb..f8f6dd9 100644 --- a/player_glide.h +++ b/player_glide.h @@ -2,6 +2,7 @@ #define PLAYER_GLIDE_H #include "player.h" +#include "trail.h" struct player_glide { struct skeleton_anim *anim_glide; @@ -12,6 +13,14 @@ struct player_glide { } animator; + /* this sucks */ + struct remote_glider_animator { + v3f root_co; + v4f root_q; + f32 s; + } + remote_animator; + v3f info_lift, info_slip, info_drag; @@ -36,6 +45,9 @@ struct player_glide { } parts[4]; + u32 trail_count; + v3f trail_positions[2]; + mdl_context glider; GLuint *glider_textures; glmesh glider_mesh; @@ -79,6 +91,19 @@ static player_glide = { } }; +static trail_system trails_glider[] = { +{ + .width = 0.035f, + .lifetime = 5.0f, + .min_dist = 0.5f +}, +{ + .width = 0.035f, + .lifetime = 5.0f, + .min_dist = 0.5f +}, +}; + static void player_glide_pre_update(void); static void player_glide_update(void); static void player_glide_post_update(void); @@ -90,6 +115,14 @@ static void player_glide_im_gui(void); static void player_glide_bind(void); static void player_glide_transition(void); static bool glider_physics( v2f steer ); +static void player_glide_animator_exchange( bitpack_ctx *ctx, void *data ); +static void player_glide_render( camera *cam, world_instance *world, + player_pose *pose ); +static void render_glider_model( camera *cam, world_instance *world, + m4x3f mmdl, enum board_shader shader ); +static void +player_glide_remote_animator_exchange( bitpack_ctx *ctx, void *data ); +static void player_glide_equip_glider(void); struct player_subsystem_interface static player_subsystem_glide = { .pre_update = player_glide_pre_update, @@ -98,6 +131,7 @@ struct player_subsystem_interface static player_subsystem_glide = { .animate = player_glide_animate, .pose = player_glide_pose, .post_animate = player_glide_post_animate, + .network_animator_exchange = player_glide_animator_exchange, .im_gui = player_glide_im_gui, .bind = player_glide_bind,