[dasher: 4/38] Fix bug where DasherSpaceArc (game brachistochrone path) renders too far back



commit 2011ca98b9a61956ca514e7f076ffb08da877bb3
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Fri Nov 25 20:00:25 2011 +0000

    Fix bug where DasherSpaceArc (game brachistochrone path) renders too far back

 Src/DasherCore/DasherViewSquare.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Src/DasherCore/DasherViewSquare.cpp b/Src/DasherCore/DasherViewSquare.cpp
index d321078..ecd39f0 100644
--- a/Src/DasherCore/DasherViewSquare.cpp
+++ b/Src/DasherCore/DasherViewSquare.cpp
@@ -394,8 +394,8 @@ void CDasherViewSquare::DasherSpaceArc(myint cy, myint r, myint x1, myint y1, my
   Dasher2Screen(x1, y1, p.x, p.y);
   vector<CDasherScreen::point> pts;
   pts.push_back(p);
-  //if circle goes behind crosshair, force division into at least two sections, with point of max-x as boundary
-  if (r>CDasherModel::ORIGIN_X) {
+  //if circle goes behind crosshair and we want the point of max-x, force division into two sections with that point as boundary
+  if (r>CDasherModel::ORIGIN_X && ((y1 < cy) ^ (y2 < cy))) {
     Dasher2Screen(r, cy, p.x, p.y);
     CircleTo(cy, r, y1, x1, cy, r, p, pts, 1.0);
     x1=r; y1=cy;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]