Glue is even better. Glue, the Game™

This commit is contained in:
KikooDX 2021-01-16 14:51:50 +01:00
parent 80df629371
commit 3d2221ffec
1 changed files with 10 additions and 1 deletions

View File

@ -27,10 +27,19 @@ void player_mod_glue(Player *player, uint8_t sides) {
player->vars.acceleration = 1;
player->vars.friction = 1;
}
if (sides & (D_LEFT | D_RIGHT | D_CEIL)) {
if (sides & D_CEIL) {
player->spd.y = 0;
player->vars.gravity = 0;
player->vars.friction *= 2;
/* jump to drop of the ceiling */
player->vars.jump_spd = 1;
player->grace = 1;
}
if (sides & (D_LEFT | D_RIGHT)) {
player->spd.y = 0;
player->vars.gravity = 0;
/* wall jump */
player->grace = UPS / 5;
}
}