Skip to content

Commit

Permalink
Fix ugly nav bug if player already at a point
Browse files Browse the repository at this point in the history
  • Loading branch information
pinguin999 committed Sep 2, 2024
1 parent 87d81b1 commit e626284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void Player::addTargetPositionImmediately(jngl::Vec2 target, const sol::function
{
if (auto _game = game.lock())
{
if (target_position == target)
if (boost::qvm::mag_sqr(target_position - target) < 5)
{
position = target;
}
Expand Down

0 comments on commit e626284

Please sign in to comment.