Skip to content

Commit

Permalink
play falling animation
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Aug 31, 2024
1 parent a7f76a7 commit 9d7b452
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/badguy/granito.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Granito::Granito(const ReaderMapping& reader, const std::string& sprite_name, in
void
Granito::active_update(float dt_sec)
{
if (m_state == STATE_SIT || m_type == WALK)
if (m_state == STATE_SIT)
{
// Don't do any extra calculations
WalkingBadguy::active_update(dt_sec);
Expand Down Expand Up @@ -84,6 +84,14 @@ Granito::active_update(float dt_sec)
}
}

if (m_type == WALK)
{
// Don't do any extra calculations
WalkingBadguy::active_update(dt_sec);
m_stepped_on = false;
return;
}

if ((m_state == STATE_LOOKUP && !m_stepped_on) ||
(m_state == STATE_JUMPING && on_ground()))
{
Expand Down

0 comments on commit 9d7b452

Please sign in to comment.