Fix empty target level on mars02
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user