~jb55/polyadvent

c6062a37b11deb6024ba2daa413a1c5e5feb44d5 — William Casarin 1 year, 6 months ago 4b9272c
make it easier to jump

Signed-off-by: William Casarin <jb55@jb55.com>
1 files changed, 2 insertions(+), 2 deletions(-)

M src/update.c
M src/update.c => src/update.c +2 -2
@@ 391,7 391,7 @@ static void player_update(struct game *game, struct entity *player)
    /* node_translate(node, move); */

    if (tri) {
        if (vec3_eq(move, V3(0,0,0), 0.01)) {
        if (vec3_eq(move, V3(0,0,0), 0.1)) {
            player->flags |= ENT_ON_GROUND;
        }
        else if (pen < 0) {


@@ 411,7 411,7 @@ static void player_update(struct game *game, struct entity *player)
    if (player->flags & ENT_ON_GROUND &&
        (was_key_pressed_this_frame(game, SDL_SCANCODE_SPACE) ||
         was_button_pressed_this_frame(game, SDL_CONTROLLER_BUTTON_X))) {
        entity_jump(player, 0.5);
        entity_jump(player, 2.0);
    }

    /* debug("player velocity %f %f %f\n", */