]> git.mxchange.org Git - flightgear.git/commitdiff
Fix off-by-one problem in new ground intersection code
authorTim Moore <timoore@redhat.com>
Sun, 15 Feb 2009 00:55:21 +0000 (01:55 +0100)
committerTim Moore <timoore@redhat.com>
Sun, 15 Feb 2009 23:11:46 +0000 (00:11 +0100)
src/FDM/groundcache.cxx

index b1cd2947cfff61a098d78774ed0b2a0716bc69aa..fd18930650262da9d1b6684f3f6a54dbb7cce757 100644 (file)
@@ -382,7 +382,7 @@ void FGGroundCache::getWireIntersectorResults(WireIntersector* wireInt,
                 // Trick to get the ends in the right order.
                 // Use the x axis in the original coordinate system. Choose the
                 // most negative x-axis as the one pointing forward
-                if (linePrim.vertices[1][0] > linePrim.vertices[2][0]) {
+                if (linePrim.vertices[0][0] > linePrim.vertices[1][0]) {
                     cat.start = gv1;
                     cat.end = gv2;
                 } else {