From f7e700342c65fc2c8df7955f37d56c4c448c1605 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 14 May 2022 17:16:13 +0200 Subject: [PATCH] fix distToInter --- Car.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Car.py b/Car.py index 6e7132c..0939bf3 100644 --- a/Car.py +++ b/Car.py @@ -210,11 +210,11 @@ class Car(): edgeInd = self.index + 1 while l < maxDist: carComing = self.getLeaderAtIntersection(edgeInd - 1,edgeInd) - l += self.route[edgeInd].getLength() if carComing is not None: self.distToInter = l self.leaderAtInterDist = carComing[0] return carComing[1] + l += self.route[edgeInd].getLength() edgeInd += 1 if edgeInd >= len(self.route): return