瀏覽代碼

Fix double point in Navigation2D

Fixes #10324.
Pedro J. Estébanez 8 年之前
父節點
當前提交
71a496803c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scene/2d/navigation2d.cpp

+ 2 - 1
scene/2d/navigation2d.cpp

@@ -646,7 +646,8 @@ debug path
 					break;
 					break;
 			}
 			}
 
 
-			path.push_back(begin_point);
+			if (path[path.size() - 1].distance_to(begin_point) > CMP_EPSILON)
+				path.push_back(begin_point);
 
 
 			path.invert();
 			path.invert();
 		}
 		}