Skip to content

Commit

Permalink
Fix badguys not climbing certain slopes
Browse files Browse the repository at this point in the history
Fixes #761
  • Loading branch information
tobbi committed Apr 27, 2024
1 parent 630c01c commit 437cc8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/badguy/walking_badguy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ WalkingBadguy::collision_solid(const CollisionHit& hit)
}

if ((hit.left && (m_dir == Direction::LEFT)) || (hit.right && (m_dir == Direction::RIGHT))) {
turn_around();
if(hit.slope_normal.x == 0.0f)
turn_around();
}

}
Expand Down

0 comments on commit 437cc8a

Please sign in to comment.