mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-01 16:29:43 -05:00
fixing bugs caused by merge
This commit is contained in:
@@ -520,23 +520,21 @@ void OpenSpaceEngine::preSynchronization() {
|
||||
//const double dt = sgct::Engine::instance()->getDt();
|
||||
const double dt = sgct::Engine::instance()->getAvgDt();
|
||||
|
||||
_interactionHandler->update(dt);
|
||||
Time::ref().advanceTime(dt);
|
||||
Time::ref().preSynchronization();
|
||||
|
||||
_interactionHandler.update(dt);
|
||||
_interactionHandler->update(dt);
|
||||
//_interactionHandler.lockControls();
|
||||
|
||||
_scriptEngine.preSynchronization();
|
||||
_scriptEngine->preSynchronization();
|
||||
_renderEngine->preSynchronization();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
_renderEngine->postSynchronizationPreDraw();
|
||||
Time::ref().postSynchronizationPreDraw();
|
||||
_scriptEngine.postSynchronizationPreDraw();
|
||||
_renderEngine.postSynchronizationPreDraw();
|
||||
_scriptEngine->postSynchronizationPreDraw();
|
||||
_renderEngine->postSynchronizationPreDraw();
|
||||
|
||||
if (sgct::Engine::instance()->isMaster() && _gui->isEnabled()) {
|
||||
double posX, posY;
|
||||
@@ -642,10 +640,9 @@ void OpenSpaceEngine::mouseScrollWheelCallback(int pos) {
|
||||
|
||||
void OpenSpaceEngine::encode() {
|
||||
if (_syncBuffer) {
|
||||
_renderEngine->serialize(_syncBuffer);
|
||||
_scriptEngine.serialize(_syncBuffer);
|
||||
Time::ref().serialize(_syncBuffer);
|
||||
_renderEngine.serialize(_syncBuffer);
|
||||
_scriptEngine->serialize(_syncBuffer);
|
||||
_renderEngine->serialize(_syncBuffer);
|
||||
|
||||
_syncBuffer->write();
|
||||
}
|
||||
@@ -654,11 +651,10 @@ void OpenSpaceEngine::encode() {
|
||||
void OpenSpaceEngine::decode() {
|
||||
if (_syncBuffer) {
|
||||
_syncBuffer->read();
|
||||
_renderEngine->deserialize(_syncBuffer);
|
||||
|
||||
_scriptEngine.deserialize(_syncBuffer);
|
||||
Time::ref().deserialize(_syncBuffer);
|
||||
_renderEngine.deserialize(_syncBuffer);
|
||||
_scriptEngine->deserialize(_syncBuffer);
|
||||
_renderEngine->deserialize(_syncBuffer);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -676,9 +672,8 @@ void OpenSpaceEngine::externalControlCallback(const char* receivedChars,
|
||||
{
|
||||
std::string script = std::string(receivedChars + 1);
|
||||
LINFO("Received Lua Script: '" << script << "'");
|
||||
_scriptEngine->runScript(script);
|
||||
//_scriptEngine.runScript(script);
|
||||
_scriptEngine.queueScript(script);
|
||||
//_scriptEngine->runScript(script);
|
||||
_scriptEngine->queueScript(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,8 +536,12 @@ void InteractionHandler::orbit(const float &dx, const float &dy, const float &dz
|
||||
//get "old" focus position
|
||||
psc focus = _camera->focusPosition();
|
||||
|
||||
// get camera position
|
||||
psc relative = _camera->position();
|
||||
//// get camera position
|
||||
//psc relative = _camera->position();
|
||||
|
||||
// get camera position (UNSYNCHRONIZED)
|
||||
psc relative = _camera->unsynchedPosition();
|
||||
|
||||
//get relative vector
|
||||
psc relative_focus_coordinate = relative - focus;
|
||||
//rotate relative vector
|
||||
@@ -855,9 +859,8 @@ void InteractionHandler::keyboardCallback(int key, int action) {
|
||||
_validKeyLua = true;
|
||||
auto ret = _keyLua.equal_range(key);
|
||||
for (auto it = ret.first; it != ret.second; ++it) {
|
||||
OsEng.scriptEngine()->runScript(it->second);
|
||||
//OsEng.scriptEngine().runScript(it->second);
|
||||
OsEng.scriptEngine().queueScript(it->second);
|
||||
//OsEng.scriptEngine()->runScript(it->second);
|
||||
OsEng.scriptEngine()->queueScript(it->second);
|
||||
if (!_validKeyLua) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -217,9 +217,8 @@ void LuaConsole::keyboardCallback(int key, int action) {
|
||||
// ENTER == run lua script
|
||||
else {
|
||||
if (_commands.at(_activeCommand) != "") {
|
||||
OsEng.scriptEngine()->runScript(_commands.at(_activeCommand));
|
||||
//OsEng.scriptEngine().runScript(_commands.at(_activeCommand));
|
||||
OsEng.scriptEngine().queueScript(_commands.at(_activeCommand));
|
||||
//OsEng.scriptEngine()->runScript(_commands.at(_activeCommand));
|
||||
OsEng.scriptEngine()->queueScript(_commands.at(_activeCommand));
|
||||
if (!_commandsHistory.empty() &&
|
||||
_commands.at(_activeCommand) != _commandsHistory.at(_commandsHistory.size() - 1))
|
||||
_commandsHistory.push_back(_commands.at(_activeCommand));
|
||||
|
||||
+566
-566
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user