瀏覽代碼

fixed bug in makePathTrack

Samir Naik 22 年之前
父節點
當前提交
8dfa3654be
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      direct/src/level/PathEntity.py

+ 4 - 4
direct/src/level/PathEntity.py

@@ -21,10 +21,10 @@ class PathEntity(BasicEntities.NodePathEntity):
         assert (len(self.path) > 1)
 
         # end with the starting point at the end, so we have a continuous loop
-        self.path = self.path + [self.path[0]]
-        for pointIndex in range(len(self.path) - 1):
-            startPoint = self.path[pointIndex]
-            endPoint = self.path[pointIndex + 1]
+        path = self.path + [self.path[0]]
+        for pointIndex in range(len(path) - 1):
+            startPoint = path[pointIndex]
+            endPoint = path[pointIndex + 1]
             # Face the endpoint
             v = startPoint - endPoint