Merge remote-tracking branch 'github-liru/master' into NixTesting
This commit is contained in:
@@ -537,7 +537,7 @@ public:
|
||||
OctreeStats::getInstance()->realloc(old_cap,mData.capacity());
|
||||
#endif
|
||||
|
||||
this->notifyAddition(data);
|
||||
LLOctreeNode<T>::notifyAddition(data);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
OctreeStats::getInstance()->realloc(old_cap,mData.capacity());
|
||||
#endif
|
||||
|
||||
this->notifyAddition(data);
|
||||
LLOctreeNode<T>::notifyAddition(data);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -299,6 +299,7 @@ void JCFloaterAreaSearch::processObjectPropertiesFamily(LLMessageSystem* msg, vo
|
||||
// We cache unknown objects (to avoid having to request them later)
|
||||
// and requested objects.
|
||||
msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, data->owner_id);
|
||||
if (auto obj = gObjectList.findObject(object_id)) obj->mOwnerID = data->owner_id; // Singu Note: Try to get Owner whenever possible
|
||||
msg->getUUIDFast(_PREHASH_ObjectData, _PREHASH_GroupID, data->group_id);
|
||||
msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Name, data->name);
|
||||
msg->getStringFast(_PREHASH_ObjectData, _PREHASH_Description, data->desc);
|
||||
|
||||
@@ -1149,6 +1149,7 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
|
||||
//must be an active volume
|
||||
if (!mSpatialBridge)
|
||||
{
|
||||
// Spatial bridge ctors self-register...
|
||||
if (mVObjp->isHUDAttachment())
|
||||
{
|
||||
setSpatialBridge(new LLHUDBridge(this, getRegion()));
|
||||
@@ -1615,9 +1616,9 @@ void LLSpatialBridge::cleanupReferences()
|
||||
}
|
||||
}*/
|
||||
|
||||
LLDrawable* drawablep = mDrawable;
|
||||
mDrawable = NULL;
|
||||
drawablep->setSpatialBridge(NULL);
|
||||
LLPointer<LLDrawable> drawablep = mDrawable;
|
||||
mDrawable = nullptr;
|
||||
drawablep->setSpatialBridge(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,45 +363,45 @@ static void cmd_teleport(const LLAvatarListEntry* entry);
|
||||
namespace
|
||||
{
|
||||
typedef LLMemberListener<LLView> view_listener_t;
|
||||
class RadarTrack : public view_listener_t
|
||||
class RadarTrack final : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
|
||||
{
|
||||
LLFloaterAvatarList::instance().onClickTrack();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarFocus : public view_listener_t
|
||||
class RadarFocus final : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
|
||||
{
|
||||
LLFloaterAvatarList::setFocusAvatar(LFIDBearer::getActiveSelectedID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarFocusPrev : public view_listener_t
|
||||
class RadarFocusPrev final : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
|
||||
{
|
||||
LLFloaterAvatarList::instance().focusOnPrev(userdata.asInteger());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarFocusNext : public view_listener_t
|
||||
class RadarFocusNext final : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
|
||||
{
|
||||
LLFloaterAvatarList::instance().focusOnNext(userdata.asInteger());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarAnnounceKeys : public view_listener_t
|
||||
class RadarAnnounceKeys final : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) override
|
||||
{
|
||||
LLFloaterAvatarList::instance().sendKeys();
|
||||
return true;
|
||||
|
||||
@@ -514,22 +514,22 @@ bool group_vote_callback(const LLSD& notification, const LLSD& response)
|
||||
}
|
||||
static LLNotificationFunctorRegistration group_vote_callback_reg("GroupVote", group_vote_callback);
|
||||
|
||||
void LLIMProcessing::processNewMessage(LLUUID from_id,
|
||||
void LLIMProcessing::processNewMessage(const LLUUID& from_id,
|
||||
BOOL from_group,
|
||||
LLUUID to_id,
|
||||
const LLUUID& to_id,
|
||||
U8 offline,
|
||||
EInstantMessage dialog, // U8
|
||||
LLUUID session_id,
|
||||
const LLUUID& session_id,
|
||||
U32 timestamp,
|
||||
std::string name,
|
||||
std::string message,
|
||||
std::string& name,
|
||||
std::string& message,
|
||||
U32 parent_estate_id,
|
||||
LLUUID region_id,
|
||||
const LLUUID& region_id,
|
||||
LLVector3 position,
|
||||
U8 *binary_bucket,
|
||||
S32 binary_bucket_size,
|
||||
LLHost &sender,
|
||||
LLUUID aux_id)
|
||||
const LLUUID& aux_id)
|
||||
{
|
||||
LLChat chat;
|
||||
std::string buffer;
|
||||
@@ -566,6 +566,10 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
|
||||
// object IMs contain sender object id in session_id (STORM-1209)
|
||||
|| (chat.mSourceType == CHAT_SOURCE_OBJECT && LLMuteList::getInstance()->isMuted(session_id));
|
||||
|
||||
// Singu Note: Try to get Owner whenever possible, here owner is the from id
|
||||
if (chat.mSourceType == CHAT_SOURCE_OBJECT && session_id.notNull())
|
||||
if (auto obj = gObjectList.findObject(session_id)) obj->mOwnerID = from_id;
|
||||
|
||||
bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
|
||||
LLMuteList::getInstance()->isLinden(name);
|
||||
chat.mMuted = is_muted && !is_linden;
|
||||
@@ -1967,6 +1971,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder
|
||||
from_group = message_data["from_group"].asString() == "Y";
|
||||
}
|
||||
|
||||
auto agentName = message_data["from_agent_name"].asString();
|
||||
auto message = message_data["message"].asString();
|
||||
LLIMProcessing::processNewMessage(message_data["from_agent_id"].asUUID(),
|
||||
from_group,
|
||||
message_data["to_agent_id"].asUUID(),
|
||||
@@ -1974,8 +1980,8 @@ void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder
|
||||
(EInstantMessage)message_data["dialog"].asInteger(),
|
||||
LLUUID::null, // session id, since there is none we can only use frienship/group invite caps
|
||||
message_data["timestamp"].asInteger(),
|
||||
message_data["from_agent_name"].asString(),
|
||||
message_data["message"].asString(),
|
||||
agentName,
|
||||
message,
|
||||
parent_estate_id,
|
||||
message_data["region_id"].asUUID(),
|
||||
position,
|
||||
|
||||
@@ -38,22 +38,22 @@ class LLIMProcessing
|
||||
{
|
||||
public:
|
||||
// Pre-process message for IM manager
|
||||
static void processNewMessage(LLUUID from_id,
|
||||
static void processNewMessage(const LLUUID& from_id,
|
||||
BOOL from_group,
|
||||
LLUUID to_id,
|
||||
const LLUUID& to_id,
|
||||
U8 offline,
|
||||
EInstantMessage dialog, // U8
|
||||
LLUUID session_id,
|
||||
const LLUUID& session_id,
|
||||
U32 timestamp,
|
||||
std::string agentName,
|
||||
std::string message,
|
||||
std::string& agentName,
|
||||
std::string& message,
|
||||
U32 parent_estate_id,
|
||||
LLUUID region_id,
|
||||
const LLUUID& region_id,
|
||||
LLVector3 position,
|
||||
U8 *binary_bucket,
|
||||
S32 binary_bucket_size,
|
||||
LLHost &sender,
|
||||
LLUUID aux_id = LLUUID::null);
|
||||
const LLUUID& aux_id = LLUUID::null);
|
||||
|
||||
// Either receives list of offline messages from 'ReadOfflineMsgs' capability
|
||||
// or uses legacy method
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
#include "lltabcontainer.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llviewernetwork.h"
|
||||
#include "llmutelist.h"
|
||||
#endif
|
||||
#include "llfloatermute.h"
|
||||
|
||||
#ifdef AI_UNUSED
|
||||
static const std::string PANEL_PICKS = "panel_picks";
|
||||
#endif // AI_UNUSED
|
||||
|
||||
@@ -55,19 +59,19 @@ std::string getProfileURL(const std::string& agent_name)
|
||||
llassert(!url.empty());
|
||||
LLSD subs;
|
||||
subs["AGENT_NAME"] = agent_name;
|
||||
url = LLWeb::expandURLSubstitutions(url,subs);
|
||||
url = LLWeb::expandURLSubstitutions(url, subs);
|
||||
LLStringUtil::toLower(url);
|
||||
return url;
|
||||
}
|
||||
|
||||
class LLProfileHandler : public LLCommandHandler
|
||||
class LLProfileHandler final : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requires trusted browser to trigger
|
||||
LLProfileHandler() : LLCommandHandler("profile", UNTRUSTED_THROTTLE) { }
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
LLMediaCtrl* web) override
|
||||
{
|
||||
if (params.size() < 1) return false;
|
||||
std::string agent_name = params[0];
|
||||
@@ -80,14 +84,14 @@ public:
|
||||
};
|
||||
LLProfileHandler gProfileHandler;
|
||||
|
||||
class LLAgentHandler : public LLCommandHandler
|
||||
class LLAgentHandler final : public LLCommandHandler
|
||||
{
|
||||
public:
|
||||
// requires trusted browser to trigger
|
||||
LLAgentHandler() : LLCommandHandler("agent", UNTRUSTED_THROTTLE) { }
|
||||
|
||||
bool handle(const LLSD& params, const LLSD& query_map,
|
||||
LLMediaCtrl* web)
|
||||
LLMediaCtrl* web) override
|
||||
{
|
||||
if (params.size() < 2) return false;
|
||||
LLUUID avatar_id;
|
||||
@@ -144,6 +148,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "removefriend")
|
||||
{
|
||||
LLAvatarActions::removeFriendDialog(avatar_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "mute")
|
||||
{
|
||||
if (! LLAvatarActions::isBlocked(avatar_id))
|
||||
@@ -162,6 +172,28 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "block")
|
||||
{
|
||||
if (params.size() > 2)
|
||||
{
|
||||
const std::string object_name = LLURI::unescape(params[2].asString());
|
||||
LLMute mute(avatar_id, object_name, LLMute::OBJECT);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
LLFloaterMute::showInstance()->selectMute(mute.mID);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (verb == "unblock")
|
||||
{
|
||||
if (params.size() > 2)
|
||||
{
|
||||
const std::string object_name = params[2].asString();
|
||||
LLMute mute(avatar_id, object_name, LLMute::OBJECT);
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -171,13 +203,13 @@ LLAgentHandler gAgentHandler;
|
||||
#ifdef AI_UNUSED
|
||||
//-- LLPanelProfile::ChildStack begins ----------------------------------------
|
||||
LLPanelProfile::ChildStack::ChildStack()
|
||||
: mParent(NULL)
|
||||
: mParent(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
LLPanelProfile::ChildStack::~ChildStack()
|
||||
{
|
||||
while (mStack.size() != 0)
|
||||
while (!mStack.empty())
|
||||
{
|
||||
view_list_t& top = mStack.back();
|
||||
for (view_list_t::const_iterator it = top.begin(); it != top.end(); ++it)
|
||||
@@ -217,7 +249,7 @@ bool LLPanelProfile::ChildStack::push()
|
||||
/// Restore saved children (adding them back to the child list).
|
||||
bool LLPanelProfile::ChildStack::pop()
|
||||
{
|
||||
if (mStack.size() == 0)
|
||||
if (mStack.empty())
|
||||
{
|
||||
LL_WARNS() << "Empty stack" << LL_ENDL;
|
||||
llassert(mStack.size() == 0);
|
||||
@@ -240,7 +272,7 @@ bool LLPanelProfile::ChildStack::pop()
|
||||
void LLPanelProfile::ChildStack::preParentReshape()
|
||||
{
|
||||
mSavedStack = mStack;
|
||||
while(mStack.size() > 0)
|
||||
while(!mStack.empty())
|
||||
{
|
||||
pop();
|
||||
}
|
||||
@@ -255,9 +287,8 @@ void LLPanelProfile::ChildStack::postParentReshape()
|
||||
for (stack_t::const_iterator stack_it = mStack.begin(); stack_it != mStack.end(); ++stack_it)
|
||||
{
|
||||
const view_list_t& vlist = (*stack_it);
|
||||
for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
|
||||
for (auto viewp : vlist)
|
||||
{
|
||||
LLView* viewp = *list_it;
|
||||
LL_DEBUGS() << "removing " << viewp->getName() << LL_ENDL;
|
||||
mParent->removeChild(viewp);
|
||||
}
|
||||
@@ -273,9 +304,9 @@ void LLPanelProfile::ChildStack::dump()
|
||||
std::ostringstream dbg_line;
|
||||
dbg_line << "lvl #" << lvl << ":";
|
||||
const view_list_t& vlist = (*stack_it);
|
||||
for (view_list_t::const_iterator list_it = vlist.begin(); list_it != vlist.end(); ++list_it)
|
||||
for (auto list_it : vlist)
|
||||
{
|
||||
dbg_line << " " << (*list_it)->getName();
|
||||
dbg_line << " " << list_it->getName();
|
||||
}
|
||||
LL_DEBUGS() << dbg_line.str() << LL_ENDL;
|
||||
}
|
||||
@@ -372,7 +403,7 @@ void LLPanelProfile::onOpen()
|
||||
void LLPanelProfile::onTabSelected(const LLSD& param)
|
||||
{
|
||||
std::string tab_name = param.asString();
|
||||
if (NULL != getTabContainer()[tab_name])
|
||||
if (nullptr != getTabContainer()[tab_name])
|
||||
{
|
||||
getTabContainer()[tab_name]->onOpen(getAvatarId());
|
||||
}
|
||||
@@ -416,7 +447,7 @@ void LLPanelProfile::closePanel(LLPanel* panel)
|
||||
|
||||
// Prevent losing focus by the floater
|
||||
const child_list_t* child_list = getChildList();
|
||||
if (child_list->size() > 0)
|
||||
if (!child_list->empty())
|
||||
{
|
||||
child_list->front()->setFocus(TRUE);
|
||||
}
|
||||
|
||||
@@ -5446,6 +5446,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
|
||||
node->mInventorySerial = inv_serial;
|
||||
node->mSitName.assign(sit_name);
|
||||
node->mTouchName.assign(touch_name);
|
||||
if (auto obj = node->getObject()) obj->mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) :
|
||||
mGridsPerEdge(0),
|
||||
mOOGridsPerEdge(0.f),
|
||||
mPatchesPerEdge(0),
|
||||
mNumberOfPatches(0),
|
||||
mType(type),
|
||||
mDetailTextureScale(0.f),
|
||||
mOriginGlobal(0.0, 0.0, 0.0),
|
||||
@@ -86,9 +85,6 @@ LLSurface::LLSurface(U32 type, LLViewerRegion *regionp) :
|
||||
mSurfaceZ = NULL;
|
||||
mNorm = NULL;
|
||||
|
||||
// Patch data
|
||||
mPatchList = NULL;
|
||||
|
||||
// One of each for each camera
|
||||
mVisiblePatchCount = 0;
|
||||
|
||||
@@ -119,7 +115,6 @@ LLSurface::~LLSurface()
|
||||
mGridsPerEdge = 0;
|
||||
mGridsPerPatchEdge = 0;
|
||||
mPatchesPerEdge = 0;
|
||||
mNumberOfPatches = 0;
|
||||
destroyPatchData();
|
||||
|
||||
LLDrawPoolTerrain *poolp = (LLDrawPoolTerrain*) gPipeline.findPool(LLDrawPool::POOL_TERRAIN, mSTexturep);
|
||||
@@ -168,7 +163,6 @@ void LLSurface::create(const S32 grids_per_edge,
|
||||
mOOGridsPerEdge = 1.f / mGridsPerEdge;
|
||||
mGridsPerPatchEdge = grids_per_patch_edge;
|
||||
mPatchesPerEdge = grids_per_edge / mGridsPerPatchEdge;
|
||||
mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge;
|
||||
mMetersPerGrid = width / (F32)grids_per_edge;
|
||||
mMetersPerEdge = mMetersPerGrid * grids_per_edge;
|
||||
// <FS:CR> Aurora Sim
|
||||
@@ -310,14 +304,13 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
|
||||
{
|
||||
LLVector3d new_origin_global;
|
||||
mOriginGlobal = origin_global;
|
||||
LLSurfacePatch *patchp;
|
||||
S32 i, j;
|
||||
// Need to update the southwest corners of the patches
|
||||
for (j=0; j<mPatchesPerEdge; j++)
|
||||
{
|
||||
for (i=0; i<mPatchesPerEdge; i++)
|
||||
{
|
||||
patchp = getPatch(i, j);
|
||||
const auto& patchp = getPatch(i, j);
|
||||
|
||||
new_origin_global = patchp->getOriginGlobal();
|
||||
|
||||
@@ -369,353 +362,122 @@ void LLSurface::getNeighboringRegionsStatus( std::vector<S32>& regions )
|
||||
}
|
||||
}
|
||||
|
||||
void LLSurface::connectNeighbor(LLSurface *neighborp, U32 direction)
|
||||
void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction)
|
||||
{
|
||||
S32 i;
|
||||
LLSurfacePatch *patchp, *neighbor_patchp;
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 neighborPatchesPerEdge = neighborp->mPatchesPerEdge;
|
||||
// </FS:CR> Aurora Sim
|
||||
// Constraints:
|
||||
// - Regions width must equal height
|
||||
// - Region width divisible by mGridsPerPatchEdge (16)
|
||||
// - Region can only neighbor one other per side and coner (8 total, N, S, E, W, NW, NE, SW, SE)
|
||||
// - Non-power-of-2 regions should work here, but the rest of the viewer code will probably choke on them.
|
||||
|
||||
surface_patch_ref patchp, neighbor_patchp;
|
||||
mNeighbors[direction] = neighborp;
|
||||
neighborp->mNeighbors[gDirOpposite[direction]] = this;
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 ppe[2];
|
||||
S32 own_offset[2] = {0, 0};
|
||||
S32 neighbor_offset[2] = {0, 0};
|
||||
U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos;
|
||||
|
||||
ppe[0] = (mPatchesPerEdge < neighborPatchesPerEdge) ? mPatchesPerEdge : neighborPatchesPerEdge; // used for x
|
||||
ppe[1] = ppe[0]; // used for y
|
||||
|
||||
from_region_handle(mRegionp->getHandle(), &own_xpos, &own_ypos);
|
||||
from_region_handle(neighborp->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos);
|
||||
|
||||
if(own_ypos >= neighbor_ypos)
|
||||
{
|
||||
neighbor_offset[1] = (own_ypos - neighbor_ypos) / mGridsPerPatchEdge;
|
||||
ppe[1] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
own_offset[1] = (neighbor_ypos - own_ypos) / mGridsPerPatchEdge;
|
||||
ppe[1] = llmin(mPatchesPerEdge-own_offset[1], neighborPatchesPerEdge);
|
||||
}
|
||||
|
||||
if(own_xpos >= neighbor_xpos)
|
||||
{
|
||||
neighbor_offset[0] = (own_xpos - neighbor_xpos) / mGridsPerPatchEdge;
|
||||
ppe[0] = llmin(mPatchesPerEdge, neighborPatchesPerEdge-neighbor_offset[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
own_offset[0] = (neighbor_xpos - own_xpos) / mGridsPerPatchEdge;
|
||||
ppe[0] = llmin(mPatchesPerEdge-own_offset[0], neighborPatchesPerEdge);
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
const S32 max_idx = mPatchesPerEdge - 1;
|
||||
const S32 neighbor_max_idx = neighborp->mPatchesPerEdge - 1;
|
||||
|
||||
// Connect patches
|
||||
if (NORTHEAST == direction)
|
||||
if (direction >= 4)
|
||||
{
|
||||
patchp = getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(0, 0);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0], neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
patchp->updateNorthEdge(); // Only update one of north or east.
|
||||
patchp->dirtyZ();
|
||||
}
|
||||
else if (NORTHWEST == direction)
|
||||
// Corner stitch
|
||||
S32 patches[4][2] = {
|
||||
{max_idx, max_idx}, //NORTHEAST
|
||||
{0, max_idx}, //NORTHWEST
|
||||
{0, 0}, //SOUTHWEST
|
||||
{max_idx, 0}, //SOUTHEAST
|
||||
};
|
||||
const S32* p = patches[direction - 4];
|
||||
surface_patch_ref patchp = getPatch(p[0], p[1]);
|
||||
patchp->connectNeighbor(neighborp->getPatch(max_idx - p[0], max_idx - p[1]), direction);
|
||||
if (NORTHEAST == direction)
|
||||
{
|
||||
patchp->updateNorthEdge(); // Only update one of north or east.
|
||||
if (patchp->dirtyZ())
|
||||
{
|
||||
dirtySurfacePatch(patchp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 off = mPatchesPerEdge + neighbor_offset[1] - own_offset[1];
|
||||
// </FS:CR> Aurora Sim
|
||||
patchp = getPatch(0, mPatchesPerEdge - 1);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, 0);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, off); //neighborPatchesPerEdge - 1
|
||||
if (!neighbor_patchp)
|
||||
// Edge stitch
|
||||
// Aurora complicates this logic.
|
||||
U32 pos[2][2] = { {0,0},{0,0} };
|
||||
from_region_handle(mRegionp->getHandle(), &pos[0][0], &pos[0][1]);
|
||||
from_region_handle(neighborp->getRegion()->getHandle(), &pos[1][0], &pos[1][1]);
|
||||
S32 width[2] = { (S32)mRegionp->getWidth(), (S32)neighborp->getRegion()->getWidth() };
|
||||
U32 mins[2] = { llmax(pos[0][0], pos[1][0]), llmax(pos[0][1], pos[1][1]) };
|
||||
U32 maxs[2] = { llmin(pos[0][0] + width[0], pos[1][0] + width[1]), llmin(pos[0][1] + width[0], pos[1][1] + width[1]) };
|
||||
S32 start[2][2] = {
|
||||
{S32((mins[0] - pos[0][0]) / mGridsPerPatchEdge) - 1, S32((mins[1] - pos[0][1]) / mGridsPerPatchEdge) - 1},
|
||||
{S32((mins[0] - pos[1][0]) / neighborp->mGridsPerPatchEdge) - 1,S32((mins[1] - pos[1][1]) / neighborp->mGridsPerPatchEdge) - 1}
|
||||
};
|
||||
|
||||
S32 end[2] = { llmin(S32((maxs[0] - pos[0][0]) / mGridsPerPatchEdge), max_idx), llmin(S32((maxs[1] - pos[0][1]) / mGridsPerPatchEdge), max_idx) };
|
||||
const U32& neighbor_direction = gDirOpposite[direction];
|
||||
S32 stride[4][4][2] = {
|
||||
{{0, 1}, {max_idx, 0}, {neighbor_max_idx, 0}, {NORTHEAST, SOUTHEAST}}, //EAST
|
||||
{{1, 0}, {0, max_idx}, {0, neighbor_max_idx}, {NORTHEAST, NORTHWEST} }, //NORTH
|
||||
{{0, 1}, {0, 0}, {0, 0}, {NORTHWEST, SOUTHWEST}}, //WEST
|
||||
{{1, 0}, {0, 0}, {0, 0}, {SOUTHEAST, SOUTHWEST}} //SOUTH
|
||||
};
|
||||
const S32 offs[2][2] = {
|
||||
{stride[direction][0][0], stride[direction][0][1]},
|
||||
{stride[neighbor_direction][0][0], stride[neighbor_direction][0][1]}
|
||||
};
|
||||
|
||||
S32 x[2], y[2];
|
||||
x[0] = stride[direction][1][0] + offs[0][0] * start[0][0];
|
||||
y[0] = stride[direction][1][1] + offs[0][1] * start[0][1];
|
||||
x[1] = stride[neighbor_direction][2][0] + offs[1][0] * start[1][0];
|
||||
y[1] = stride[neighbor_direction][2][1] + offs[1][1] * start[1][1];
|
||||
|
||||
for (
|
||||
x[0] = stride[direction][1][0] + offs[0][0] * start[0][0],
|
||||
y[0] = stride[direction][1][1] + offs[0][1] * start[0][1],
|
||||
x[1] = stride[neighbor_direction][2][0] + offs[1][0] * start[1][0],
|
||||
y[1] = stride[neighbor_direction][2][1] + offs[1][1] * start[1][1];
|
||||
(!offs[0][0] || x[0] <= end[0]) && (!offs[0][1] || (y[0] <= end[1]));
|
||||
x[0] += offs[0][0], y[0] += offs[0][1],
|
||||
x[1] += offs[1][0], y[1] += offs[1][1])
|
||||
{
|
||||
mNeighbors[direction] = NULL;
|
||||
return;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
}
|
||||
else if (SOUTHWEST == direction)
|
||||
{
|
||||
patchp = getPatch(0, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(neighbor_offset[0] - 1, neighbor_offset[1] - 1);
|
||||
if (!neighbor_patchp)
|
||||
{
|
||||
mNeighbors[direction] = NULL;
|
||||
return;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp->updateNorthEdge(); // Only update one of north or east.
|
||||
neighbor_patchp->updateEastEdge(); // Only update one of north or east.
|
||||
// </FS:CR> Aurora Sim
|
||||
neighbor_patchp->dirtyZ();
|
||||
}
|
||||
else if (SOUTHEAST == direction)
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
S32 off = mPatchesPerEdge + neighbor_offset[0] - own_offset[0];
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp = getPatch(mPatchesPerEdge - 1, 0);
|
||||
// <FS:CR> Aurora Sim
|
||||
//neighbor_patchp = neighborp->getPatch(0, mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(off, neighbor_offset[1] - 1); //0
|
||||
if (!neighbor_patchp)
|
||||
{
|
||||
mNeighbors[direction] = NULL;
|
||||
return;
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
}
|
||||
else if (EAST == direction)
|
||||
{
|
||||
// Do east/west connections, first
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
patchp->updateEastEdge();
|
||||
patchp->dirtyZ();
|
||||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[1] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i+1);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i+1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHWEST);
|
||||
}
|
||||
// Now do southeast/northwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(mPatchesPerEdge - 1, i);
|
||||
//neighbor_patchp = neighborp->getPatch(0, i-1);
|
||||
patchp = getPatch(mPatchesPerEdge - 1, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(0, i-1 + neighbor_offset[1]);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHWEST);
|
||||
if (x[0] < 0 || y[0] < 0) {
|
||||
continue;
|
||||
}
|
||||
surface_patch_ref patchp = getPatch(x[0], y[0]);
|
||||
// diagonal stitch 1
|
||||
if ((offs[1][0] > 0 && x[1] > 0) || (offs[1][1] > 0 && y[1] > 0))
|
||||
{
|
||||
patchp->connectNeighbor(neighborp->getPatch(x[1] - offs[1][0], y[1] - offs[1][1]), stride[direction][3][1]);
|
||||
}
|
||||
// edge stitch
|
||||
if (x[1] >= 0 && y[1] >= 0 && x[1] <= neighbor_max_idx && y[1] <= neighbor_max_idx)
|
||||
{
|
||||
patchp->connectNeighbor(neighborp->getPatch(x[1], y[1]), direction);
|
||||
}
|
||||
// diagonal stitch 2
|
||||
if (x[1] + offs[1][0] <= neighbor_max_idx && y[1] + offs[1][1] <= neighbor_max_idx)
|
||||
{
|
||||
patchp->connectNeighbor(neighborp->getPatch(x[1] + offs[1][0], y[1] + offs[1][1]), stride[direction][3][0]);
|
||||
}
|
||||
if (direction == EAST)
|
||||
{
|
||||
patchp->updateEastEdge();
|
||||
if (patchp->dirtyZ())
|
||||
{
|
||||
dirtySurfacePatch(patchp);
|
||||
}
|
||||
}
|
||||
else if (direction == NORTH)
|
||||
{
|
||||
patchp->updateNorthEdge();
|
||||
if (patchp->dirtyZ())
|
||||
{
|
||||
dirtySurfacePatch(patchp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (NORTH == direction)
|
||||
{
|
||||
// Do north/south connections, first
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
patchp->updateNorthEdge();
|
||||
patchp->dirtyZ();
|
||||
}
|
||||
|
||||
// Do northeast/southwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < (S32)mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[0] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i+1, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i+1 + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHWEST);
|
||||
}
|
||||
// Do southeast/northwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < (S32)mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, mPatchesPerEdge - 1);
|
||||
//neighbor_patchp = neighborp->getPatch(i-1, 0);
|
||||
patchp = getPatch(i + own_offset[0], mPatchesPerEdge - 1);
|
||||
neighbor_patchp = neighborp->getPatch(i-1 + neighbor_offset[0], 0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHEAST);
|
||||
}
|
||||
}
|
||||
else if (WEST == direction)
|
||||
{
|
||||
// Do east/west connections, first
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + neighbor_offset[1]);
|
||||
if (!neighbor_patchp) continue;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
neighbor_patchp->updateEastEdge();
|
||||
neighbor_patchp->dirtyZ();
|
||||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[1]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i - 1);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i - 1 + neighbor_offset[1]);
|
||||
if (!neighbor_patchp) continue;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHEAST);
|
||||
}
|
||||
|
||||
// Now do northwest/southeast connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[1] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(0, i);
|
||||
//neighbor_patchp = neighborp->getPatch(mPatchesPerEdge - 1, i + 1);
|
||||
patchp = getPatch(0, i + own_offset[1]);
|
||||
neighbor_patchp = neighborp->getPatch(neighborPatchesPerEdge - 1, i + 1 + neighbor_offset[1]);
|
||||
if (!neighbor_patchp) continue;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, NORTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, SOUTHEAST);
|
||||
}
|
||||
}
|
||||
else if (SOUTH == direction)
|
||||
{
|
||||
// Do north/south connections, first
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge; i++)
|
||||
for (i = 0; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
if (!neighbor_patchp) continue;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, direction);
|
||||
neighbor_patchp->connectNeighbor(patchp, gDirOpposite[direction]);
|
||||
|
||||
neighbor_patchp->updateNorthEdge();
|
||||
neighbor_patchp->dirtyZ();
|
||||
}
|
||||
|
||||
// Now do northeast/southwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 1; i < mPatchesPerEdge; i++)
|
||||
for (i = 1; i < ppe[0]; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i - 1, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i - 1 + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHWEST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHEAST);
|
||||
}
|
||||
// Now do northeast/southwest connections
|
||||
// <FS:CR> Aurora Sim
|
||||
//for (i = 0; i < mPatchesPerEdge - 1; i++)
|
||||
for (i = 0; i < ppe[0] - 1; i++)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
//patchp = getPatch(i, 0);
|
||||
//neighbor_patchp = neighborp->getPatch(i + 1, mPatchesPerEdge - 1);
|
||||
patchp = getPatch(i + own_offset[0], 0);
|
||||
neighbor_patchp = neighborp->getPatch(i + 1 + neighbor_offset[0], neighborPatchesPerEdge - 1);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
patchp->connectNeighbor(neighbor_patchp, SOUTHEAST);
|
||||
neighbor_patchp->connectNeighbor(patchp, NORTHWEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLSurface::disconnectNeighbor(LLSurface *surfacep)
|
||||
@@ -730,10 +492,9 @@ void LLSurface::disconnectNeighbor(LLSurface *surfacep)
|
||||
}
|
||||
|
||||
// Iterate through surface patches, removing any connectivity to removed surface.
|
||||
if (mPatchList) // Don't crash if removed before
|
||||
for (i = 0; i < mNumberOfPatches; i++)
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
(mPatchList + i)->disconnectNeighbor(surfacep);
|
||||
patchp->disconnectNeighbor(surfacep);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -802,13 +563,9 @@ void LLSurface::updatePatchVisibilities(LLAgent &agent)
|
||||
|
||||
LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(gAgentCamera.getCameraPositionGlobal());
|
||||
|
||||
LLSurfacePatch *patchp;
|
||||
|
||||
mVisiblePatchCount = 0;
|
||||
for (S32 i=0; i<mNumberOfPatches; i++)
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
patchp = mPatchList + i;
|
||||
|
||||
patchp->updateVisibility();
|
||||
if (patchp->getVisible())
|
||||
{
|
||||
@@ -832,19 +589,29 @@ BOOL LLSurface::idleUpdate(F32 max_update_time)
|
||||
|
||||
// If the Z height data has changed, we need to rebuild our
|
||||
// property line vertex arrays.
|
||||
if (mDirtyPatchList.size() > 0)
|
||||
if (!mDirtyPatchList.empty())
|
||||
{
|
||||
getRegion()->dirtyHeights();
|
||||
}
|
||||
|
||||
// Always call updateNormals() / updateVerticalStats()
|
||||
// every frame to avoid artifacts
|
||||
for(std::set<LLSurfacePatch *>::iterator iter = mDirtyPatchList.begin();
|
||||
iter != mDirtyPatchList.end(); )
|
||||
for (auto& it = mDirtyPatchList.cbegin(); it != mDirtyPatchList.cend();)
|
||||
{
|
||||
std::set<LLSurfacePatch *>::iterator curiter = iter++;
|
||||
LLSurfacePatch *patchp = *curiter;
|
||||
patchp->updateNormals();
|
||||
if (it->second.expired())
|
||||
{
|
||||
LL_WARNS() << "Expired dirty patch detected. Side " << it->first << LL_ENDL;
|
||||
}
|
||||
surface_patch_ref patchp = it->second.lock();
|
||||
if (!patchp)
|
||||
{
|
||||
it = mDirtyPatchList.erase(it);
|
||||
continue;
|
||||
}
|
||||
if (patchp->updateNormals())
|
||||
{
|
||||
patchp->getSurface()->dirtySurfacePatch(patchp);
|
||||
}
|
||||
patchp->updateVerticalStats();
|
||||
if (max_update_time == 0.f || update_timer.getElapsedTimeF32() < max_update_time)
|
||||
{
|
||||
@@ -852,9 +619,11 @@ BOOL LLSurface::idleUpdate(F32 max_update_time)
|
||||
{
|
||||
did_update = TRUE;
|
||||
patchp->clearDirty();
|
||||
mDirtyPatchList.erase(curiter);
|
||||
it = mDirtyPatchList.erase(it);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
++it;
|
||||
}
|
||||
return did_update;
|
||||
}
|
||||
@@ -865,7 +634,6 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
|
||||
LLPatchHeader ph;
|
||||
S32 j, i;
|
||||
S32 patch[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE];
|
||||
LLSurfacePatch *patchp;
|
||||
|
||||
init_patch_decompressor(gopp->patch_size);
|
||||
gopp->stride = mGridsPerEdge;
|
||||
@@ -912,8 +680,7 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
|
||||
return;
|
||||
}
|
||||
|
||||
patchp = &mPatchList[j*mPatchesPerEdge + i];
|
||||
|
||||
const surface_patch_ref& patchp = mPatchList[j * mPatchesPerEdge + i];
|
||||
|
||||
decode_patch(bitpack, patch);
|
||||
decompress_patch(patchp->getDataZ(), patch, &ph);
|
||||
@@ -921,22 +688,26 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
|
||||
// Update edges for neighbors. Need to guarantee that this gets done before we generate vertical stats.
|
||||
patchp->updateNorthEdge();
|
||||
patchp->updateEastEdge();
|
||||
if (patchp->getNeighborPatch(WEST))
|
||||
LLSurfacePatch* neighborPatch;
|
||||
if (neighborPatch = patchp->getNeighborPatch(WEST))
|
||||
{
|
||||
patchp->getNeighborPatch(WEST)->updateEastEdge();
|
||||
neighborPatch->updateEastEdge();
|
||||
}
|
||||
if (patchp->getNeighborPatch(SOUTHWEST))
|
||||
if (neighborPatch = patchp->getNeighborPatch(SOUTHWEST))
|
||||
{
|
||||
patchp->getNeighborPatch(SOUTHWEST)->updateEastEdge();
|
||||
patchp->getNeighborPatch(SOUTHWEST)->updateNorthEdge();
|
||||
neighborPatch->updateEastEdge();
|
||||
neighborPatch->updateNorthEdge();
|
||||
}
|
||||
if (patchp->getNeighborPatch(SOUTH))
|
||||
if (neighborPatch = patchp->getNeighborPatch(SOUTH))
|
||||
{
|
||||
patchp->getNeighborPatch(SOUTH)->updateNorthEdge();
|
||||
neighborPatch->updateNorthEdge();
|
||||
}
|
||||
|
||||
// Dirty patch statistics, and flag that the patch has data.
|
||||
patchp->dirtyZ();
|
||||
if (patchp->dirtyZ())
|
||||
{
|
||||
dirtySurfacePatch(patchp);
|
||||
}
|
||||
patchp->setHasReceivedData();
|
||||
}
|
||||
}
|
||||
@@ -1089,8 +860,13 @@ LLVector3 LLSurface::resolveNormalGlobal(const LLVector3d& pos_global) const
|
||||
|
||||
}
|
||||
|
||||
LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const
|
||||
const surface_patch_ref& LLSurface::resolvePatchRegion(const F32 x, const F32 y) const
|
||||
{
|
||||
if (mPatchList.empty()) {
|
||||
LL_WARNS() << "No patches for current region!" << LL_ENDL;
|
||||
static surface_patch_ref empty;
|
||||
return empty;
|
||||
}
|
||||
// x and y should be region-local coordinates.
|
||||
// If x and y are outside of the surface, then the returned
|
||||
// index will be for the nearest boundary patch.
|
||||
@@ -1141,29 +917,24 @@ LLSurfacePatch *LLSurface::resolvePatchRegion(const F32 x, const F32 y) const
|
||||
|
||||
// *NOTE: Super paranoia code follows.
|
||||
S32 index = i + j * mPatchesPerEdge;
|
||||
if((index < 0) || (index >= mNumberOfPatches))
|
||||
if((index < 0) || (index >= mPatchList.size()))
|
||||
{
|
||||
if(0 == mNumberOfPatches)
|
||||
{
|
||||
LL_WARNS() << "No patches for current region!" << LL_ENDL;
|
||||
return NULL;
|
||||
}
|
||||
S32 old_index = index;
|
||||
index = llclamp(old_index, 0, (mNumberOfPatches - 1));
|
||||
index = llclamp(old_index, 0, ((S32)mPatchList.size() - 1));
|
||||
LL_WARNS() << "Clamping out of range patch index " << old_index
|
||||
<< " to " << index << LL_ENDL;
|
||||
}
|
||||
return &(mPatchList[index]);
|
||||
return mPatchList[index];
|
||||
}
|
||||
|
||||
|
||||
LLSurfacePatch *LLSurface::resolvePatchRegion(const LLVector3 &pos_region) const
|
||||
const surface_patch_ref& LLSurface::resolvePatchRegion(const LLVector3 &pos_region) const
|
||||
{
|
||||
return resolvePatchRegion(pos_region.mV[VX], pos_region.mV[VY]);
|
||||
}
|
||||
|
||||
|
||||
LLSurfacePatch *LLSurface::resolvePatchGlobal(const LLVector3d &pos_global) const
|
||||
const surface_patch_ref& LLSurface::resolvePatchGlobal(const LLVector3d &pos_global) const
|
||||
{
|
||||
llassert(mRegionp);
|
||||
LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(pos_global);
|
||||
@@ -1192,37 +963,28 @@ void LLSurface::createPatchData()
|
||||
// Assumes mGridsPerEdge, mGridsPerPatchEdge, and mPatchesPerEdge have been properly set
|
||||
// TODO -- check for create() called when surface is not empty
|
||||
S32 i, j;
|
||||
LLSurfacePatch *patchp;
|
||||
|
||||
// Allocate memory
|
||||
mPatchList = new LLSurfacePatch[mNumberOfPatches];
|
||||
|
||||
// One of each for each camera
|
||||
mVisiblePatchCount = mNumberOfPatches;
|
||||
|
||||
for (j=0; j<mPatchesPerEdge; j++)
|
||||
mPatchList.resize(mPatchesPerEdge * mPatchesPerEdge);
|
||||
for (S32 i = 0; i < mPatchList.size(); ++i)
|
||||
{
|
||||
for (i=0; i<mPatchesPerEdge; i++)
|
||||
{
|
||||
patchp = getPatch(i, j);
|
||||
patchp->setSurface(this);
|
||||
}
|
||||
mPatchList[i] = std::make_shared<LLSurfacePatch>(this, i);
|
||||
}
|
||||
|
||||
// One of each for each camera
|
||||
mVisiblePatchCount = mPatchList.size();
|
||||
|
||||
for (j=0; j<mPatchesPerEdge; j++)
|
||||
{
|
||||
for (i=0; i<mPatchesPerEdge; i++)
|
||||
{
|
||||
patchp = getPatch(i, j);
|
||||
patchp->mHasReceivedData = FALSE;
|
||||
patchp->mSTexUpdate = TRUE;
|
||||
const auto& patchp = getPatch(i, j);
|
||||
|
||||
S32 data_offset = i * mGridsPerPatchEdge + j * mGridsPerPatchEdge * mGridsPerEdge;
|
||||
|
||||
patchp->setDataZ(mSurfaceZ + data_offset);
|
||||
patchp->setDataNorm(mNorm + data_offset);
|
||||
|
||||
|
||||
// We make each patch point to its neighbors so we can do resolution checking
|
||||
// when butting up different resolutions. Patches that don't have neighbors
|
||||
// somewhere will point to NULL on that side.
|
||||
@@ -1311,9 +1073,7 @@ void LLSurface::createPatchData()
|
||||
void LLSurface::destroyPatchData()
|
||||
{
|
||||
// Delete all of the cached patch data for these patches.
|
||||
|
||||
delete [] mPatchList;
|
||||
mPatchList = NULL;
|
||||
mPatchList.clear();
|
||||
mVisiblePatchCount = 0;
|
||||
}
|
||||
|
||||
@@ -1336,36 +1096,50 @@ U32 LLSurface::getRenderStride(const U32 render_level) const
|
||||
}
|
||||
|
||||
|
||||
LLSurfacePatch *LLSurface::getPatch(const S32 x, const S32 y) const
|
||||
const surface_patch_ref& LLSurface::getPatch(const S32 x, const S32 y) const
|
||||
{
|
||||
static surface_patch_ref empty(nullptr);
|
||||
if ((x < 0) || (x >= mPatchesPerEdge))
|
||||
{
|
||||
LL_WARNS() << "Asking for patch out of bounds" << LL_ENDL;
|
||||
return NULL;
|
||||
return empty;
|
||||
}
|
||||
if ((y < 0) || (y >= mPatchesPerEdge))
|
||||
{
|
||||
LL_WARNS() << "Asking for patch out of bounds" << LL_ENDL;
|
||||
return NULL;
|
||||
return empty;
|
||||
}
|
||||
|
||||
return mPatchList + x + y*mPatchesPerEdge;
|
||||
return mPatchList[x + y*mPatchesPerEdge];
|
||||
}
|
||||
|
||||
|
||||
void LLSurface::dirtyAllPatches()
|
||||
{
|
||||
S32 i;
|
||||
for (i = 0; i < mNumberOfPatches; i++)
|
||||
for (auto& patchp : mPatchList)
|
||||
{
|
||||
mPatchList[i].dirtyZ();
|
||||
if (patchp->dirtyZ())
|
||||
{
|
||||
dirtySurfacePatch(patchp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLSurface::dirtySurfacePatch(LLSurfacePatch *patchp)
|
||||
void LLSurface::dirtySurfacePatch(const surface_patch_ref& patchp)
|
||||
{
|
||||
if (!patchp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Put surface patch on dirty surface patch list
|
||||
mDirtyPatchList.insert(patchp);
|
||||
if (std::find_if(mDirtyPatchList.begin(), mDirtyPatchList.end(),
|
||||
[&patchp](std::pair<U32, std::weak_ptr<LLSurfacePatch > >& entry) -> bool {
|
||||
return entry.second.lock().get() == patchp.get();
|
||||
}) == mDirtyPatchList.end())
|
||||
{
|
||||
mDirtyPatchList.push_back(std::make_pair(patchp->getSide(), patchp));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -60,9 +60,12 @@ static const S32 ONE_LESS_THAN_NEIGHBOR = -1;
|
||||
const S32 ABOVE_WATERLINE_ALPHA = 32; // The alpha of water when the land elevation is above the waterline.
|
||||
|
||||
class LLViewerRegion;
|
||||
class LLSurfacePatch;
|
||||
class LLBitPack;
|
||||
class LLGroupHeader;
|
||||
class LLSurfacePatch;
|
||||
|
||||
typedef std::shared_ptr<LLSurfacePatch> surface_patch_ref;
|
||||
typedef std::weak_ptr<LLSurfacePatch> surface_patch_weak_ref;
|
||||
|
||||
class LLSurface
|
||||
{
|
||||
@@ -111,9 +114,9 @@ public:
|
||||
F32 resolveHeightGlobal(const LLVector3d &position_global) const;
|
||||
LLVector3 resolveNormalGlobal(const LLVector3d& v) const; // Returns normal to surface
|
||||
|
||||
LLSurfacePatch *resolvePatchRegion(const F32 x, const F32 y) const;
|
||||
LLSurfacePatch *resolvePatchRegion(const LLVector3 &position_region) const;
|
||||
LLSurfacePatch *resolvePatchGlobal(const LLVector3d &position_global) const;
|
||||
const surface_patch_ref& resolvePatchRegion(const F32 x, const F32 y) const;
|
||||
const surface_patch_ref& resolvePatchRegion(const LLVector3 &position_region) const;
|
||||
const surface_patch_ref& resolvePatchGlobal(const LLVector3d &position_global) const;
|
||||
|
||||
// Update methods (called during idle, normally)
|
||||
BOOL idleUpdate(F32 max_update_time);
|
||||
@@ -136,7 +139,7 @@ public:
|
||||
|
||||
void dirtyAllPatches(); // Use this to dirty all patches when changing terrain parameters
|
||||
|
||||
void dirtySurfacePatch(LLSurfacePatch *patchp);
|
||||
void dirtySurfacePatch(const surface_patch_ref& patchp);
|
||||
LLVOWater *getWaterObj() { return mWaterObjp; }
|
||||
|
||||
static void setTextureSize(const S32 texture_size);
|
||||
@@ -155,8 +158,6 @@ public:
|
||||
F32 mOOGridsPerEdge; // Inverse of grids per edge
|
||||
|
||||
S32 mPatchesPerEdge; // Number of patches on one side of a region
|
||||
S32 mNumberOfPatches; // Total number of patches
|
||||
|
||||
|
||||
// Each surface points at 8 neighbors (or NULL)
|
||||
// +---+---+---+
|
||||
@@ -191,11 +192,11 @@ protected:
|
||||
|
||||
//F32 updateTexture(LLSurfacePatch *ppatch);
|
||||
|
||||
LLSurfacePatch *getPatch(const S32 x, const S32 y) const;
|
||||
const surface_patch_ref& getPatch(const S32 x, const S32 y) const;
|
||||
|
||||
protected:
|
||||
LLVector3d mOriginGlobal; // In absolute frame
|
||||
LLSurfacePatch *mPatchList; // Array of all patches
|
||||
std::vector< surface_patch_ref > mPatchList; // Array of all patches
|
||||
|
||||
// Array of grid data, mGridsPerEdge * mGridsPerEdge
|
||||
F32 *mSurfaceZ;
|
||||
@@ -203,7 +204,7 @@ protected:
|
||||
// Array of grid normals, mGridsPerEdge * mGridsPerEdge
|
||||
LLVector3 *mNorm;
|
||||
|
||||
std::set<LLSurfacePatch *> mDirtyPatchList;
|
||||
std::vector< std::pair<U32, surface_patch_weak_ref > > mDirtyPatchList;
|
||||
|
||||
|
||||
// The textures should never be directly initialized - use the setter methods!
|
||||
|
||||
@@ -47,9 +47,9 @@ extern bool gShiftFrame;
|
||||
extern U64MicrosecondsImplicit gFrameTime;
|
||||
extern LLPipeline gPipeline;
|
||||
|
||||
LLSurfacePatch::LLSurfacePatch()
|
||||
LLSurfacePatch::LLSurfacePatch(LLSurface* surface, U32 side)
|
||||
: mHasReceivedData(FALSE),
|
||||
mSTexUpdate(FALSE),
|
||||
mSTexUpdate(TRUE),
|
||||
mDirty(FALSE),
|
||||
mDirtyZStats(TRUE),
|
||||
mHeightsGenerated(FALSE),
|
||||
@@ -70,17 +70,12 @@ LLSurfacePatch::LLSurfacePatch()
|
||||
// set to non-zero values by higher classes.
|
||||
mConnectedEdge(NO_EDGE),
|
||||
mLastUpdateTime(0),
|
||||
mSurfacep(NULL)
|
||||
{
|
||||
S32 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
setNeighborPatch(i, NULL);
|
||||
}
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
mNormalsInvalid[i] = TRUE;
|
||||
}
|
||||
mSurfacep(NULL),
|
||||
mNeighborPatches{ 0,0,0,0,0,0,0,0 },
|
||||
mNormalsInvalid{ 1,1,1,1,1,1,1,1,1 },
|
||||
mSide(side)
|
||||
{
|
||||
setSurface(surface);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +85,7 @@ LLSurfacePatch::~LLSurfacePatch()
|
||||
}
|
||||
|
||||
|
||||
void LLSurfacePatch::dirty()
|
||||
bool LLSurfacePatch::dirty()
|
||||
{
|
||||
// These are outside of the loop in case we're still waiting for a dirty from the
|
||||
// texture being updated...
|
||||
@@ -109,8 +104,9 @@ void LLSurfacePatch::dirty()
|
||||
if (!mDirty)
|
||||
{
|
||||
mDirty = TRUE;
|
||||
mSurfacep->dirtySurfacePatch(this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,45 +129,31 @@ void LLSurfacePatch::disconnectNeighbor(LLSurface *surfacep)
|
||||
U32 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (getNeighborPatch(i))
|
||||
const auto& patch = getNeighborPatch(i);
|
||||
if (patch)
|
||||
{
|
||||
if (getNeighborPatch(i)->mSurfacep == surfacep)
|
||||
if (patch->mSurfacep == surfacep)
|
||||
{
|
||||
if (EAST == i)
|
||||
{
|
||||
mConnectedEdge &= EAST_EDGE;
|
||||
}
|
||||
else if (NORTH == i)
|
||||
{
|
||||
mConnectedEdge &= NORTH_EDGE;
|
||||
}
|
||||
else if (WEST == i)
|
||||
{
|
||||
mConnectedEdge &= WEST_EDGE;
|
||||
}
|
||||
else if (SOUTH == i)
|
||||
{
|
||||
mConnectedEdge &= SOUTH_EDGE;
|
||||
}
|
||||
setNeighborPatch(i, NULL);
|
||||
mNormalsInvalid[i] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up connected edges
|
||||
if (getNeighborPatch(EAST))
|
||||
{
|
||||
if (getNeighborPatch(EAST)->mSurfacep == surfacep)
|
||||
{
|
||||
mConnectedEdge &= ~EAST_EDGE;
|
||||
}
|
||||
}
|
||||
if (getNeighborPatch(NORTH))
|
||||
{
|
||||
if (getNeighborPatch(NORTH)->mSurfacep == surfacep)
|
||||
{
|
||||
mConnectedEdge &= ~NORTH_EDGE;
|
||||
}
|
||||
}
|
||||
if (getNeighborPatch(WEST))
|
||||
{
|
||||
if (getNeighborPatch(WEST)->mSurfacep == surfacep)
|
||||
{
|
||||
mConnectedEdge &= ~WEST_EDGE;
|
||||
}
|
||||
}
|
||||
if (getNeighborPatch(SOUTH))
|
||||
{
|
||||
if (getNeighborPatch(SOUTH)->mSurfacep == surfacep)
|
||||
{
|
||||
mConnectedEdge &= ~SOUTH_EDGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLVector3 LLSurfacePatch::getPointAgent(const U32 x, const U32 y) const
|
||||
@@ -283,64 +265,65 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
LLSurfacePatch* patch;
|
||||
if (poffsets[i][j][0] < 0)
|
||||
{
|
||||
if (!ppatches[i][j]->getNeighborPatch(WEST))
|
||||
if (patch = ppatches[i][j]->getNeighborPatch(WEST))
|
||||
{
|
||||
poffsets[i][j][0] = 0;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = patch;
|
||||
poffsets[i][j][0] += patch_width;
|
||||
poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(WEST);
|
||||
poffsets[i][j][0] += patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
poffsets[i][j][0] = 0;
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][1] < 0)
|
||||
{
|
||||
if (!ppatches[i][j]->getNeighborPatch(SOUTH))
|
||||
if (patch = ppatches[i][j]->getNeighborPatch(SOUTH))
|
||||
{
|
||||
poffsets[i][j][1] = 0;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = patch;
|
||||
poffsets[i][j][1] += patch_width;
|
||||
poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge();
|
||||
// </FS>CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(SOUTH);
|
||||
poffsets[i][j][1] += patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS>CR> Aurora Sim
|
||||
poffsets[i][j][1] = 0;
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][0] >= (S32)patch_width)
|
||||
{
|
||||
if (!ppatches[i][j]->getNeighborPatch(EAST))
|
||||
if (patch = ppatches[i][j]->getNeighborPatch(EAST))
|
||||
{
|
||||
poffsets[i][j][0] = patch_width - 1;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = patch;
|
||||
poffsets[i][j][0] -= patch_width;
|
||||
poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(EAST);
|
||||
poffsets[i][j][0] -= patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
poffsets[i][j][0] = patch_width - 1;
|
||||
}
|
||||
}
|
||||
if (poffsets[i][j][1] >= (S32)patch_width)
|
||||
{
|
||||
if (!ppatches[i][j]->getNeighborPatch(NORTH))
|
||||
if (patch = ppatches[i][j]->getNeighborPatch(NORTH))
|
||||
{
|
||||
poffsets[i][j][1] = patch_width - 1;
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = patch;
|
||||
poffsets[i][j][1] -= patch_width;
|
||||
poffsets[i][j][2] = patch->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
ppatches[i][j] = ppatches[i][j]->getNeighborPatch(NORTH);
|
||||
poffsets[i][j][1] -= patch_width;
|
||||
poffsets[i][j][2] = ppatches[i][j]->getSurface()->getGridsPerEdge();
|
||||
// </FS:CR> Aurora Sim
|
||||
poffsets[i][j][1] = patch_width - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -474,11 +457,11 @@ void LLSurfacePatch::updateVerticalStats()
|
||||
}
|
||||
|
||||
|
||||
void LLSurfacePatch::updateNormals()
|
||||
bool LLSurfacePatch::updateNormals()
|
||||
{
|
||||
if (mSurfacep->mType == 'w')
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
U32 grids_per_patch_edge = mSurfacep->getGridsPerPatchEdge();
|
||||
U32 grids_per_edge = mSurfacep->getGridsPerEdge();
|
||||
@@ -515,10 +498,12 @@ void LLSurfacePatch::updateNormals()
|
||||
// update the west edge
|
||||
if (mNormalsInvalid[NORTHWEST] || mNormalsInvalid[WEST] || mNormalsInvalid[SOUTHWEST])
|
||||
{
|
||||
LLSurfacePatch* northwest_patchp = getNeighborPatch(NORTHWEST);
|
||||
LLSurfacePatch* north_patchp = getNeighborPatch(NORTH);
|
||||
// <FS:CR> Aurora Sim
|
||||
if (!getNeighborPatch(NORTH) && getNeighborPatch(NORTHWEST) && getNeighborPatch(NORTHWEST)->getHasReceivedData())
|
||||
if (!north_patchp && northwest_patchp && northwest_patchp->getHasReceivedData())
|
||||
{
|
||||
*(mDataZ + grids_per_patch_edge*grids_per_edge) = *(getNeighborPatch(NORTHWEST)->mDataZ + grids_per_patch_edge);
|
||||
*(mDataZ + grids_per_patch_edge*grids_per_edge) = *(northwest_patchp->mDataZ + grids_per_patch_edge);
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
@@ -533,10 +518,12 @@ void LLSurfacePatch::updateNormals()
|
||||
// update the south edge
|
||||
if (mNormalsInvalid[SOUTHWEST] || mNormalsInvalid[SOUTH] || mNormalsInvalid[SOUTHEAST])
|
||||
{
|
||||
LLSurfacePatch* southeast_patchp = getNeighborPatch(SOUTHEAST);
|
||||
LLSurfacePatch* east_patchp = getNeighborPatch(EAST);
|
||||
// <FS:CR> Aurora Sim
|
||||
if (!getNeighborPatch(EAST) && getNeighborPatch(SOUTHEAST) && getNeighborPatch(SOUTHEAST)->getHasReceivedData())
|
||||
if (!east_patchp && southeast_patchp && southeast_patchp->getHasReceivedData())
|
||||
{
|
||||
*(mDataZ + grids_per_patch_edge) = *(getNeighborPatch(SOUTHEAST)->mDataZ + grids_per_patch_edge * getNeighborPatch(SOUTHEAST)->getSurface()->getGridsPerEdge());
|
||||
*(mDataZ + grids_per_patch_edge) = *(southeast_patchp->mDataZ + grids_per_patch_edge * southeast_patchp->getSurface()->getGridsPerEdge());
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
@@ -552,11 +539,14 @@ void LLSurfacePatch::updateNormals()
|
||||
// we'll want to do different things.
|
||||
if (mNormalsInvalid[NORTHEAST])
|
||||
{
|
||||
if (!getNeighborPatch(NORTHEAST))
|
||||
LLSurfacePatch* northeast_patchp = getNeighborPatch(NORTHEAST);
|
||||
LLSurfacePatch* north_patchp = getNeighborPatch(NORTH);
|
||||
LLSurfacePatch* east_patchp = getNeighborPatch(EAST);
|
||||
if (!northeast_patchp)
|
||||
{
|
||||
if (!getNeighborPatch(NORTH))
|
||||
if (!north_patchp)
|
||||
{
|
||||
if (!getNeighborPatch(EAST))
|
||||
if (!east_patchp)
|
||||
{
|
||||
// No north or east neighbors. Pull from the diagonal in your own patch.
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
@@ -564,13 +554,13 @@ void LLSurfacePatch::updateNormals()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getNeighborPatch(EAST)->getHasReceivedData())
|
||||
if (east_patchp->getHasReceivedData())
|
||||
{
|
||||
// East, but not north. Pull from your east neighbor's northwest point.
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
// <FS:CR> Aurora Sim
|
||||
//*(getNeighborPatch(EAST)->mDataZ + (grids_per_patch_edge - 1)*grids_per_edge);
|
||||
*(getNeighborPatch(EAST)->mDataZ + (getNeighborPatch(EAST)->getSurface()->getGridsPerPatchEdge() - 1)*getNeighborPatch(EAST)->getSurface()->getGridsPerEdge());
|
||||
*(east_patchp->mDataZ + (east_patchp->getSurface()->getGridsPerPatchEdge() - 1)* east_patchp->getSurface()->getGridsPerEdge());
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
@@ -583,7 +573,7 @@ void LLSurfacePatch::updateNormals()
|
||||
else
|
||||
{
|
||||
// We have a north.
|
||||
if (getNeighborPatch(EAST))
|
||||
if (east_patchp)
|
||||
{
|
||||
// North and east neighbors, but not northeast.
|
||||
// Pull from diagonal in your own patch.
|
||||
@@ -592,13 +582,13 @@ void LLSurfacePatch::updateNormals()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getNeighborPatch(NORTH)->getHasReceivedData())
|
||||
if (north_patchp->getHasReceivedData())
|
||||
{
|
||||
// North, but not east. Pull from your north neighbor's southeast corner.
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
// <FS:CR> Aurora Sim
|
||||
//*(getNeighborPatch(NORTH)->mDataZ + (grids_per_patch_edge - 1));
|
||||
*(getNeighborPatch(NORTH)->mDataZ + (getNeighborPatch(NORTH)->getSurface()->getGridsPerPatchEdge() - 1));
|
||||
*(north_patchp->mDataZ + (north_patchp->getSurface()->getGridsPerPatchEdge() - 1));
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
else
|
||||
@@ -609,25 +599,25 @@ void LLSurfacePatch::updateNormals()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (getNeighborPatch(NORTHEAST)->mSurfacep != mSurfacep)
|
||||
else if (northeast_patchp->mSurfacep != mSurfacep)
|
||||
{
|
||||
if (
|
||||
(!getNeighborPatch(NORTH) || (getNeighborPatch(NORTH)->mSurfacep != mSurfacep))
|
||||
(!north_patchp || (north_patchp->mSurfacep != mSurfacep))
|
||||
&&
|
||||
(!getNeighborPatch(EAST) || (getNeighborPatch(EAST)->mSurfacep != mSurfacep)))
|
||||
(!east_patchp || (east_patchp->mSurfacep != mSurfacep)))
|
||||
{
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 own_xpos, own_ypos, neighbor_xpos, neighbor_ypos;
|
||||
S32 own_offset = 0, neighbor_offset = 0;
|
||||
from_region_handle(mSurfacep->getRegion()->getHandle(), &own_xpos, &own_ypos);
|
||||
from_region_handle(getNeighborPatch(NORTHEAST)->mSurfacep->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos);
|
||||
from_region_handle(northeast_patchp->mSurfacep->getRegion()->getHandle(), &neighbor_xpos, &neighbor_ypos);
|
||||
if (own_ypos >= neighbor_ypos)
|
||||
neighbor_offset = own_ypos - neighbor_ypos;
|
||||
else
|
||||
own_offset = neighbor_ypos - own_ypos;
|
||||
|
||||
*(mDataZ + grids_per_patch_edge + grids_per_patch_edge*grids_per_edge) =
|
||||
*(getNeighborPatch(NORTHEAST)->mDataZ + (grids_per_edge + neighbor_offset - own_offset - 1) * getNeighborPatch(NORTHEAST)->getSurface()->getGridsPerEdge());
|
||||
*(northeast_patchp->mDataZ + (grids_per_edge + neighbor_offset - own_offset - 1) * northeast_patchp->getSurface()->getGridsPerEdge());
|
||||
// </FS:CR> Aurora Sim
|
||||
}
|
||||
}
|
||||
@@ -656,15 +646,12 @@ void LLSurfacePatch::updateNormals()
|
||||
dirty_patch = TRUE;
|
||||
}
|
||||
|
||||
if (dirty_patch)
|
||||
{
|
||||
mSurfacep->dirtySurfacePatch(this);
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
mNormalsInvalid[i] = FALSE;
|
||||
}
|
||||
|
||||
return dirty_patch;
|
||||
}
|
||||
|
||||
void LLSurfacePatch::updateEastEdge()
|
||||
@@ -719,7 +706,8 @@ void LLSurfacePatch::updateNorthEdge()
|
||||
U32 i;
|
||||
F32 *south_surface, *north_surface;
|
||||
|
||||
if (!getNeighborPatch(NORTH))
|
||||
LLSurfacePatch* patchp = getNeighborPatch(NORTH);
|
||||
if (!patchp)
|
||||
{
|
||||
south_surface = mDataZ + grids_per_patch_edge*grids_per_edge;
|
||||
north_surface = mDataZ + (grids_per_patch_edge - 1) * grids_per_edge;
|
||||
@@ -727,7 +715,7 @@ void LLSurfacePatch::updateNorthEdge()
|
||||
else if (mConnectedEdge & NORTH_EDGE)
|
||||
{
|
||||
south_surface = mDataZ + grids_per_patch_edge*grids_per_edge;
|
||||
north_surface = getNeighborPatch(NORTH)->mDataZ;
|
||||
north_surface = patchp->mDataZ;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -748,10 +736,11 @@ BOOL LLSurfacePatch::updateTexture()
|
||||
F32 meters_per_grid = getSurface()->getMetersPerGrid();
|
||||
F32 grids_per_patch_edge = (F32)getSurface()->getGridsPerPatchEdge();
|
||||
|
||||
if ((!getNeighborPatch(EAST) || getNeighborPatch(EAST)->getHasReceivedData())
|
||||
&& (!getNeighborPatch(WEST) || getNeighborPatch(WEST)->getHasReceivedData())
|
||||
&& (!getNeighborPatch(SOUTH) || getNeighborPatch(SOUTH)->getHasReceivedData())
|
||||
&& (!getNeighborPatch(NORTH) || getNeighborPatch(NORTH)->getHasReceivedData()))
|
||||
LLSurfacePatch* patchp;
|
||||
if ((!(patchp = getNeighborPatch(EAST)) || patchp->getHasReceivedData())
|
||||
&& (!(patchp = getNeighborPatch(WEST)) || patchp->getHasReceivedData())
|
||||
&& (!(patchp = getNeighborPatch(SOUTH)) || patchp->getHasReceivedData())
|
||||
&& (!(patchp = getNeighborPatch(NORTH)) || patchp->getHasReceivedData()))
|
||||
{
|
||||
LLViewerRegion *regionp = getSurface()->getRegion();
|
||||
LLVector3d origin_region = getOriginGlobal() - getSurface()->getOriginGlobal();
|
||||
@@ -813,7 +802,7 @@ void LLSurfacePatch::updateGL()
|
||||
}
|
||||
}
|
||||
|
||||
void LLSurfacePatch::dirtyZ()
|
||||
bool LLSurfacePatch::dirtyZ()
|
||||
{
|
||||
mSTexUpdate = TRUE;
|
||||
|
||||
@@ -827,20 +816,36 @@ void LLSurfacePatch::dirtyZ()
|
||||
// Invalidate normals in this and neighboring patches
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (getNeighborPatch(i))
|
||||
if (mNeighborPatches[i] == nullptr)
|
||||
{
|
||||
getNeighborPatch(i)->mNormalsInvalid[gDirOpposite[i]] = TRUE;
|
||||
getNeighborPatch(i)->dirty();
|
||||
continue;
|
||||
}
|
||||
if (mNeighborPatches[i]->expired())
|
||||
{
|
||||
LL_WARNS() << "Expired neighbor patch detected. Side " << i << LL_ENDL;
|
||||
delete mNeighborPatches[i];
|
||||
mNeighborPatches[i] = nullptr;
|
||||
continue;
|
||||
}
|
||||
const surface_patch_ref& patchp = mNeighborPatches[i]->lock();
|
||||
if (patchp)
|
||||
{
|
||||
patchp->mNormalsInvalid[gDirOpposite[i]] = TRUE;
|
||||
if (patchp->dirty())
|
||||
{
|
||||
patchp->getSurface()->dirtySurfacePatch(patchp);
|
||||
}
|
||||
if (i < 4)
|
||||
{
|
||||
getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE;
|
||||
getNeighborPatch(i)->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE;
|
||||
patchp->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][0]] = TRUE;
|
||||
patchp->mNormalsInvalid[gDirAdjacent[gDirOpposite[i]][1]] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dirty();
|
||||
mLastUpdateTime = gFrameTime;
|
||||
|
||||
return dirty();
|
||||
}
|
||||
|
||||
|
||||
@@ -877,35 +882,29 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global)
|
||||
|
||||
}
|
||||
|
||||
void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction)
|
||||
void LLSurfacePatch::connectNeighbor(const surface_patch_ref& neighbor_patchp, const U32 direction)
|
||||
{
|
||||
llassert(neighbor_patchp);
|
||||
if (!neighbor_patchp) return;
|
||||
mNormalsInvalid[direction] = TRUE;
|
||||
neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE;
|
||||
|
||||
setNeighborPatch(direction, neighbor_patchp);
|
||||
neighbor_patchp->setNeighborPatch(gDirOpposite[direction], this);
|
||||
|
||||
if (EAST == direction)
|
||||
{
|
||||
mConnectedEdge |= EAST_EDGE;
|
||||
neighbor_patchp->mConnectedEdge |= WEST_EDGE;
|
||||
}
|
||||
else if (NORTH == direction)
|
||||
{
|
||||
mConnectedEdge |= NORTH_EDGE;
|
||||
neighbor_patchp->mConnectedEdge |= SOUTH_EDGE;
|
||||
}
|
||||
else if (WEST == direction)
|
||||
{
|
||||
mConnectedEdge |= WEST_EDGE;
|
||||
neighbor_patchp->mConnectedEdge |= EAST_EDGE;
|
||||
}
|
||||
else if (SOUTH == direction)
|
||||
{
|
||||
mConnectedEdge |= SOUTH_EDGE;
|
||||
neighbor_patchp->mConnectedEdge |= NORTH_EDGE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -963,13 +962,14 @@ void LLSurfacePatch::updateVisibility()
|
||||
if (mVObjp)
|
||||
{
|
||||
mVObjp->dirtyGeom();
|
||||
if (getNeighborPatch(WEST))
|
||||
LLSurfacePatch* patchp;
|
||||
if (patchp = getNeighborPatch(WEST))
|
||||
{
|
||||
getNeighborPatch(WEST)->mVObjp->dirtyGeom();
|
||||
patchp->mVObjp->dirtyGeom();
|
||||
}
|
||||
if (getNeighborPatch(SOUTH))
|
||||
if (patchp = getNeighborPatch(SOUTH))
|
||||
{
|
||||
getNeighborPatch(SOUTH)->mVObjp->dirtyGeom();
|
||||
patchp->mVObjp->dirtyGeom();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1074,9 +1074,21 @@ F32 LLSurfacePatch::getMaxComposition() const
|
||||
return mMaxComposition;
|
||||
}
|
||||
|
||||
void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp)
|
||||
void LLSurfacePatch::setNeighborPatch(const U32 direction, const surface_patch_ref& neighborp)
|
||||
{
|
||||
mNeighborPatches[direction] = neighborp;
|
||||
if (!neighborp)
|
||||
{
|
||||
delete mNeighborPatches[direction];
|
||||
mNeighborPatches[direction] = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mNeighborPatches[direction] == nullptr)
|
||||
{
|
||||
mNeighborPatches[direction] = new surface_patch_weak_ref();
|
||||
}
|
||||
*mNeighborPatches[direction] = neighborp;
|
||||
}
|
||||
mNormalsInvalid[direction] = TRUE;
|
||||
if (direction < 4)
|
||||
{
|
||||
@@ -1087,7 +1099,15 @@ void LLSurfacePatch::setNeighborPatch(const U32 direction, LLSurfacePatch *neigh
|
||||
|
||||
LLSurfacePatch *LLSurfacePatch::getNeighborPatch(const U32 direction) const
|
||||
{
|
||||
return mNeighborPatches[direction];
|
||||
if (mNeighborPatches[direction] == nullptr)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
else if (mNeighborPatches[direction]->expired())
|
||||
{
|
||||
LL_WARNS() << "Expired neighbor patch detected. Side " << direction << LL_ENDL;
|
||||
}
|
||||
return mNeighborPatches[direction]->lock().get();
|
||||
}
|
||||
|
||||
void LLSurfacePatch::clearVObj()
|
||||
|
||||
@@ -43,6 +43,10 @@ class LLVector2;
|
||||
class LLColor4U;
|
||||
class LLAgent;
|
||||
|
||||
class LLSurfacePatch;
|
||||
typedef std::shared_ptr<LLSurfacePatch> surface_patch_ref;
|
||||
typedef std::weak_ptr<LLSurfacePatch> surface_patch_weak_ref;
|
||||
|
||||
// A patch shouldn't know about its visibility since that really depends on the
|
||||
// camera that is looking (or not looking) at it. So, anything about a patch
|
||||
// that is specific to a camera should be in the class below.
|
||||
@@ -64,26 +68,23 @@ public:
|
||||
|
||||
|
||||
|
||||
class LLSurfacePatch
|
||||
class LLSurfacePatch
|
||||
{
|
||||
public:
|
||||
LLSurfacePatch();
|
||||
LLSurfacePatch(LLSurface* surface, U32 side);
|
||||
~LLSurfacePatch();
|
||||
|
||||
void reset(const U32 id);
|
||||
void connectNeighbor(LLSurfacePatch *neighborp, const U32 direction);
|
||||
void connectNeighbor(const surface_patch_ref& neighbor_patchp, const U32 direction);
|
||||
void disconnectNeighbor(LLSurface *surfacep);
|
||||
|
||||
void setNeighborPatch(const U32 direction, LLSurfacePatch *neighborp);
|
||||
void setNeighborPatch(const U32 direction, const surface_patch_ref& neighborp);
|
||||
LLSurfacePatch *getNeighborPatch(const U32 direction) const;
|
||||
|
||||
void colorPatch(const U8 r, const U8 g, const U8 b);
|
||||
|
||||
BOOL updateTexture();
|
||||
|
||||
void updateVerticalStats();
|
||||
void updateCompositionStats();
|
||||
void updateNormals();
|
||||
bool updateNormals();
|
||||
|
||||
void updateEastEdge();
|
||||
void updateNorthEdge();
|
||||
@@ -92,7 +93,7 @@ public:
|
||||
void updateVisibility();
|
||||
void updateGL();
|
||||
|
||||
void dirtyZ(); // Dirty the z values of this patch
|
||||
bool dirtyZ(); // Dirty the z values of this patch
|
||||
void setHasReceivedData();
|
||||
BOOL getHasReceivedData() const;
|
||||
|
||||
@@ -139,17 +140,19 @@ public:
|
||||
void setDataNorm(LLVector3 *data_norm) { mDataNorm = data_norm; }
|
||||
F32 *getDataZ() const { return mDataZ; }
|
||||
|
||||
void dirty(); // Mark this surface patch as dirty...
|
||||
bool dirty(); // Mark this surface patch as dirty...
|
||||
void clearDirty() { mDirty = FALSE; }
|
||||
|
||||
void clearVObj();
|
||||
|
||||
U32 getSide() const { return mSide; }
|
||||
|
||||
public:
|
||||
BOOL mHasReceivedData; // has the patch EVER received height data?
|
||||
BOOL mSTexUpdate; // Does the surface texture need to be updated?
|
||||
|
||||
protected:
|
||||
LLSurfacePatch *mNeighborPatches[8]; // Adjacent patches
|
||||
std::weak_ptr<LLSurfacePatch>* mNeighborPatches[8]; // Adjacent patches
|
||||
BOOL mNormalsInvalid[9]; // Which normals are invalid
|
||||
|
||||
BOOL mDirty;
|
||||
@@ -184,6 +187,8 @@ protected:
|
||||
// of LLSurface that is "connected" to another LLSurface
|
||||
U64 mLastUpdateTime; // Time patch was last updated
|
||||
|
||||
U32 mSide; // Side relative to parent surface.
|
||||
|
||||
LLSurface *mSurfacep; // Pointer to "parent" surface
|
||||
};
|
||||
|
||||
|
||||
@@ -164,10 +164,10 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
|
||||
//if(!is_changed) continue;
|
||||
|
||||
// Now to update the patch information so it will redraw correctly.
|
||||
LLSurfacePatch *patchp= land.resolvePatchRegion(pos_region);
|
||||
if (patchp)
|
||||
auto& patchp = land.resolvePatchRegion(pos_region);
|
||||
if (patchp && patchp->dirtyZ())
|
||||
{
|
||||
patchp->dirtyZ();
|
||||
patchp->getSurface()->dirtySurfacePatch(patchp);
|
||||
}
|
||||
|
||||
// Also force the property lines to update, normals to recompute, etc.
|
||||
@@ -305,10 +305,10 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
|
||||
//if(!is_changed) continue;
|
||||
|
||||
// Now to update the patch information so it will redraw correctly.
|
||||
LLSurfacePatch *patchp= land.resolvePatchRegion(min_region);
|
||||
if (patchp)
|
||||
auto& patchp = land.resolvePatchRegion(min_region);
|
||||
if (patchp && patchp->dirtyZ())
|
||||
{
|
||||
patchp->dirtyZ();
|
||||
patchp->getSurface()->dirtySurfacePatch(patchp);
|
||||
}
|
||||
|
||||
// Also force the property lines to update, normals to recompute, etc.
|
||||
|
||||
@@ -56,25 +56,22 @@ namespace LLViewerDisplayName
|
||||
void doNothing() { }
|
||||
}
|
||||
|
||||
class LLSetDisplayNameResponder : public LLHTTPClient::ResponderIgnoreBody
|
||||
class LLSetDisplayNameResponder final : public LLHTTPClient::ResponderIgnoreBody
|
||||
{
|
||||
LOG_CLASS(LLSetDisplayNameResponder);
|
||||
private:
|
||||
// only care about errors
|
||||
/*virtual*/ void httpFailure()
|
||||
void httpFailure() override
|
||||
{
|
||||
LL_WARNS() << dumpResponse() << LL_ENDL;
|
||||
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
|
||||
LLViewerDisplayName::sSetDisplayNameSignal(false, LLStringUtil::null, LLSD());
|
||||
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
|
||||
}
|
||||
|
||||
/*virtual*/ char const* getName(void) const { return "LLSetDisplayNameResponder"; }
|
||||
char const* getName() const override { return "LLSetDisplayNameResponder"; }
|
||||
};
|
||||
|
||||
void LLViewerDisplayName::set(const std::string& display_name, const set_name_slot_t& slot)
|
||||
{
|
||||
// TODO: simple validation here
|
||||
|
||||
LLViewerRegion* region = gAgent.getRegion();
|
||||
llassert(region);
|
||||
std::string cap_url = region->getCapability("SetDisplayName");
|
||||
@@ -93,7 +90,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
|
||||
// Our display name will be in cache before the viewer's UI is available
|
||||
// to request a change, so we can use direct lookup without callback.
|
||||
LLAvatarName av_name;
|
||||
if (!LLAvatarNameCache::get( gAgent.getID(), &av_name))
|
||||
if (!LLAvatarNameCache::get(gAgent.getID(), &av_name))
|
||||
{
|
||||
slot(false, "name unavailable", LLSD());
|
||||
return;
|
||||
@@ -104,8 +101,6 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
|
||||
change_array.append(av_name.getDisplayName());
|
||||
change_array.append(display_name);
|
||||
|
||||
LL_INFOS() << "Set name POST to " << cap_url << LL_ENDL;
|
||||
|
||||
// Record our caller for when the server sends back a reply
|
||||
sSetDisplayNameSignal.connect(slot);
|
||||
|
||||
@@ -117,14 +112,14 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl
|
||||
LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder, headers);
|
||||
}
|
||||
|
||||
class LLSetDisplayNameReply : public LLHTTPNode
|
||||
class LLSetDisplayNameReply final : public LLHTTPNode
|
||||
{
|
||||
LOG_CLASS(LLSetDisplayNameReply);
|
||||
public:
|
||||
/*virtual*/ void post(
|
||||
LLHTTPNode::ResponsePtr response,
|
||||
const LLSD& context,
|
||||
const LLSD& input) const
|
||||
const LLSD& input) const override
|
||||
{
|
||||
LLSD body = input["body"];
|
||||
|
||||
@@ -157,12 +152,12 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class LLDisplayNameUpdate : public LLHTTPNode
|
||||
class LLDisplayNameUpdate final : public LLHTTPNode
|
||||
{
|
||||
/*virtual*/ void post(
|
||||
LLHTTPNode::ResponsePtr response,
|
||||
const LLSD& context,
|
||||
const LLSD& input) const
|
||||
const LLSD& input) const override
|
||||
{
|
||||
LLSD body = input["body"];
|
||||
LLUUID agent_id = body["agent_id"];
|
||||
@@ -195,7 +190,7 @@ class LLDisplayNameUpdate : public LLHTTPNode
|
||||
{
|
||||
LLSD args;
|
||||
args["OLD_NAME"] = old_display_name;
|
||||
args["SLID"] = av_name.getUserName();
|
||||
args["SLID"] = "secondlife:///app/agent/" + agent_id.asString() + "/username";
|
||||
args["NEW_NAME"] = av_name.getDisplayName();
|
||||
LLNotificationsUtil::add("DisplayNameUpdate", args);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -575,6 +575,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLPointer<LLImageRaw> raw = new LLImageRaw;
|
||||
raw->enableOverSize();
|
||||
|
||||
S32 width = gViewerWindow->getWindowDisplayWidth();
|
||||
S32 height = gViewerWindow->getWindowDisplayHeight();
|
||||
|
||||
@@ -2241,6 +2241,8 @@ void process_chat_from_simulator(LLMessageSystem* msg, void** user_data)
|
||||
|
||||
// Object owner for objects
|
||||
msg->getUUID("ChatData", "OwnerID", owner_id);
|
||||
bool has_owner = owner_id.notNull();
|
||||
if (chatter && has_owner) chatter->mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible
|
||||
|
||||
msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp);
|
||||
chat.mSourceType = (EChatSourceType)source_temp;
|
||||
@@ -2251,8 +2253,8 @@ void process_chat_from_simulator(LLMessageSystem* msg, void** user_data)
|
||||
// NaCL - Antispam Registry
|
||||
auto antispam = NACLAntiSpamRegistry::getIfExists();
|
||||
if (antispam && chat.mChatType != CHAT_TYPE_START && chat.mChatType != CHAT_TYPE_STOP //Chat type isn't typing
|
||||
&& (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, from_id, owner_id.isNull() ? LFIDBearer::AVATAR : LFIDBearer::OBJECT) // Spam from an object or avatar?
|
||||
|| (owner_id.notNull() && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, owner_id))))) // Spam from a resident?
|
||||
&& (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, from_id, !has_owner ? LFIDBearer::AVATAR : LFIDBearer::OBJECT) // Spam from an object or avatar?
|
||||
|| (has_owner && (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_CHAT, owner_id))))) // Spam from a resident?
|
||||
return;
|
||||
// NaCl End
|
||||
|
||||
@@ -6923,9 +6925,11 @@ void process_script_dialog(LLMessageSystem* msg, void**)
|
||||
// NaCl End
|
||||
}
|
||||
|
||||
bool has_owner = owner_id.notNull();
|
||||
|
||||
// NaCl - Antispam
|
||||
if (owner_id.isNull() ? is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(object_id), object_id == gAgentID)
|
||||
: is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(owner_id), owner_id == gAgentID)) return;
|
||||
if (!has_owner ? is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(object_id), object_id == gAgentID)
|
||||
: is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(owner_id), !is_group && owner_id == gAgentID)) return;
|
||||
// NaCl End
|
||||
|
||||
if (LLMuteList::getInstance()->isMuted(object_id) || LLMuteList::getInstance()->isMuted(owner_id))
|
||||
@@ -6933,6 +6937,10 @@ void process_script_dialog(LLMessageSystem* msg, void**)
|
||||
return;
|
||||
}
|
||||
|
||||
auto chatter = gObjectList.findObject(object_id);
|
||||
// Singu Note: Try to get Owner whenever possible
|
||||
if (chatter && has_owner) chatter->mOwnerID = owner_id;
|
||||
|
||||
std::string message;
|
||||
std::string last_name;
|
||||
std::string object_name;
|
||||
@@ -6985,20 +6993,50 @@ void process_script_dialog(LLMessageSystem* msg, void**)
|
||||
}
|
||||
}
|
||||
|
||||
LLSD query_string;
|
||||
query_string["owner"] = owner_id;
|
||||
if (rlv_handler_t::isEnabled() && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS)) && !is_group && RlvUtil::isNearbyAgent(owner_id))
|
||||
{
|
||||
query_string["rlv_shownames"] = true;
|
||||
}
|
||||
|
||||
if (const auto& obj = chatter ? chatter : gObjectList.findObject(owner_id)) // Fallback on the owner, if the chatter isn't present
|
||||
{
|
||||
auto& slurl = query_string["slurl"];
|
||||
const auto& region = obj->getRegion();
|
||||
if (rlv_handler_t::isEnabled() && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) && LLWorld::instance().isRegionListed(region))
|
||||
slurl = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
|
||||
else
|
||||
{
|
||||
const auto& pos = obj->getPositionRegion();
|
||||
S32 x = ll_round((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS));
|
||||
S32 y = ll_round((F32)fmod((F64)pos.mV[VY], (F64)REGION_WIDTH_METERS));
|
||||
S32 z = ll_round((F32)pos.mV[VZ]);
|
||||
std::ostringstream location;
|
||||
location << region->getName() << '/' << x << '/' << y << '/' << z;
|
||||
if (chatter != obj) location << "?owner_not_object";
|
||||
slurl = location.str();
|
||||
}
|
||||
}
|
||||
query_string["name"] = object_name;
|
||||
query_string["groupowned"] = is_group;
|
||||
object_name = LLSLURL("objectim", object_id, LLURI::mapToQueryString(query_string)).getSLURLString();
|
||||
|
||||
LLSD args;
|
||||
args["TITLE"] = object_name;
|
||||
args["MESSAGE"] = message;
|
||||
args["CHANNEL"] = chat_channel;
|
||||
LLNotificationPtr notification;
|
||||
char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME";
|
||||
args[name] = is_group ? last_name : LLCacheName::buildFullName(first_name, last_name);
|
||||
args[name] = has_owner ? is_group ? LLGroupActions::getSLURL(owner_id) : LLAvatarActions::getSLURL(owner_id) :
|
||||
is_group ? last_name : LLCacheName::buildFullName(first_name, last_name);
|
||||
if (is_text_box)
|
||||
{
|
||||
args["DEFAULT"] = default_text;
|
||||
payload["textbox"] = "true";
|
||||
LLNotificationsUtil::add("ScriptTextBoxDialog", args, payload, callback_script_dialog);
|
||||
}
|
||||
else if (!first_name.empty())
|
||||
else if (!is_group)
|
||||
{
|
||||
notification = LLNotifications::instance().add(
|
||||
LLNotification::Params("ScriptDialog").substitutions(args).payload(payload).form_elements(form.asLLSD()));
|
||||
|
||||
@@ -1258,6 +1258,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
||||
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_Sound, audio_uuid, block_num );
|
||||
// HACK: Owner id only valid if non-null sound id or particle system
|
||||
mesgsys->getUUIDFast(_PREHASH_ObjectData, _PREHASH_OwnerID, owner_id, block_num );
|
||||
if (owner_id.notNull()) mOwnerID = owner_id; // Singu Note: Try to get Owner whenever possible
|
||||
mesgsys->getF32Fast( _PREHASH_ObjectData, _PREHASH_Gain, gain, block_num );
|
||||
mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Flags, sound_flags, block_num );
|
||||
mesgsys->getU8Fast( _PREHASH_ObjectData, _PREHASH_Material, material, block_num );
|
||||
|
||||
@@ -965,6 +965,7 @@ void LLViewerRegion::forceUpdate()
|
||||
void LLViewerRegion::connectNeighbor(LLViewerRegion *neighborp, U32 direction)
|
||||
{
|
||||
mImpl->mLandp->connectNeighbor(neighborp->mImpl->mLandp, direction);
|
||||
neighborp->mImpl->mLandp->connectNeighbor(mImpl->mLandp, gDirOpposite[direction]);
|
||||
#if ENABLE_CLASSIC_CLOUDS
|
||||
mCloudLayer.connectNeighbor(&(neighborp->mCloudLayer), direction);
|
||||
#endif
|
||||
|
||||
@@ -247,7 +247,7 @@ const F32 MIN_AFK_TIME = 2.f; // minimum time after setting away state before co
|
||||
const F32 MAX_FAST_FRAME_TIME = 0.5f;
|
||||
const F32 FAST_FRAME_INCREMENT = 0.1f;
|
||||
|
||||
const F32 MIN_DISPLAY_SCALE = 0.75f;
|
||||
const F32 MIN_DISPLAY_SCALE = 0.5f;
|
||||
|
||||
std::string LLViewerWindow::sSnapshotBaseName;
|
||||
std::string LLViewerWindow::sSnapshotDir;
|
||||
|
||||
@@ -81,7 +81,6 @@ LLVOGrass::SpeciesNames LLVOGrass::sSpeciesNames;
|
||||
LLVOGrass::LLVOGrass(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
|
||||
: LLAlphaObject(id, pcode, regionp)
|
||||
{
|
||||
mPatch = NULL;
|
||||
mLastPatchUpdateTime = 0;
|
||||
mGrassVel.clearVec();
|
||||
mGrassBend.clearVec();
|
||||
@@ -331,7 +330,8 @@ void LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
return;
|
||||
}
|
||||
|
||||
if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime()))
|
||||
const auto& patch = mPatch.lock();
|
||||
if (patch && (mLastPatchUpdateTime != patch->getLastUpdateTime()))
|
||||
{
|
||||
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
|
||||
}
|
||||
@@ -507,9 +507,10 @@ void LLVOGrass::getGeometry(S32 idx,
|
||||
return ;
|
||||
}
|
||||
|
||||
mPatch = mRegionp->getLand().resolvePatchRegion(getPositionRegion());
|
||||
if (mPatch)
|
||||
mLastPatchUpdateTime = mPatch->getLastUpdateTime();
|
||||
const auto& patch = mRegionp->getLand().resolvePatchRegion(getPositionRegion());
|
||||
if (patch)
|
||||
mLastPatchUpdateTime = patch->getLastUpdateTime();
|
||||
mPatch = patch;
|
||||
|
||||
LLVector3 position;
|
||||
// Create random blades of grass with gaussian distribution
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
F32 mBladeSizeX;
|
||||
F32 mBladeSizeY;
|
||||
|
||||
LLSurfacePatch *mPatch; // Stores the land patch where the grass is centered
|
||||
std::weak_ptr<LLSurfacePatch> mPatch; // Stores the land patch where the grass is centered
|
||||
|
||||
U64 mLastPatchUpdateTime;
|
||||
|
||||
|
||||
@@ -267,18 +267,19 @@ BOOL LLVOSurfacePatch::updateGeometry(LLDrawable *drawable)
|
||||
|
||||
length = patch_width / render_stride;
|
||||
|
||||
if (mPatchp->getNeighborPatch(NORTH))
|
||||
LLSurfacePatch* neighborPatch;
|
||||
if (neighborPatch = mPatchp->getNeighborPatch(NORTH))
|
||||
{
|
||||
north_stride = mPatchp->getNeighborPatch(NORTH)->getRenderStride();
|
||||
north_stride = neighborPatch->getRenderStride();
|
||||
}
|
||||
else
|
||||
{
|
||||
north_stride = render_stride;
|
||||
}
|
||||
|
||||
if (mPatchp->getNeighborPatch(EAST))
|
||||
if (neighborPatch = mPatchp->getNeighborPatch(EAST))
|
||||
{
|
||||
east_stride = mPatchp->getNeighborPatch(EAST)->getRenderStride();
|
||||
east_stride = neighborPatch->getRenderStride();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -5569,15 +5569,15 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
||||
|
||||
else
|
||||
{
|
||||
if( type == LLDrawPool::POOL_FULLBRIGHT || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK)
|
||||
{
|
||||
pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
|
||||
}
|
||||
//Annoying exception to the rule. getPoolTypeFromTE will return POOL_ALPHA_MASK for legacy bumpmaps, but there is no POOL_ALPHA_MASK in deferred.
|
||||
else if(type == LLDrawPool::POOL_MATERIALS || (type == LLDrawPool::POOL_ALPHA_MASK && mat))
|
||||
if (type == LLDrawPool::POOL_MATERIALS || ((type == LLDrawPool::POOL_ALPHA_MASK || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK) && mat))
|
||||
{
|
||||
pool->addRiggedFace(facep, mat->getShaderMask());
|
||||
}
|
||||
else if (type == LLDrawPool::POOL_FULLBRIGHT || type == LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK)
|
||||
{
|
||||
pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_FULLBRIGHT);
|
||||
}
|
||||
else if (type == LLDrawPool::POOL_BUMP && te->getBumpmap())
|
||||
{
|
||||
pool->addRiggedFace(facep, LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP);
|
||||
@@ -5674,7 +5674,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
||||
type = LLDrawPool::POOL_FULLBRIGHT;
|
||||
}
|
||||
}
|
||||
else if(force_simple && type != LLDrawPool::POOL_FULLBRIGHT && type != LLDrawPool::POOL_ALPHA_MASK && type != LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK)
|
||||
else if(force_simple && type != LLDrawPool::POOL_FULLBRIGHT && (!LLPipeline::sRenderDeferred && (type != LLDrawPool::POOL_ALPHA_MASK && type != LLDrawPool::POOL_FULLBRIGHT_ALPHA_MASK)))
|
||||
{
|
||||
type = LLDrawPool::POOL_SIMPLE;
|
||||
}
|
||||
|
||||
@@ -673,7 +673,7 @@ LLSurfacePatch * LLWorld::resolveLandPatchGlobal(const LLVector3d &pos_global)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return regionp->getLand().resolvePatchGlobal(pos_global);
|
||||
return regionp->getLand().resolvePatchGlobal(pos_global).get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2667,6 +2667,9 @@ void LLPipeline::clearRebuildGroups()
|
||||
iter != mGroupQ2.end(); ++iter)
|
||||
{
|
||||
LLSpatialGroup* group = *iter;
|
||||
if (group == nullptr) {
|
||||
LL_WARNS() << "Null spatial group in Pipeline::mGroupQ2." << LL_ENDL;
|
||||
}
|
||||
|
||||
// If the group contains HUD objects, save the group
|
||||
if (group->isHUDGroup())
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu label="Objects" name="Objects">
|
||||
<menu filename="menu_objects_list_owners.xml"/>
|
||||
<menu_item_call label="Cam To" name="Cam To">
|
||||
<on_click function="List.Object.CamTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
@@ -37,6 +38,10 @@
|
||||
<on_visible function="List.Object.CanEdit" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Derender" name="Derender">
|
||||
<on_click function="List.Object.Derender"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<menu label="Owner" name="Object Owner Submenu">
|
||||
<menu_item_call label="Profile" name="Profile">
|
||||
<on_click function="List.ShowProfile" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu name="Actions" label="Actions">
|
||||
<menu_item_call label="Web Profile" name="Web Profile">
|
||||
<on_click function="List.ShowWebProfile" userdata=""/>
|
||||
<on_visible function="List.VisibleWebProfile" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Pay" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Instant Message" name="Instant Message">
|
||||
<on_click function="List.StartIM" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Conference Chat" name="Conference Chat">
|
||||
<on_click function="List.StartConference" userdata=""/>
|
||||
<on_visible function="List.EnableMultipleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Call" name="Call">
|
||||
<on_click function="List.StartCall" userdata=""/>
|
||||
<on_enable function="List.EnableCall" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Conference Call" name="Conference Call">
|
||||
<on_click function="List.StartAdhocCall" userdata=""/>
|
||||
<on_enable function="List.EnableCall" userdata=""/>
|
||||
<on_visible function="List.EnableMultipleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Add Friend" name="Add Friend">
|
||||
<on_click function="List.RequestFriendship" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableIsNotFriend" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Remove Friend" name="Remove Friend">
|
||||
<on_click function="List.RemoveFriend" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableIsFriend" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="List.TeleportTo" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk" userdata=""/>
|
||||
<on_visible function="List.Stalkable" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="List.Track" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="Copy" label="Copy">
|
||||
<menu_item_call label="Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Name" name="Copy Name">
|
||||
<on_click function="List.CopyNames" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu_item_call label="Focus" name="Focus">
|
||||
<on_click function="Radar.Focus" userdata=""/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu label="Moderation" name="Moderation" create_jump_keys="">
|
||||
<menu_item_call label="Mute" name="Mute">
|
||||
<on_click function="List.ToggleMute" userdata=""/>
|
||||
<on_visible function="List.EnableMute" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Unmute" name="Unmute">
|
||||
<on_click function="List.ToggleMute" userdata=""/>
|
||||
<on_visible function="List.EnableUnmute" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Ban From Group" name="Ban From Group">
|
||||
<on_click function="List.BanFromGroup" userdata=""/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Report Abuse" name="Report Abuse">
|
||||
<on_click function="List.AbuseReport" userdata=""/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Freeze" name="Freeze">
|
||||
<on_click function="List.Freeze" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject/Ban from Parcel" name="Eject/Ban from Parcel">
|
||||
<on_click function="List.ParcelEject" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject from estate" name="Eject from estate">
|
||||
<on_click function="List.EstateEject" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject and ban from estate" name="Eject and ban from estate">
|
||||
<on_click function="List.EstateBan" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
</menu>
|
||||
113
indra/newview/skins/default/xui/en-us/menu_url_object_owner.xml
Normal file
113
indra/newview/skins/default/xui/en-us/menu_url_object_owner.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<context_menu label="Owner" name="Object Owner Submenu">
|
||||
<menu_item_call label="Send IM..." name="send_im">
|
||||
<on_click function="List.StartIM" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu name="Actions" label="Actions">
|
||||
<menu_item_call label="Profile" name="Profile">
|
||||
<on_click function="List.ShowProfile" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Web Profile" name="Web Profile">
|
||||
<on_click function="List.ShowWebProfile" userdata=""/>
|
||||
<on_visible function="List.VisibleWebProfile" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Pay" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Call" name="Call">
|
||||
<on_click function="List.StartCall" userdata=""/>
|
||||
<on_visible function="List.EnableCall" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Add Friend" name="Add Friend">
|
||||
<on_click function="List.RequestFriendship" userdata=""/>
|
||||
<on_visible function="List.EnableIsNotFriend" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Remove Friend" name="Remove Friend">
|
||||
<on_click function="List.RemoveFriend" userdata=""/>
|
||||
<on_visible function="List.EnableIsFriend" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="List.TeleportTo" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Find on Map" name="Find on Map">
|
||||
<on_click function="List.Stalk" userdata=""/>
|
||||
<on_visible function="List.Stalkable" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Share" name="Share">
|
||||
<on_click function="List.Share" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="List.Track" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Focus" name="Focus">
|
||||
<on_click function="Radar.Focus" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="Copy">
|
||||
<menu_item_call label="Name" name="copy_name">
|
||||
<on_click function="List.CopyNames" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="SLURL" name="url_copy">
|
||||
<on_click function="List.CopySLURL" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Key" name="key_copy">
|
||||
<menu_item_call.on_click function="List.CopyUUIDs" userdata=""/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu label="Moderation" name="Moderation" create_jump_keys="">
|
||||
<menu_item_call label="Mute" name="Mute">
|
||||
<on_click function="List.ToggleMute" userdata=""/>
|
||||
<on_visible function="List.EnableMute" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Unmute" name="Unmute">
|
||||
<on_click function="List.ToggleMute" userdata=""/>
|
||||
<on_visible function="List.EnableUnmute" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Ban From Group" name="Ban From Group">
|
||||
<on_click function="List.BanFromGroup" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Report Abuse" name="Report Abuse">
|
||||
<on_click function="List.AbuseReport" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Freeze" name="Freeze">
|
||||
<on_click function="List.Freeze" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject/Ban from Parcel" name="Eject/Ban from Parcel">
|
||||
<on_click function="List.ParcelEject" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject from estate" name="Eject from estate">
|
||||
<on_click function="List.EstateEject" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Eject and ban from estate" name="Eject and ban from estate">
|
||||
<on_click function="List.EstateBan" userdata=""/>
|
||||
<on_visible function="List.IsNearby" userdata=""/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
</context_menu>
|
||||
@@ -3,6 +3,8 @@
|
||||
layout="topleft"
|
||||
label="Object"
|
||||
name="Url Popup">
|
||||
<menu filename="menu_url_object_owner.xml"/>
|
||||
<menu name="URL Actions" label="URL Actions">
|
||||
<menu_item_call
|
||||
label="Object Profile..."
|
||||
layout="topleft"
|
||||
@@ -40,6 +42,8 @@
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="Teleport" />
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="Object" label="Object">
|
||||
<menu_item_call label="Cam To" name="Cam To">
|
||||
<on_click function="List.Object.CamTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
@@ -76,25 +80,30 @@
|
||||
<on_click function="List.Object.Edit" userdata=""/>
|
||||
<on_visible function="List.Object.CanEdit" userdata=""/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Derender" name="Derender">
|
||||
<on_click function="List.Object.Derender"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu name="Copy" label="Copy">
|
||||
<menu_item_call
|
||||
label="Copy Object Name to clipboard"
|
||||
label="Name"
|
||||
layout="topleft"
|
||||
name="url_copy_label">
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="CopyLabel" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Copy SLURL to clipboard"
|
||||
label="SLURL"
|
||||
layout="topleft"
|
||||
name="url_copy">
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="CopyUrl" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Key to clipboard" name="key_copy">
|
||||
<menu_item_call label="Key" name="key_copy">
|
||||
<menu_item_call.on_click function="List.CopyUUIDs"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
<menu_item_call label="Select All" name="Select All">
|
||||
<on_click function="Text" userdata="SelectAll"/>
|
||||
</menu_item_call>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<check_box bottom_delta="0" follows="top" height="16" initial_value="false" label="Hide All Group Titles" left="101" name="show_all_title_checkbox"/>
|
||||
<check_box bottom_delta="-18" follows="top" height="16" initial_value="false" label="Hide My Group Title" left="101" name="show_my_title_checkbox"/>
|
||||
<text bottom="-180" height="12" left="10" name="UI Size:">UI Size:</text>
|
||||
<slider bottom="-180" can_edit_text="true" height="16" increment="0.025" initial_val="1" left="98" max_val="2.4" min_val="0.75" name="ui_scale_slider" value="1" width="227" />
|
||||
<slider bottom="-180" can_edit_text="true" height="16" increment="0.025" initial_val="1" left="98" max_val="2.4" min_val="0.5" name="ui_scale_slider" value="1" width="227" />
|
||||
<check_box bottom="-195" height="16" initial_value="false" label="Use resolution independent scale" left="101" name="ui_auto_scale"/>
|
||||
<check_box bottom="-219" height="16" left="10" label="Go away when idle" name="away_when_idle_checkbox"/>
|
||||
<spinner bottom="-220" decimal_digits="0" height="16" increment="1" initial_val="300" label="Away Timeout:" label_width="91" left="136" max_val="600" min_val="0" name="afk_timeout_spinner" width="137"/>
|
||||
|
||||
@@ -3360,7 +3360,7 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un(
|
||||
</notification>
|
||||
|
||||
<notification name="OfferFriendship">
|
||||
[NAME] vous demande de devenir son ami(e).
|
||||
[NAME_SLURL] vous demande de devenir son ami(e).
|
||||
|
||||
[MESSAGE]
|
||||
|
||||
@@ -3376,7 +3376,7 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un(
|
||||
</notification>
|
||||
|
||||
<notification name="OfferFriendshipNoMessage">
|
||||
[NAME] vous demande de devenir son ami.
|
||||
[NAME_SLURL] vous demande de devenir son ami.
|
||||
|
||||
(Par défaut, vous pourrez voir quand vous êtes les deux connecté(e)s).
|
||||
<form name="form">
|
||||
@@ -3386,11 +3386,11 @@ L'objet [OBJECTFROMNAME] appartenant à un utilisateur inconnu vous a donné un(
|
||||
</notification>
|
||||
|
||||
<notification name="FriendshipAccepted">
|
||||
[NAME] a accepté votre amitié.
|
||||
[NAME_SLURL] a accepté votre amitié. [MESSAGE]
|
||||
</notification>
|
||||
|
||||
<notification name="FriendshipDeclined">
|
||||
[NAME] a refusé votre amitié.
|
||||
[NAME_SLURL] a refusé votre amitié. [MESSAGE]
|
||||
</notification>
|
||||
|
||||
<notification name="OfferCallingCard">
|
||||
|
||||
Reference in New Issue
Block a user