Fix empty target level on mars02

This commit is contained in:
Thomas
2026-03-02 19:50:29 +00:00
parent d0853fb38d
commit 74cd70738d
3 changed files with 6 additions and 9 deletions

View File

@@ -335,13 +335,10 @@ static void handle_collisions(EntityManager *em) {
PlayerData *ppd = (PlayerData *)player->data;
if (ppd && ppd->dash_charges < ppd->dash_max_charges) {
ppd->dash_charges++;
/* Reset recharge timer for the next charge */
if (ppd->dash_charges < ppd->dash_max_charges) {
float rate = (ppd->jetpack_boost_timer > 0)
? PLAYER_JETPACK_BOOST_RECHARGE
: PLAYER_DASH_RECHARGE;
ppd->dash_recharge_timer = rate;
} else {
/* Keep current recharge progress toward the next
* charge. Only zero the timer when fully charged
* so the HUD stops showing a partial bar. */
if (ppd->dash_charges >= ppd->dash_max_charges) {
ppd->dash_recharge_timer = 0.0f;
}
picked_up = true;