X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_walk.h;h=3e450bcc26f541182bdb613987f0d242e109caf7;hb=00d08b1e801d6b14fbfc07243271404cc7252e35;hp=989384c1fc9661cffe259296ef71952d47ce6c2b;hpb=872ad3e040f22df357929d3778a955ae8c4ac52b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_walk.h b/player_walk.h index 989384c..3e450bc 100644 --- a/player_walk.h +++ b/player_walk.h @@ -4,10 +4,12 @@ #include "player_api.h" #include "rigidbody.h" +#define PLAYER_JUMP_EPSILON 0.1 /* 100ms jump allowance */ + struct player_walk{ rb_capsule collider; - struct{ + struct player_walk_state{ v3f prev_pos; v3f drop_in_target, drop_in_foot_anchor, @@ -35,6 +37,9 @@ struct player_walk{ struct skeleton_anim *outro_anim; double outro_start_time; + + int jump_queued; + f64 jump_input_time; } state, state_gate_storage;