Showing the changes to interface/src/Application.cpp (1 of 22 files). Show all
Unified · Split
| @@ -2180,15 +2180,6 @@ void Application::updateThreads(float deltaTime) { · 2179 unmodified lines | |||
| 2180 | } | 2180 | } |
| 2181 | } | 2181 | } |
| 2182 | 2182 | ||
| 2183 | void Application::updateParticles(float deltaTime) { | ||
| 2184 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); | ||
| 2185 | PerformanceWarning warn(showWarnings, "Application::updateParticles()"); | ||
| 2186 | |||
| 2187 | if (Menu::getInstance()->isOptionChecked(MenuOption::ParticleCloud)) { | ||
| 2188 | _cloud.simulate(deltaTime); | ||
| 2189 | } | ||
| 2190 | } | ||
| 2191 | |||
| 2192 | void Application::updateMetavoxels(float deltaTime) { | 2183 | void Application::updateMetavoxels(float deltaTime) { |
| 2193 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); | 2184 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); |
| 2194 | PerformanceWarning warn(showWarnings, "Application::updateMetavoxels()"); | 2185 | PerformanceWarning warn(showWarnings, "Application::updateMetavoxels()"); |
| @@ -2310,7 +2301,6 @@ void Application::update(float deltaTime) { · 115 unmodified lines | |||
| 2310 | updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes | 2301 | updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes |
| 2311 | updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process... | 2302 | updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process... |
| 2312 | _avatarManager.updateOtherAvatars(deltaTime); //loop through all the other avatars and simulate them... | 2303 | _avatarManager.updateOtherAvatars(deltaTime); //loop through all the other avatars and simulate them... |
| 2313 | updateParticles(deltaTime); // Simulate particle cloud movements | ||
| 2314 | updateMetavoxels(deltaTime); // update metavoxels | 2304 | updateMetavoxels(deltaTime); // update metavoxels |
| 2315 | updateCamera(deltaTime); // handle various camera tweaks like off axis projection | 2305 | updateCamera(deltaTime); // handle various camera tweaks like off axis projection |
| 2316 | updateDialogs(deltaTime); // update various stats dialogs if present | 2306 | updateDialogs(deltaTime); // update various stats dialogs if present |
| @@ -2745,10 +2735,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 428 unmodified lines | |||
| 2745 | // disable specular lighting for ground and voxels | 2735 | // disable specular lighting for ground and voxels |
| 2746 | glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR); | 2736 | glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR); |
| 2747 | 2737 | ||
| 2748 | // Draw Cloud Particles | ||
| 2749 | if (Menu::getInstance()->isOptionChecked(MenuOption::ParticleCloud)) { | ||
| 2750 | _cloud.render(); | ||
| 2751 | } | ||
| 2752 | // Draw voxels | 2738 | // Draw voxels |
| 2753 | if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { | 2739 | if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { |
| 2754 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), | 2740 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), |
| @@ -4032,6 +4018,32 @@ void Application::saveScripts() { · 1277 unmodified lines | |||
| 4032 | settings->endArray(); | 4018 | settings->endArray(); |
| 4033 | } | 4019 | } |
| 4034 | 4020 | ||
| 4021 | void Application::stopAllScripts() { | ||
| 4022 | // stops all current running scripts | ||
| 4023 | QList<QAction*> scriptActions = Menu::getInstance()->getActiveScriptsMenu()->actions(); | ||
| 4024 | foreach (QAction* scriptAction, scriptActions) { | ||
| 4025 | scriptAction->activate(QAction::Trigger); | ||
| 4026 | qDebug() << "stopping script..." << scriptAction->text(); | ||
| 4027 | } | ||
| 4028 | _activeScripts.clear(); | ||
| 4029 | } | ||
| 4030 | |||
| 4031 | void Application::reloadAllScripts() { | ||
| 4032 | // remember all the current scripts so we can reload them | ||
| 4033 | QStringList reloadList = _activeScripts; | ||
| 4034 | // reloads all current running scripts | ||
| 4035 | QList<QAction*> scriptActions = Menu::getInstance()->getActiveScriptsMenu()->actions(); | ||
| 4036 | foreach (QAction* scriptAction, scriptActions) { | ||
| 4037 | scriptAction->activate(QAction::Trigger); | ||
| 4038 | qDebug() << "stopping script..." << scriptAction->text(); | ||
| 4039 | } | ||
| 4040 | _activeScripts.clear(); | ||
| 4041 | foreach (QString scriptName, reloadList){ | ||
| 4042 | qDebug() << "reloading script..." << scriptName; | ||
| 4043 | loadScript(scriptName); | ||
| 4044 | } | ||
| 4045 | } | ||
| 4046 | |||
| 4035 | void Application::removeScriptName(const QString& fileNameString) { | 4047 | void Application::removeScriptName(const QString& fileNameString) { |
| 4036 | _activeScripts.removeOne(fileNameString); | 4048 | _activeScripts.removeOne(fileNameString); |
| 4037 | } | 4049 | } |