Merge branch 'main' of https://github.com/secondlife/viewer
commit
5af8801119
|
|
@ -23461,7 +23461,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>S32</string>
|
<string>S32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>31</integer>
|
||||||
</map>
|
</map>
|
||||||
|
|
||||||
<key>FSNetMapPhantomOpacity</key>
|
<key>FSNetMapPhantomOpacity</key>
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ bool Buffer::prep(Asset& asset)
|
||||||
std::string dir = gDirUtilp->getDirName(asset.mFilename);
|
std::string dir = gDirUtilp->getDirName(asset.mFilename);
|
||||||
std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri;
|
std::string bin_file = dir + gDirUtilp->getDirDelimiter() + mUri;
|
||||||
|
|
||||||
std::ifstream file(bin_file, std::ios::binary);
|
llifstream file(bin_file.c_str(), std::ios::binary);
|
||||||
if (!file.is_open())
|
if (!file.is_open())
|
||||||
{
|
{
|
||||||
LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL;
|
LL_WARNS("GLTF") << "Failed to open file: " << bin_file << LL_ENDL;
|
||||||
|
|
|
||||||
|
|
@ -696,7 +696,7 @@ bool Asset::load(std::string_view filename, bool loadIntoVRAM)
|
||||||
mFilename = filename;
|
mFilename = filename;
|
||||||
std::string ext = gDirUtilp->getExtension(mFilename);
|
std::string ext = gDirUtilp->getExtension(mFilename);
|
||||||
|
|
||||||
std::ifstream file(filename.data(), std::ios::binary);
|
llifstream file(filename.data(), std::ios::binary);
|
||||||
if (file.is_open())
|
if (file.is_open())
|
||||||
{
|
{
|
||||||
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
|
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,8 @@ static const glm::mat4 coord_system_rotationxy(
|
||||||
0.f, 0.f, 0.f, 1.f
|
0.f, 0.f, 0.f, 1.f
|
||||||
);
|
);
|
||||||
|
|
||||||
static const S32 VERTICIES_LIMIT = USHRT_MAX - 2;
|
static const S32 VERTEX_SPLIT_SAFETY_MARGIN = 3 * 3 + 1; // 10 vertices: 3 complete triangles plus remapping overhead
|
||||||
|
static const S32 VERTEX_LIMIT = USHRT_MAX - VERTEX_SPLIT_SAFETY_MARGIN;
|
||||||
|
|
||||||
LLGLTFLoader::LLGLTFLoader(std::string filename,
|
LLGLTFLoader::LLGLTFLoader(std::string filename,
|
||||||
S32 lod,
|
S32 lod,
|
||||||
|
|
@ -951,7 +952,7 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const std::string& bas
|
||||||
}
|
}
|
||||||
|
|
||||||
// Indices handling
|
// Indices handling
|
||||||
if (faceVertices.size() >= VERTICIES_LIMIT)
|
if (faceVertices.size() >= VERTEX_LIMIT)
|
||||||
{
|
{
|
||||||
// Will have to remap 32 bit indices into 16 bit indices
|
// Will have to remap 32 bit indices into 16 bit indices
|
||||||
// For the sake of simplicity build vector of 32 bit indices first
|
// For the sake of simplicity build vector of 32 bit indices first
|
||||||
|
|
@ -1036,7 +1037,7 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const std::string& bas
|
||||||
}
|
}
|
||||||
indices_16.push_back((U16)vert_index);
|
indices_16.push_back((U16)vert_index);
|
||||||
|
|
||||||
if (indices_16.size() % 3 == 0 && face_verts.size() >= VERTICIES_LIMIT - 1)
|
if (indices_16.size() % 3 == 0 && face_verts.size() >= VERTEX_LIMIT)
|
||||||
{
|
{
|
||||||
LLVolumeFace face;
|
LLVolumeFace face;
|
||||||
face.fillFromLegacyData(face_verts, indices_16);
|
face.fillFromLegacyData(face_verts, indices_16);
|
||||||
|
|
|
||||||
|
|
@ -343,6 +343,7 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
|
||||||
mWaitingForTracker(false),
|
mWaitingForTracker(false),
|
||||||
mIsClosing(false),
|
mIsClosing(false),
|
||||||
mSetToUserPosition(true),
|
mSetToUserPosition(true),
|
||||||
|
mProcessingSearchUpdate(false),
|
||||||
mTrackedLocation(0.0,0.0,0.0),
|
mTrackedLocation(0.0,0.0,0.0),
|
||||||
mTrackedStatus(LLTracker::TRACKING_NOTHING),
|
mTrackedStatus(LLTracker::TRACKING_NOTHING),
|
||||||
mParcelInfoObserver(nullptr),
|
mParcelInfoObserver(nullptr),
|
||||||
|
|
@ -356,7 +357,7 @@ LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
|
||||||
mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
|
mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
|
||||||
mCommitCallbackRegistrar.add("WMap.AvatarCombo", boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this));
|
mCommitCallbackRegistrar.add("WMap.AvatarCombo", boost::bind(&LLFloaterWorldMap::onAvatarComboCommit, this));
|
||||||
mCommitCallbackRegistrar.add("WMap.Landmark", boost::bind(&LLFloaterWorldMap::onLandmarkComboCommit, this));
|
mCommitCallbackRegistrar.add("WMap.Landmark", boost::bind(&LLFloaterWorldMap::onLandmarkComboCommit, this));
|
||||||
mCommitCallbackRegistrar.add("WMap.SearchResult", boost::bind(&LLFloaterWorldMap::onCommitSearchResult, this));
|
mCommitCallbackRegistrar.add("WMap.SearchResult", [this](LLUICtrl* ctrl, const LLSD& data) { LLFloaterWorldMap::onCommitSearchResult(false); });
|
||||||
mCommitCallbackRegistrar.add("WMap.GoHome", boost::bind(&LLFloaterWorldMap::onGoHome, this));
|
mCommitCallbackRegistrar.add("WMap.GoHome", boost::bind(&LLFloaterWorldMap::onGoHome, this));
|
||||||
mCommitCallbackRegistrar.add("WMap.Teleport", boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
|
mCommitCallbackRegistrar.add("WMap.Teleport", boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
|
||||||
mCommitCallbackRegistrar.add("WMap.ShowTarget", boost::bind(&LLFloaterWorldMap::onShowTargetBtn, this));
|
mCommitCallbackRegistrar.add("WMap.ShowTarget", boost::bind(&LLFloaterWorldMap::onShowTargetBtn, this));
|
||||||
|
|
@ -839,6 +840,7 @@ void LLFloaterWorldMap::trackGenericItem(const LLItemInfo &item)
|
||||||
|
|
||||||
void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
|
||||||
{
|
{
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
|
LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
|
||||||
if (!sim_info)
|
if (!sim_info)
|
||||||
{
|
{
|
||||||
|
|
@ -1050,7 +1052,10 @@ void LLFloaterWorldMap::updateLocation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mLocationEditor->setValue(sim_name);
|
if (!mProcessingSearchUpdate)
|
||||||
|
{
|
||||||
|
mLocationEditor->setValue(sim_name);
|
||||||
|
}
|
||||||
|
|
||||||
// refresh coordinate display to reflect where user clicked.
|
// refresh coordinate display to reflect where user clicked.
|
||||||
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
|
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
|
||||||
|
|
@ -1390,6 +1395,7 @@ void LLFloaterWorldMap::onGoHome()
|
||||||
{
|
{
|
||||||
gAgent.teleportHome();
|
gAgent.teleportHome();
|
||||||
closeFloater();
|
closeFloater();
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1559,6 +1565,7 @@ void LLFloaterWorldMap::onLocationCommit()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mProcessingSearchUpdate = true;
|
||||||
|
|
||||||
LLStringUtil::toLower(str);
|
LLStringUtil::toLower(str);
|
||||||
mCompletingRegionName = str;
|
mCompletingRegionName = str;
|
||||||
|
|
@ -1580,6 +1587,7 @@ void LLFloaterWorldMap::onCoordinatesCommit()
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
|
|
||||||
S32 x_coord = (S32)mTeleportCoordSpinX->getValue().asReal();
|
S32 x_coord = (S32)mTeleportCoordSpinX->getValue().asReal();
|
||||||
S32 y_coord = (S32)mTeleportCoordSpinY->getValue().asReal();
|
S32 y_coord = (S32)mTeleportCoordSpinY->getValue().asReal();
|
||||||
|
|
@ -1593,6 +1601,7 @@ void LLFloaterWorldMap::onCoordinatesCommit()
|
||||||
void LLFloaterWorldMap::onClearBtn()
|
void LLFloaterWorldMap::onClearBtn()
|
||||||
{
|
{
|
||||||
mTrackedStatus = LLTracker::TRACKING_NOTHING;
|
mTrackedStatus = LLTracker::TRACKING_NOTHING;
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
LLTracker::stopTracking(true);
|
LLTracker::stopTracking(true);
|
||||||
LLWorldMap::getInstance()->cancelTracking();
|
LLWorldMap::getInstance()->cancelTracking();
|
||||||
mSLURL = LLSLURL(); // Clear the SLURL since it's invalid
|
mSLURL = LLSLURL(); // Clear the SLURL since it's invalid
|
||||||
|
|
@ -1609,6 +1618,7 @@ void LLFloaterWorldMap::onShowAgentBtn()
|
||||||
mMapView->setPanWithInterpTime(0, 0, false, 0.1f); // false == animate
|
mMapView->setPanWithInterpTime(0, 0, false, 0.1f); // false == animate
|
||||||
// Set flag so user's location will be displayed if not tracking anything else
|
// Set flag so user's location will be displayed if not tracking anything else
|
||||||
mSetToUserPosition = true;
|
mSetToUserPosition = true;
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterWorldMap::onClickTeleportBtn()
|
void LLFloaterWorldMap::onClickTeleportBtn()
|
||||||
|
|
@ -1798,6 +1808,12 @@ void LLFloaterWorldMap::teleport()
|
||||||
gAgent.teleportViaLocation( pos_global );
|
gAgent.teleportViaLocation( pos_global );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mProcessingSearchUpdate)
|
||||||
|
{
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
|
mTrackedSimName.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterWorldMap::flyToLandmark()
|
void LLFloaterWorldMap::flyToLandmark()
|
||||||
|
|
@ -1928,18 +1944,20 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
|
||||||
{
|
{
|
||||||
mSearchResults->selectByValue(match);
|
mSearchResults->selectByValue(match);
|
||||||
mSearchResults->setFocus(true);
|
mSearchResults->setFocus(true);
|
||||||
onCommitSearchResult();
|
onCommitSearchResult(false /*fully commit the only option*/);
|
||||||
}
|
}
|
||||||
// else let user decide
|
// else let user decide
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mSearchResults->operateOnAll(LLCtrlListInterface::OP_DESELECT);
|
mSearchResults->selectFirstItem();
|
||||||
mSearchResults->setFocus(true);
|
mSearchResults->setFocus(true);
|
||||||
|
onCommitSearchResult(true /*don't update text field*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if we found nothing, say "none"
|
// if we found nothing, say "none"
|
||||||
|
mProcessingSearchUpdate = false;
|
||||||
mSearchResults->setCommentText(LLTrans::getString("worldmap_results_none_found"));
|
mSearchResults->setCommentText(LLTrans::getString("worldmap_results_none_found"));
|
||||||
mSearchResults->operateOnAll(LLCtrlListInterface::OP_DESELECT);
|
mSearchResults->operateOnAll(LLCtrlListInterface::OP_DESELECT);
|
||||||
}
|
}
|
||||||
|
|
@ -1953,7 +1971,7 @@ void LLFloaterWorldMap::onTeleportFinished()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterWorldMap::onCommitSearchResult()
|
void LLFloaterWorldMap::onCommitSearchResult(bool from_search)
|
||||||
{
|
{
|
||||||
std::string sim_name = mSearchResults->getSelectedValue().asString();
|
std::string sim_name = mSearchResults->getSelectedValue().asString();
|
||||||
if (sim_name.empty())
|
if (sim_name.empty())
|
||||||
|
|
@ -1984,8 +2002,14 @@ void LLFloaterWorldMap::onCommitSearchResult()
|
||||||
pos_global.mdV[VY] += (F64)pos_local.mV[VY];
|
pos_global.mdV[VY] += (F64)pos_local.mV[VY];
|
||||||
pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
|
pos_global.mdV[VZ] = (F64)pos_local.mV[VZ];
|
||||||
|
|
||||||
mLocationEditor->setValue(sim_name);
|
// Commiting search string automatically selects first item in the search list,
|
||||||
|
// in such case onCommitSearchResult shouldn't modify search string
|
||||||
|
if (!from_search)
|
||||||
|
{
|
||||||
|
mLocationEditor->setValue(sim_name);
|
||||||
|
}
|
||||||
trackLocation(pos_global);
|
trackLocation(pos_global);
|
||||||
|
mProcessingSearchUpdate = from_search;
|
||||||
mTrackCtrlsPanel->setDefaultBtn(mTeleportButton);
|
mTrackCtrlsPanel->setDefaultBtn(mTeleportButton);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ protected:
|
||||||
void onLocationFocusChanged( LLFocusableElement* ctrl );
|
void onLocationFocusChanged( LLFocusableElement* ctrl );
|
||||||
void onLocationCommit();
|
void onLocationCommit();
|
||||||
void onCoordinatesCommit();
|
void onCoordinatesCommit();
|
||||||
void onCommitSearchResult();
|
void onCommitSearchResult(bool from_search);
|
||||||
|
|
||||||
void onTeleportFinished();
|
void onTeleportFinished();
|
||||||
|
|
||||||
|
|
@ -219,6 +219,7 @@ private:
|
||||||
|
|
||||||
bool mIsClosing;
|
bool mIsClosing;
|
||||||
bool mSetToUserPosition;
|
bool mSetToUserPosition;
|
||||||
|
bool mProcessingSearchUpdate; // Don't update search string from what user set it to
|
||||||
|
|
||||||
LLVector3d mTrackedLocation;
|
LLVector3d mTrackedLocation;
|
||||||
LLTracker::ETrackingStatus mTrackedStatus;
|
LLTracker::ETrackingStatus mTrackedStatus;
|
||||||
|
|
|
||||||
|
|
@ -2009,18 +2009,19 @@ bool LLToolPie::shouldAllowFirstMediaInteraction(const LLPickInfo& pick, bool mo
|
||||||
// Check if the object is owned by a friend of the agent
|
// Check if the object is owned by a friend of the agent
|
||||||
if(FirstClickPref & MEDIA_FIRST_CLICK_FRIEND)
|
if(FirstClickPref & MEDIA_FIRST_CLICK_FRIEND)
|
||||||
{
|
{
|
||||||
LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_FRIEND. id: " << owner_id << LL_ENDL;
|
if(LLAvatarTracker::instance().isBuddy(owner_id))
|
||||||
return LLAvatarTracker::instance().isBuddy(owner_id);
|
{
|
||||||
|
LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_FRIEND. id: " << owner_id << LL_ENDL;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for objects set to or owned by the active group
|
// Check for objects set to or owned by the active group
|
||||||
if(FirstClickPref & MEDIA_FIRST_CLICK_GROUP)
|
if(FirstClickPref & MEDIA_FIRST_CLICK_GROUP)
|
||||||
{
|
{
|
||||||
// Get our active group
|
if(gAgent.isInGroup(group_id) || gAgent.isInGroup(owner_id))
|
||||||
LLUUID active_group = gAgent.getGroupID();
|
|
||||||
if(active_group.notNull() && (active_group == group_id || active_group == owner_id))
|
|
||||||
{
|
{
|
||||||
LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_GROUP.Active group: " << active_group << ", group_id:" << group_id << ", owner_id: " << owner_id << LL_ENDL;
|
LL_DEBUGS_ONCE() << "FirstClickPref & MEDIA_FIRST_CLICK_GROUP. group_id:" << group_id << ", owner_id: " << owner_id << LL_ENDL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -282,9 +282,9 @@ private:
|
||||||
F64Seconds mLastTimeDiff; // used for time stat updates
|
F64Seconds mLastTimeDiff; // used for time stat updates
|
||||||
F64Seconds mTotalFrametimeJitter;
|
F64Seconds mTotalFrametimeJitter;
|
||||||
|
|
||||||
U32 mFrameJitterEvents;
|
U32 mFrameJitterEvents = 0;
|
||||||
U32 mFrameJitterEventsLastMinute;
|
U32 mFrameJitterEventsLastMinute = 0;
|
||||||
U32 mEventMinutes;
|
U32 mEventMinutes = 0;
|
||||||
F64Seconds mTotalTime;
|
F64Seconds mTotalTime;
|
||||||
|
|
||||||
F64Seconds mLastFrameTimeSample; // used for frame time stats
|
F64Seconds mLastFrameTimeSample; // used for frame time stats
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue