right gravity inverts controls

This commit is contained in:
KikooDX 2021-12-19 23:18:26 +01:00
parent 50c15c3069
commit 6782717244
1 changed files with 2 additions and 1 deletions

View File

@ -43,7 +43,8 @@ player_update(struct Player *p)
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;
const int dir_x =
(k_right - k_left) * ((p->gravity.x == 1) ? (-1) : (1));
const struct Vec rem_gravity = p->gravity;
float spd_x, spd_y;