mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
Fix so all paths return a value
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user