No longer silently pause the simulation time when starting a camera path

And if user unpauses during motion, pause again.
This commit is contained in:
Emma Broman
2020-11-05 14:35:45 +01:00
parent 8a560dfa5c
commit 68ca45addf

View File

@@ -214,6 +214,12 @@ void AutoNavigationHandler::updateCamera(double deltaTime) {
return;
}
// If for some reason the time is no longer paused, pause it again
if (!global::timeManager->isPaused()) {
global::timeManager->setPause(true);
LINFO("Cannot start simulation time during camera motion");
}
std::unique_ptr<PathSegment> &currentSegment = _pathSegments[_currentSegmentIndex];
CameraPose newPose = currentSegment->traversePath(deltaTime);
@@ -307,9 +313,6 @@ void AutoNavigationHandler::startPath() {
"Must have exactly one stop entry between every segment."
);
// TODO: remove this line at the end of our project. Used to simplify testing
global::timeManager->setPause(true);
//OBS! Until we can handle simulation time: early out if not paused
if (!global::timeManager->isPaused()) {
LERROR("Simulation time must be paused to run a camera path.");