Fix so all paths return a value

This commit is contained in:
Emma Broman
2020-01-15 18:39:43 -05:00
parent d4c1bb5199
commit b15fff68c3
@@ -74,6 +74,7 @@ const int AutoNavigationHandler::currentPathSegmentIndex() const {
return i;
}
}
return -1;
}
CameraState AutoNavigationHandler::currentCameraState() {
@@ -91,6 +92,8 @@ void AutoNavigationHandler::updateCamera(double deltaTime) {
const int currentIndex = currentPathSegmentIndex();
if (currentIndex < 0) return; // no path
if (_stopAtTargets && (currentIndex != _activeSegmentIndex)) {
_activeSegmentIndex = currentIndex;
pausePath();