use up/down for dirs on walls

This commit is contained in:
KikooDX 2021-12-21 21:59:16 +01:00
parent 48433bd177
commit 277de71052
1 changed files with 3 additions and 4 deletions

View File

@ -43,13 +43,12 @@ player_update(struct Player *p)
const int in_water = collide(p->pos.x, p->pos.y, TILE_WATER);
const int k_left = input_down(K_LEFT);
const int k_right = input_down(K_RIGHT);
// const int k_up = input_down(K_UP);
// const int k_down = input_down(K_DOWN);
const int k_up = input_down(K_UP);
const int k_down = input_down(K_DOWN);
const int k_jump = input_down(K_JUMP);
const int kp_jump = input_pressed(K_JUMP);
const int kp_polarity = input_pressed(K_POLARITY);
const int dir_x =
(k_right - k_left) * ((p->gravity.x == 1) ? (-1) : (1));
const int dir_x = (p->gravity.y) ? (k_right - k_left) : (k_down - k_up);
const struct Vec rem_gravity = p->gravity;
float spd_x, spd_y;