Skip to content

Commit

Permalink
Fix crawling when small tux upon being hurt
Browse files Browse the repository at this point in the history
fixes #3069
  • Loading branch information
MatusGuy committed Oct 5, 2024
1 parent 5502a7d commit eee7139
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/object/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2430,17 +2430,18 @@ Player::kill(bool completely)
if (!completely && is_big()) {
SoundManager::current()->play("sounds/hurt.wav", get_pos());

if (get_bonus() == FIRE_BONUS
|| get_bonus() == ICE_BONUS
|| get_bonus() == AIR_BONUS
|| get_bonus() == EARTH_BONUS) {
if (get_bonus() > GROWUP_BONUS)
{
m_safe_timer.start(TUX_SAFE_TIME);
m_is_intentionally_safe = false;
set_bonus(GROWUP_BONUS, true);
} else if (get_bonus() == GROWUP_BONUS) {
}
else if (get_bonus() == GROWUP_BONUS)
{
m_safe_timer.start(TUX_SAFE_TIME /* + GROWING_TIME */);
m_is_intentionally_safe = false;
m_duck = false;
m_crawl = false;
stop_backflipping();
set_bonus(NO_BONUS, true);
}
Expand Down

0 comments on commit eee7139

Please sign in to comment.