5454
5555const float TUX_INVINCIBLE_TIME_WARNING = 2 .0f ;
5656
57- namespace
57+ namespace
5858{
5959/* Times: */
6060const float TUX_SAFE_TIME = 1 .8f ;
@@ -267,7 +267,7 @@ Player::Player(PlayerStatus& player_status, const std::string& name_, int player
267267
268268 m_col.set_size (TUX_WIDTH, is_big () ? BIG_TUX_HEIGHT : SMALL_TUX_HEIGHT);
269269
270-
270+
271271 m_sprite->set_angle (0 .0f );
272272 // m_santahatsprite->set_angle(0.0f);
273273
@@ -2198,7 +2198,7 @@ Player::draw(DrawingContext& context)
21982198 const bool is_not_idle = std::all_of (IDLE_STAGES.begin (), IDLE_STAGES.end (),
21992199 [this ](const std::string& stage) { return m_sprite->get_action ().find (" -" + stage + " -" ) == std::string::npos; });
22002200
2201- if (is_not_idle || (m_should_fancy_idle && !m_fancy_idle_active))
2201+ if (is_not_idle || (m_should_fancy_idle && !m_fancy_idle_active) || m_reset_action )
22022202 {
22032203 m_idle_stage = 0 ;
22042204 m_idle_timer.start (static_cast <float >(TIME_UNTIL_IDLE) / 1000 .0f );
@@ -2211,6 +2211,9 @@ Player::draw(DrawingContext& context)
22112211 }
22122212 else
22132213 m_fancy_idle_active = true ;
2214+
2215+ if (m_reset_action)
2216+ m_reset_action = false ;
22142217 }
22152218 else if (m_should_fancy_idle)
22162219 {
@@ -2487,6 +2490,7 @@ Player::kill(bool completely)
24872490
24882491 if (!completely && is_big ()) {
24892492 SoundManager::current ()->play (" sounds/hurt.wav" , get_pos ());
2493+ m_reset_action = true ;
24902494
24912495 if (get_bonus () > BONUS_GROWUP)
24922496 {
0 commit comments