Limit Miles flight only when going up

This commit is contained in:
Lucas S. Vieira 2025-04-09 23:30:52 -03:00
parent ea56260554
commit 5264899071
2 changed files with 5 additions and 1 deletions

View file

@ -1125,7 +1125,8 @@ player_update(Player *player)
}
} else if(player->action == ACTION_FLY) {
if(player->framecount < PLAYER_FLY_MAXFRAMES) {
player->framecount++;
if(player->vel.vy <= 0)
player->framecount++;
// spinrev is a flight state. 1 is ascent, 0 is descent.
// This state affects gravity, so we're OK with the speed here

View file

@ -677,6 +677,9 @@ screen_level_draw(void *d)
snprintf(buffer, 255, "SPR %4d", level_get_num_sprites());
font_draw_sm(buffer, 248, 68);
snprintf(buffer, 255, "FC %5d", player.framecount);
font_draw_sm(buffer, 248, 76);
// Player debug
if(debug_mode > 1) {
snprintf(buffer, 255,