fix distToInter

This commit is contained in:
leo 2022-05-14 17:16:13 +02:00
parent 1dd72068c0
commit f7e700342c
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB

2
Car.py
View File

@ -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