summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-20 15:20:30 -0800
committerRider Linden <rider@lindenlab.com>2019-02-20 15:20:30 -0800
commit2401712d1073e85b4b9183d20c6e9274bc874f64 (patch)
tree9fd540e8e0a7db82890d33fd9e3eed39b38aa926
parent4f14dccffaa3b38377ad55486e38e4587a233319 (diff)
SL-9660: Next pass cleanup. Removed and downgraded a number of logs. Removed refs to LAPAS. Better sync with legacy regions.
-rw-r--r--indra/llinventory/llsettingsbase.cpp2
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp2
-rw-r--r--indra/llinventory/llsettingssky.cpp3
-rw-r--r--indra/llmessage/llassetstorage.cpp4
-rw-r--r--indra/newview/lldaycyclemanager.cpp233
-rw-r--r--indra/newview/lldaycyclemanager.h83
-rw-r--r--indra/newview/llenvironment.cpp76
-rw-r--r--indra/newview/llenvironment.h51
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp2
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp8
-rw-r--r--indra/newview/llinventorybridge.cpp3
-rw-r--r--indra/newview/llpaneleditwater.cpp3
-rw-r--r--indra/newview/llsettingsvo.cpp7
-rw-r--r--indra/newview/llstartup.cpp15
-rw-r--r--indra/newview/llviewermenu.cpp1
-rw-r--r--indra/newview/llviewermessage.cpp21
-rw-r--r--indra/newview/llviewerparcelmgr.cpp4
17 files changed, 99 insertions, 419 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 5adb787048..7d7547ecb1 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -381,7 +381,7 @@ bool LLSettingsBase::validate()
}
if (result["warnings"].size() > 0)
{
- LL_WARNS("SETTINGS") << "Validation warnings: " << result["warnings"] << LL_ENDL;
+ LL_DEBUGS("SETTINGS") << "Validation warnings: " << result["warnings"] << LL_ENDL;
}
return result["success"].asBoolean();
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 188e205176..feb734f64e 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -863,8 +863,6 @@ LLSettingsDay::CycleTrack_t::value_type LLSettingsDay::getSettingsNearKeyframe(c
F32 dist = get_wrapping_distance(startframe, (*it).first);
- //LL_DEBUGS("LAPRAS") << "[" << startframe << " ... " << keyframe << " -> " << (*it).first << "@" << dist << LL_ENDL;
-
if (dist <= (fudge * 2.0f))
return (*it);
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index af7425cca0..744c5853e4 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -997,9 +997,6 @@ void LLSettingsSky::calculateHeavenlyBodyPositions() const
mSunDirection.normalize();
mMoonDirection.normalize();
- //LL_WARNS("LAPRAS") << "Sun info: Rotation=" << sunq << " Vector=" << mSunDirection << LL_ENDL;
- //LL_WARNS("LAPRAS") << "Moon info: Rotation=" << moonq << " Vector=" << mMoonDirection << LL_ENDL;
-
if (mSunDirection.lengthSquared() < 0.01f)
LL_WARNS("SETTINGS") << "Zero length sun direction. Wailing and gnashing of teeth may follow... or not." << LL_ENDL;
if (mMoonDirection.lengthSquared() < 0.01f)
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 2b12a062c3..18b2b124e1 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -533,10 +533,6 @@ void LLAssetStorage::getAssetData(const LLUUID uuid,
LLVFile file(mVFS, uuid, type);
U32 size = exists ? file.getSize() : 0;
-// LAPRAS TESTING
-// if (type == LLAssetType::AT_SETTINGS)
-// size = 0;
-
if (size > 0)
{
// we've already got the file
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
deleted file mode 100644
index 23d442f3b6..0000000000
--- a/indra/newview/lldaycyclemanager.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/**
- * @file lldaycyclemanager.cpp
- * @brief Implementation for the LLDayCycleManager class.
- *
- * $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "lldaycyclemanager.h"
-
-#include "lldiriterator.h"
-
-#include "llenvironment.h"
-#include "llsettingsdaycycle.h"
-
-void LLDayCycleManager::getPresetNames(preset_name_list_t& names) const
-{
- names.clear();
-
- for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
- {
- names.push_back(it->first);
- }
-}
-
-void LLDayCycleManager::getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const
-{
- user.clear();
- sys.clear();
-
- for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
- {
- const std::string& name = it->first;
-
- if (isSystemPreset(name))
- {
- sys.push_back(name);
- }
- else
- {
- user.push_back(name);
- }
- }
-}
-
-void LLDayCycleManager::getUserPresetNames(preset_name_list_t& user) const
-{
- preset_name_list_t sys; // unused
- getPresetNames(user, sys);
-}
-
-bool LLDayCycleManager::getPreset(const std::string name, LLWLDayCycle& day_cycle) const
-{
- dc_map_t::const_iterator it = mDayCycleMap.find(name);
- if (it == mDayCycleMap.end())
- {
- return false;
- }
-
- day_cycle = it->second;
- return true;
-}
-
-bool LLDayCycleManager::getPreset(const std::string name, LLSD& day_cycle) const
-{
- LLWLDayCycle dc;
- if (!getPreset(name, dc))
- {
- return false;
- }
-
- day_cycle = dc.asLLSD();
- return true;
-}
-
-bool LLDayCycleManager::presetExists(const std::string name) const
-{
- LLWLDayCycle dummy;
- return getPreset(name, dummy);
-}
-
-bool LLDayCycleManager::isSystemPreset(const std::string& name) const
-{
- return gDirUtilp->fileExists(getSysDir() + LLURI::escape(name) + ".xml");
-}
-
-bool LLDayCycleManager::savePreset(const std::string& name, const LLSD& data)
-{
- // Save given preset.
- LLWLDayCycle day;
- day.loadDayCycle(data, LLEnvKey::SCOPE_LOCAL);
- day.save(getUserDir() + LLURI::escape(name) + ".xml");
-
- // Add it to our map.
- addPreset(name, data);
- mModifySignal();
- return true;
-}
-
-bool LLDayCycleManager::deletePreset(const std::string& name)
-{
- // Remove it from the map.
- dc_map_t::iterator it = mDayCycleMap.find(name);
- if (it == mDayCycleMap.end())
- {
- LL_WARNS("Windlight") << "No day cycle named " << name << LL_ENDL;
- return false;
- }
- mDayCycleMap.erase(it);
-
- // Remove from the filesystem.
- std::string filename = LLURI::escape(name) + ".xml";
- if (gDirUtilp->fileExists(getUserDir() + filename))
- {
- gDirUtilp->deleteFilesInDir(getUserDir(), filename);
- }
-
- // Signal interested parties.
- mModifySignal();
- return true;
-}
-
-bool LLDayCycleManager::isSkyPresetReferenced(const std::string& preset_name) const
-{
- // We're traversing local day cycles, they can only reference local skies.
- LLWLParamKey key(preset_name, LLEnvKey::SCOPE_LOCAL);
-
- for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
- {
- if (it->second.hasReferencesTo(key))
- {
- return true;
- }
- }
-
- return false;
-}
-
-boost::signals2::connection LLDayCycleManager::setModifyCallback(const modify_signal_t::slot_type& cb)
-{
- return mModifySignal.connect(cb);
-}
-
-// virtual
-void LLDayCycleManager::initSingleton()
-{
- LL_DEBUGS("Windlight") << "Loading all day cycles" << LL_ENDL;
- loadAllPresets();
-}
-
-void LLDayCycleManager::loadAllPresets()
-{
- mDayCycleMap.clear();
-
- // First, load system (coming out of the box) day cycles.
- loadPresets(getSysDir());
-
- // Then load user presets. Note that user day cycles will modify any system ones already loaded.
- loadPresets(getUserDir());
-}
-
-void LLDayCycleManager::loadPresets(const std::string& dir)
-{
- LLDirIterator dir_iter(dir, "*.xml");
-
- while (1)
- {
- std::string file;
- if (!dir_iter.next(file)) break; // no more files
- loadPreset(gDirUtilp->add(dir, file));
- }
-}
-
-bool LLDayCycleManager::loadPreset(const std::string& path)
-{
- LLSD data = LLWLDayCycle::loadDayCycleFromPath(path);
- if (data.isUndefined())
- {
- LL_WARNS() << "Error loading day cycle from " << path << LL_ENDL;
- return false;
- }
-
- std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
- addPreset(name, data);
-
- return true;
-}
-
-bool LLDayCycleManager::addPreset(const std::string& name, const LLSD& data)
-{
- if (name.empty())
- {
- //llassert(name.empty());
- return false;
- }
-
- LLWLDayCycle day;
- day.loadDayCycle(data, LLEnvKey::SCOPE_LOCAL);
- mDayCycleMap[name] = day;
- return true;
-}
-
-// static
-std::string LLDayCycleManager::getSysDir()
-{
- return gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/days", "");
-}
-
-// static
-std::string LLDayCycleManager::getUserDir()
-{
- return gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS , "windlight/days", "");
-}
diff --git a/indra/newview/lldaycyclemanager.h b/indra/newview/lldaycyclemanager.h
deleted file mode 100644
index 810212c92a..0000000000
--- a/indra/newview/lldaycyclemanager.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * @file lldaycyclemanager.h
- * @brief Implementation for the LLDayCycleManager class.
- *
- * $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLDAYCYCLEMANAGER_H
-#define LL_LLDAYCYCLEMANAGER_H
-
-#include <map>
-#include <string>
-
-#include "llwlparammanager.h"
-
-/**
- * WindLight day cycles manager class
- *
- * Provides interface for accessing, loading and saving day cycles.
- */
-class LLDayCycleManager : public LLSingleton<LLDayCycleManager>
-{
- LLSINGLETON_EMPTY_CTOR(LLDayCycleManager);
- LOG_CLASS(LLDayCycleManager);
-
-public:
- typedef std::list<std::string> preset_name_list_t;
-
-// typedef std::map<std::string, LLWLDayCycle> dc_map_t;
- typedef boost::signals2::signal<void()> modify_signal_t;
-
- void getPresetNames(preset_name_list_t& names) const;
- void getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const;
- void getUserPresetNames(preset_name_list_t& user) const;
-
-// bool getPreset(const std::string name, LLWLDayCycle& day_cycle) const;
- bool getPreset(const std::string name, LLSD& day_cycle) const;
- bool presetExists(const std::string name) const;
- bool isSystemPreset(const std::string& name) const;
- bool savePreset(const std::string& name, const LLSD& data);
- bool deletePreset(const std::string& name);
-
- /// @return true if there is a day cycle that refers to the sky preset.
- bool isSkyPresetReferenced(const std::string& preset_name) const;
-
- /// Emitted when a preset gets added or deleted.
- boost::signals2::connection setModifyCallback(const modify_signal_t::slot_type& cb);
-
-private:
- /*virtual*/ void initSingleton();
-
- void loadAllPresets();
- void loadPresets(const std::string& dir);
- bool loadPreset(const std::string& path);
- bool addPreset(const std::string& name, const LLSD& data);
-
- static std::string getSysDir();
- static std::string getUserDir();
-
- dc_map_t mDayCycleMap;
- modify_signal_t mModifySignal;
-};
-
-#endif // LL_LLDAYCYCLEMANAGER_H
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 4bf7a630a5..f021c4a8c3 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -470,7 +470,6 @@ namespace
{
if ((*it)->mBlendIn)
{
- //_WARNS("LAPRAS") << "Done blending '" << key_name << "' after " << (*it)->mTransition.value() - (*it)->mTimeRemaining.value() << " value now=" << target << LL_ENDL;
mOverrideValues[key_name] = target;
mOverrideExps[key_name] = (*it)->mExperience;
this->mSettings[key_name] = target;
@@ -1621,39 +1620,38 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
else if (envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_WATER)
|| envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_GROUND_LEVEL))
{
- LL_WARNS("LAPRAS") << "Invalid day cycle for region" << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Invalid day cycle for region" << LL_ENDL;
clearEnvironment(ENV_PARCEL);
setEnvironment(ENV_REGION, LLSettingsDay::GetDefaultAssetId(), LLSettingsDay::DEFAULT_DAYLENGTH, LLSettingsDay::DEFAULT_DAYOFFSET, envinfo->mEnvVersion);
updateEnvironment();
}
else
{
- LL_INFOS("LAPRAS") << "Setting Region environment" << LL_ENDL;
setEnvironment(ENV_REGION, envinfo->mDayCycle, envinfo->mDayLength, envinfo->mDayOffset, envinfo->mEnvVersion);
mTrackAltitudes = envinfo->mAltitudes;
}
- LL_WARNS("LAPRAS") << "Altitudes set to {" << mTrackAltitudes[0] << ", "<< mTrackAltitudes[1] << ", " << mTrackAltitudes[2] << ", " << mTrackAltitudes[3] << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Altitudes set to {" << mTrackAltitudes[0] << ", "<< mTrackAltitudes[1] << ", " << mTrackAltitudes[2] << ", " << mTrackAltitudes[3] << LL_ENDL;
}
else
{
LLParcel *parcel = LLViewerParcelMgr::instance().getAgentParcel();
- LL_WARNS("LAPRAS") << "Have parcel environment #" << envinfo->mParcelId << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Have parcel environment #" << envinfo->mParcelId << LL_ENDL;
if (parcel && (parcel->getLocalID() != parcel_id))
{
- LL_WARNS("ENVIRONMENT") << "Requested parcel #" << parcel_id << " agent is on " << parcel->getLocalID() << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Requested parcel #" << parcel_id << " agent is on " << parcel->getLocalID() << LL_ENDL;
return;
}
if (!envinfo->mDayCycle)
{
- LL_WARNS("LAPRAS") << "Clearing environment on parcel #" << parcel_id << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Clearing environment on parcel #" << parcel_id << LL_ENDL;
clearEnvironment(ENV_PARCEL);
}
else if (envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_WATER)
|| envinfo->mDayCycle->isTrackEmpty(LLSettingsDay::TRACK_GROUND_LEVEL))
{
- LL_WARNS("LAPRAS") << "Invalid day cycle for parcel #" << parcel_id << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Invalid day cycle for parcel #" << parcel_id << LL_ENDL;
clearEnvironment(ENV_PARCEL);
}
else
@@ -1665,6 +1663,27 @@ void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentI
updateEnvironment(transition);
}
+void LLEnvironment::adjustRegionOffset(F32 adjust)
+{
+ if (isExtendedEnvironmentEnabled())
+ {
+ LL_WARNS("ENVIRONMENT") << "Attempt to adjust region offset on EEP region. Legacy regions only." << LL_ENDL;
+ }
+
+ if (mEnvironments[ENV_REGION])
+ {
+ F32 day_length = mEnvironments[ENV_REGION]->getDayLength();
+ F32 day_offset = mEnvironments[ENV_REGION]->getDayOffset();
+
+ F32 day_adjustment = adjust * day_length;
+
+ day_offset += day_adjustment;
+ if (day_offset < 0.0f)
+ day_offset = day_length + day_offset;
+ mEnvironments[ENV_REGION]->setDayOffset(LLSettingsBase::Seconds(day_offset));
+ }
+}
+
//=========================================================================
void LLEnvironment::requestRegion(environment_apply_fn cb)
{
@@ -1820,7 +1839,7 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
if (url.empty())
return;
- LL_WARNS("LAPRAS") << "Requesting for parcel_id=" << parcel_id << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Requesting for parcel_id=" << parcel_id << LL_ENDL;
if (parcel_id != INVALID_PARCEL_ID)
{
@@ -1830,24 +1849,14 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
url += query.str();
}
- LL_WARNS("LAPRAS") << "url=" << url << LL_ENDL;
-
LLSD result = httpAdapter->getAndSuspend(httpRequest, url);
// results that come back may contain the new settings
-// LLSD notify;
-
LLSD httpResults = result["http_result"];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
if (!status)
{
- LL_WARNS("WindlightCaps") << "Couldn't retrieve environment settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
-
-// std::stringstream msg;
-// msg << status.toString() << " (Code " << status.toTerseString() << ")";
-// notify = LLSD::emptyMap();
-// notify["FAIL_REASON"] = msg.str();
-
+ LL_WARNS("ENVIRONMENT") << "Couldn't retrieve environment settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
}
else
{
@@ -1859,11 +1868,6 @@ void LLEnvironment::coroRequestEnvironment(S32 parcel_id, LLEnvironment::environ
}
}
-// if (!notify.isUndefined())
-// {
-// LLNotificationsUtil::add("WLRegionApplyFail", notify);
-// //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false);
-// }
}
void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply)
@@ -1906,7 +1910,7 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
body[KEY_ENVIRONMENT][KEY_DAYNAME] = updates->mDayName;
}
- LL_WARNS("LAPRAS") << "Body = " << body << LL_ENDL;
+ //_WARNS("ENVIRONMENT") << "Body = " << body << LL_ENDL;
if ((parcel_id != INVALID_PARCEL_ID) || (track_no != NO_TRACK))
{
@@ -1934,10 +1938,10 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
LLSD httpResults = result["http_result"];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
- LL_WARNS("LAPRAS") << "success=" << result["success"] << LL_ENDL;
+
if ((!status) || !result["success"].asBoolean())
{
- LL_WARNS("WindlightCaps") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
notify = LLSD::emptyMap();
notify["FAIL_REASON"] = result["message"].asString();
@@ -1996,10 +2000,10 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
LLSD httpResults = result["http_result"];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
- LL_WARNS("LAPRAS") << "success=" << result["success"] << LL_ENDL;
+
if ((!status) || !result["success"].asBoolean())
{
- LL_WARNS("WindlightCaps") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
+ LL_WARNS("ENVIRONMENT") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
notify = LLSD::emptyMap();
notify["FAIL_REASON"] = result["message"].asString();
@@ -2416,8 +2420,6 @@ void LLEnvironment::setExperienceEnvironment(LLUUID experience_id, LLSD data, F3
void LLEnvironment::listenExperiencePump(const LLSD &message)
{
- LL_WARNS("LAPRAS") << "Have experience event: " << message << LL_ENDL;
-
LLUUID experience_id = message["experience"];
LLSD data = message[experience_id.asString()];
std::string permission(data["permission"].asString());
@@ -2564,6 +2566,16 @@ void LLEnvironment::DayInstance::setBlenders(const LLSettingsBlender::ptr_t &sky
mBlenderWater = waterblend;
}
+LLSettingsBase::TrackPosition LLEnvironment::DayInstance::getProgress() const
+{
+ LLSettingsBase::Seconds now(LLDate::now().secondsSinceEpoch());
+ now += mDayOffset;
+
+ if ((mDayLength <= 0) || !mDayCycle)
+ return -1.0f; // no actual day cycle.
+
+ return convert_time_to_position(now, mDayLength);
+}
LLSettingsBase::TrackPosition LLEnvironment::DayInstance::secondsToKeyframe(LLSettingsDay::Seconds seconds)
{
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 6a930959bb..64350c42e8 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -197,6 +197,10 @@ public:
// Construct a new day cycle based on the environment. Replacing either the water or the sky tracks.
LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings);
+ F32 getProgress() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getProgress() : -1.0f; }
+ F32 getRegionProgress() const { return (mEnvironments[ENV_REGION]) ? mEnvironments[ENV_REGION]->getProgress() : -1.0f; }
+ void adjustRegionOffset(F32 adjust); // only used on legacy regions, to better sync the viewer with other agents
+
//-------------------------------------------
connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); }
@@ -233,37 +237,42 @@ public:
};
typedef std::shared_ptr<DayInstance> ptr_t;
- DayInstance(EnvSelection_t env);
- virtual ~DayInstance() { };
+ DayInstance(EnvSelection_t env);
+ virtual ~DayInstance() { };
+
+ virtual ptr_t clone() const;
+
+ virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta);
+
+ virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset);
+ virtual void setSky(const LLSettingsSky::ptr_t &psky);
+ virtual void setWater(const LLSettingsWater::ptr_t &pwater);
- virtual ptr_t clone() const;
+ void initialize();
+ bool isInitialized();
- virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta);
+ void clear();
- virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset);
- virtual void setSky(const LLSettingsSky::ptr_t &psky);
- virtual void setWater(const LLSettingsWater::ptr_t &pwater);
+ void setSkyTrack(S32 trackno);
- void initialize();
- bool isInitialized();
+ LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; }
+ LLSettingsSky::ptr_t getSky() const { return mSky; }
+ LLSettingsWater::ptr_t getWater() const { return mWater; }
+ LLSettingsDay::Seconds getDayLength() const { return mDayLength; }
+ LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; }
+ S32 getSkyTrack() const { return mSkyTrack; }
- void clear();
+ void setDayOffset(LLSettingsBase::Seconds offset) { mDayOffset = offset; animate(); }
- void setSkyTrack(S32 trackno);
+ virtual void animate();
- LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; }
- LLSettingsSky::ptr_t getSky() const { return mSky; }
- LLSettingsWater::ptr_t getWater() const { return mWater; }
- LLSettingsDay::Seconds getDayLength() const { return mDayLength; }
- LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; }
- S32 getSkyTrack() const { return mSkyTrack; }
+ void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend);
- virtual void animate();
+ EnvSelection_t getEnvironmentSelection() const { return mEnv; }
+ void setEnvironmentSelection(EnvSelection_t env) { mEnv = env; }
- void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend);
+ LLSettingsBase::TrackPosition getProgress() const;
- EnvSelection_t getEnvironmentSelection() const { return mEnv; }
- void setEnvironmentSelection(EnvSelection_t env) { mEnv = env; }
protected:
LLSettingsDay::ptr_t mDayCycle;
LLSettingsSky::ptr_t mSky;
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 482caaaa85..3b148fa89e 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1797,7 +1797,7 @@ void LLFloaterEditExtDayCycle::loadSettingFromFile(const std::vector<std::string
LLSD messages;
if (filenames.size() < 1) return;
std::string filename = filenames[0];
- LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
+ LL_DEBUGS("ENVDAYEDIT") << "Selected file: " << filename << LL_ENDL;
LLSettingsDay::ptr_t legacyday = LLEnvironment::createDayCycleFromLegacyPreset(filename, messages);
if (!legacyday)
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index dfd60acb50..b7e92e7e56 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -534,16 +534,14 @@ void LLFloaterFixedEnvironment::doApplyCreateNewInventory(std::string settings_n
void LLFloaterFixedEnvironment::doApplyUpdateInventory()
{
- LL_WARNS("LAPRAS") << "Update inventory for " << mInventoryId << LL_ENDL;
+ LL_DEBUGS("ENVEDIT") << "Update inventory for " << mInventoryId << LL_ENDL;
if (mInventoryId.isNull())
{
- LL_WARNS("LAPRAS") << "Inventory ID is NULL. Creating New!!!" << LL_ENDL;
LLSettingsVOBase::createInventoryItem(mSettings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS), std::string(),
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
}
else
{
- LL_WARNS("LAPRAS") << "Updating inventory ID " << mInventoryId << LL_ENDL;
LLSettingsVOBase::updateInventoryItem(mSettings, mInventoryId,
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
}
@@ -751,7 +749,7 @@ void LLFloaterFixedEnvironmentWater::loadWaterSettingFromFile(const std::vector<
LLSD messages;
if (filenames.size() < 1) return;
std::string filename = filenames[0];
- LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
+ LL_DEBUGS("ENVEDIT") << "Selected file: " << filename << LL_ENDL;
LLSettingsWater::ptr_t legacywater = LLEnvironment::createWaterFromLegacyPreset(filename, messages);
if (!legacywater)
@@ -839,7 +837,7 @@ void LLFloaterFixedEnvironmentSky::loadSkySettingFromFile(const std::vector<std:
std::string filename = filenames[0];
LLSD messages;
- LL_WARNS("LAPRAS") << "Selected file: " << filename << LL_ENDL;
+ LL_DEBUGS("ENVEDIT") << "Selected file: " << filename << LL_ENDL;
LLSettingsSky::ptr_t legacysky = LLEnvironment::createSkyFromLegacyPreset(filename, messages);
if (!legacysky)
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index fda77c72c0..61696d89e3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6937,7 +6937,6 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
if (!item)
return;
LLUUID asset_id = item->getAssetUUID();
- LL_WARNS("LAPRAS") << "Locally applying asset ID " << asset_id << LL_ENDL;
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id);
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
}
@@ -6958,7 +6957,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
}
S32 parcel_id = parcel->getLocalID();
- LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL;
LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1);
LLEnvironment::instance().setSharedEnvironment();
}
diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp
index f639ad0d98..1f9c79c9eb 100644
--- a/indra/newview/llpaneleditwater.cpp
+++ b/indra/newview/llpaneleditwater.cpp
@@ -189,7 +189,6 @@ void LLPanelSettingsWaterMainTab::onLargeWaveChanged()
{
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE1_XY)->getValue());
vect *= -1.0; // Flip so that north and east are -
- LL_WARNS("LAPRAS") << "Changing Large Wave from " << mWaterSettings->getWave1Dir() << " -> " << vect << LL_ENDL;
mWaterSettings->setWave1Dir(vect);
setIsDirty();
}
@@ -198,7 +197,6 @@ void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
{
LLVector2 vect(getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->getValue());
vect *= -1.0; // Flip so that north and east are -
- LL_WARNS("LAPRAS") << "Changing Small Wave from " << mWaterSettings->getWave2Dir() << " -> " << vect << LL_ENDL;
mWaterSettings->setWave2Dir(vect);
setIsDirty();
}
@@ -207,7 +205,6 @@ void LLPanelSettingsWaterMainTab::onSmallWaveChanged()
void LLPanelSettingsWaterMainTab::onNormalScaleChanged()
{
LLVector3 vect(getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_X)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Y)->getValue().asReal(), getChild<LLUICtrl>(FIELD_WATER_NORMAL_SCALE_Z)->getValue().asReal());
- LL_WARNS("LAPRAS") << "Changing normal scale from " << mWaterSettings->getNormalScale() << " -> " << vect << LL_ENDL;
mWaterSettings->setNormalScale(vect);
setIsDirty();
}
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 3ef5e46e38..10a0527fe2 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -324,7 +324,6 @@ void LLSettingsVOBase::onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_i
}
else
{
- //_WARNS("LAPRAS") << "Setting asset ID to " << asset_id << LL_ENDL;
settings->setAssetId(asset_id);
}
}
@@ -870,7 +869,6 @@ LLSD LLSettingsVOWater::convertToLegacy(const LLSettingsWater::ptr_t &pwater)
legacy[SETTING_LEGACY_WAVE1_DIR] = settings[SETTING_WAVE1_DIR];
legacy[SETTING_LEGACY_WAVE2_DIR] = settings[SETTING_WAVE2_DIR];
- //_WARNS("LAPRAS") << "Legacy water: " << legacy << LL_ENDL;
return legacy;
}
//-------------------------------------------------------------------------
@@ -1120,8 +1118,6 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyMessage(const LLUUID &regio
( SETTING_FRAMES, frames )
( SETTING_TYPE, "daycycle" );
- //_WARNS("LAPRAS") << "newsettings=" << newsettings << LL_ENDL;
-
LLSettingsSky::validation_list_t validations = LLSettingsDay::validationList();
LLSD results = LLSettingsDay::settingValidation(newsettings, validations);
if (!results["success"].asBoolean())
@@ -1299,7 +1295,6 @@ LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday)
F32 frame = ((tracksky.size() == 1) && (it == tracksky.begin())) ? -1.0f : (*it).first;
llsdcycle.append( LLSDArray(LLSD::Real(frame))(name.str()) );
}
- //_WARNS("LAPRAS") << "Cycle created with " << llsdcycle.size() << "entries: " << llsdcycle << LL_ENDL;
LLSD llsdskylist(LLSD::emptyMap());
@@ -1311,8 +1306,6 @@ LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday)
llsdskylist[(*its).first] = llsdsky;
}
- //_WARNS("LAPRAS") << "Sky map with " << llsdskylist.size() << " entries created: " << llsdskylist << LL_ENDL;
-
return LLSDArray(LLSD::emptyMap())(llsdcycle)(llsdskylist)(llsdwater);
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9c0e842c30..1d24df5886 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -941,21 +941,6 @@ bool idle_startup()
LLFile::mkdir(gDirUtilp->getChatLogsDir());
LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
-
- //good a place as any to create user windlight directories
- std::string user_windlight_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight", ""));
- LLFile::mkdir(user_windlight_path_name.c_str());
-
- std::string user_windlight_skies_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", ""));
- LLFile::mkdir(user_windlight_skies_path_name.c_str());
-
- std::string user_windlight_water_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", ""));
- LLFile::mkdir(user_windlight_water_path_name.c_str());
-
- std::string user_windlight_days_path_name(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/days", ""));
- LLFile::mkdir(user_windlight_days_path_name.c_str());
-
-
if (show_connect_box)
{
LLSLURL slurl;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 1bbda04ae6..c9b13f92d3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8616,7 +8616,6 @@ class LLWorldEnvPreset : public view_listener_t
{
std::string item = userdata.asString();
-// *LAPRAS* These go away! Keep for the moment.
if (item == "new_water")
{
LLFloaterReg::showInstance("env_fixed_environmentent_water", "new");
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 0597347ca8..e610387b37 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3780,11 +3780,24 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
- LL_DEBUGS("WindlightSync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
-
- /* LAPRAS
- We decode these parts of the message but ignore them
+ F32 region_phase = LLEnvironment::instance().getRegionProgress();
+ if (region_phase >= 0.0)
+ {
+ F32 adjusted_phase = fmodf(phase / F_TWO_PI + 0.25, 1.f);
+ F32 delta_phase = adjusted_phase - region_phase;
+
+ LL_DEBUGS("ENVIRONMENT") << "adjusted phase = " << adjusted_phase << " local phase = " << region_phase << " delta = " << delta_phase << LL_ENDL;
+
+ if (!LLEnvironment::instance().isExtendedEnvironmentEnabled() && (fabs(delta_phase) > 0.125))
+ {
+ LL_INFOS("ENVIRONMENT") << "Adjusting environment to match region. adjustment=" << delta_phase << LL_ENDL;
+ LLEnvironment::instance().adjustRegionOffset(delta_phase);
+ }
+ }
+
+ /* We decode these parts of the message but ignore them
as the real values are provided elsewhere. */
(void)sun_direction, (void)moon_direction, (void)phase;
}
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index cca02544ee..e2a7c563a7 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1670,7 +1670,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
}
parcel->setParcelEnvironmentVersion(parcel_environment_version);
- LL_WARNS("LAPRAS") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
// Notify anything that wants to know when the agent changes parcels
gAgent.changeParcels();
instance->mTeleportInProgress = FALSE;
@@ -1682,7 +1682,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
parcel_mgr.mAgentParcel->unpackMessage(msg);
if ((LLEnvironment::instance().isExtendedEnvironmentEnabled() && environment_changed))
{
- LL_WARNS("LAPRAS") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
+ LL_DEBUGS("ENVIRONMENT") << "Parcel environment version is " << parcel->getParcelEnvironmentVersion() << LL_ENDL;
LLEnvironment::instance().requestParcel(local_id);
}
}