From 529ab6f8a6b422b5299fab9c0ce2f30fe99c7be8 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期五, 15 五月 2020 17:49:49 +0800
Subject: [PATCH] 坐标

---
 lib/src/main/cpp/test_items2/road_exam.cpp |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/lib/src/main/cpp/test_items2/road_exam.cpp b/lib/src/main/cpp/test_items2/road_exam.cpp
index a682012..a2205f9 100644
--- a/lib/src/main/cpp/test_items2/road_exam.cpp
+++ b/lib/src/main/cpp/test_items2/road_exam.cpp
@@ -75,6 +75,7 @@
 
 static int startCar;
 static int currExamMapIndex;
+static int nextRoadId;
 
 static bool checkDoor = false;
 static bool handBreakActive = false;
@@ -524,6 +525,9 @@
 
         if (IntersectionOf(&carBody, &area) == GM_None) {
             DEBUG("绂诲紑璺 id = %d", RoadMap.roads[currExamMapIndex].id);
+
+            RoadMap.roads[currExamMapIndex].arrivedTail = false;
+
             currExamMapIndex = FIND_POSITION;
         }
 
@@ -713,6 +717,13 @@
                 laneChanging = false;
             }
         }
+
+        ArrivedRoadEnd(RoadMap.roads[currExamMapIndex], car, CarModelList);
+
+        if (CrashTheLine(RoadMap.roads[currExamMapIndex].stopLine, car, CarModelList)) {
+            DEBUG("涓嬩竴涓洰鏍囪矾 id = %d", RoadMap.roads[currExamMapIndex].targetRoad);
+            nextRoadId = RoadMap.roads[currExamMapIndex].targetRoad;
+        }
     }
 
     // 鎾炵孩绾�

--
Gitblit v1.8.0