Permalink
Browse files

Some fixes wrt too many squares shown close to destination. There mig…

…ht be a better way of doing this.
  • Loading branch information...
1 parent 98f4991 commit 5390faaed50486eab1030ea7d85a909503d99883 @Dessimat0r committed Mar 29, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/WorldView.cpp
View
@@ -1578,8 +1578,8 @@ void WorldView::Draw()
double scalingFactor = 1.6;
double dist = 0.0;
- double d1 = 10.0;
- int i = 0;
+ double d1 = 100.0;
+ int i = 1;
int maxSquareHeight = std::max(Gui::Screen::GetWidth(), Gui::Screen::GetHeight()) / 2.0;
double angle = atan(maxSquareHeight / distToDest);
@@ -1589,7 +1589,9 @@ void WorldView::Draw()
break;
}
double sqh = getSquareHeight(dist, angle);
- DrawTargetGuideSquare(m_navTargetIndicator, sqh, green);
+ if (sqh >= 10) {
+ DrawTargetGuideSquare(m_navTargetIndicator, sqh, green);
+ }
i++;
}
} else {

0 comments on commit 5390faa

Please sign in to comment.