added method to clear keyframes and call to that method when hostship is switched

This commit is contained in:
Joakim Kilby
2015-06-25 11:28:18 +02:00
parent 80df2a0abd
commit 2cd827a4fd
3 changed files with 9 additions and 0 deletions
@@ -141,6 +141,7 @@ public:
bool invertRotation() const;
void addKeyframe(const network::StreamDataKeyframe &kf);
void clearKeyframes();
/**
* Returns the Lua library that contains all Lua functions available to affect the
+5
View File
@@ -972,6 +972,11 @@ void InteractionHandler::addKeyframe(const network::StreamDataKeyframe &kf){
_keyframeMutex.unlock();
}
void InteractionHandler::clearKeyframes(){
_keyframeMutex.lock();
_keyframes.clear();
_keyframeMutex.unlock();
}
} // namespace interaction
//>>>>>>> feature/interactionhandler
} // namespace openspace
+3
View File
@@ -402,6 +402,9 @@ namespace openspace {
//we were not broadcasting so nothing to do
}
//clear buffered any keyframes
OsEng.interactionHandler()->clearKeyframes();
//request init package from the host
int size = headerSize();
std::vector<char> buffer;