X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;ds=sidebyside;f=player_skate.h;h=269e552cfff54d3340bc1cfbff949a85c6938ad0;hb=7b4f1548e85202dd34e4f849e56e042d73dbb6f2;hp=8af645bdf1ac102d6deb07419742fa285e3da972;hpb=981f43376c7929866e9294fc35b8bc4cf806eb38;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_skate.h b/player_skate.h index 8af645b..269e552 100644 --- a/player_skate.h +++ b/player_skate.h @@ -12,6 +12,7 @@ struct player_skate{ k_skate_activity_air, k_skate_activity_air_to_grind, k_skate_activity_ground, + k_skate_activity_handplant, k_skate_activity_undefined, k_skate_activity_grind_any, k_skate_activity_grind_boardslide, @@ -79,7 +80,11 @@ struct player_skate{ v3f land_normal; v4f smoothed_rotation; - f32 velocity_limit, grind_y_start; + f32 velocity_limit, grind_y_start, skid; + f32 handplant_t; + + v3f store_cog_v, store_cog, store_co; + v4f store_smoothed, store_q; } state; @@ -92,6 +97,7 @@ struct player_skate{ local_cog; f32 slide, + skid, z, x, fly, @@ -121,8 +127,9 @@ struct player_skate{ f32 jump_charge; - /* linear anims */ - f32 push_time, jump_time; + /* linear anims. TODO: we can union a bunch of variables here depending + * on activity. */ + f32 push_time, jump_time, handplant_t; u8 jump_dir; u8 trick_type; u8 activity; @@ -135,7 +142,8 @@ struct player_skate{ *anim_air, *anim_grind, *anim_grind_jump, *anim_push, *anim_push_reverse, *anim_ollie, *anim_ollie_reverse, - *anim_grabs, *anim_stop; + *anim_grabs, *anim_stop, + *anim_handplant; /* vectors representing the direction of the axels in localspace */ v3f truckv0[2]; @@ -261,7 +269,8 @@ static float k_board_end_radius = 0.1f, k_board_radius = 0.14f, /* 0.07 */ - k_grind_balance = -40.0f; + k_grind_balance = -40.0f, + k_anim_transition = 0.12f; static void player__skate_register(void){ VG_VAR_F32( k_grind_dampener, flags=VG_VAR_CHEAT ); @@ -290,6 +299,7 @@ static void player__skate_register(void){ VG_VAR_F32( k_mmcollect_vert, flags=VG_VAR_CHEAT ); VG_VAR_F32( k_mmdecay, flags=VG_VAR_CHEAT ); VG_VAR_F32( k_mmthrow_steer, flags=VG_VAR_CHEAT ); + VG_VAR_F32( k_anim_transition, flags=VG_VAR_CHEAT ); } static void player__skate_bind (void);