Merge branch 'master' of github-hazim:HazimGazov/Inertia
This commit is contained in:
@@ -99,6 +99,7 @@ void info_callback(const char* msg, void*)
|
||||
|
||||
LLImageJ2COJ::LLImageJ2COJ() : LLImageJ2CImpl()
|
||||
{
|
||||
mRawImagep=NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,9 +167,17 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
// The image decode failed if the return was NULL or the component
|
||||
// count was zero. The latter is just a sanity check before we
|
||||
// dereference the array.
|
||||
if(!image || !image->numcomps)
|
||||
if(!image)
|
||||
{
|
||||
llwarns << "ERROR -> decodeImpl: failed to decode image!" << llendl;
|
||||
LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image - no image" << LL_ENDL;
|
||||
return TRUE; // done
|
||||
}
|
||||
|
||||
S32 img_components = image->numcomps;
|
||||
|
||||
if( !img_components ) // < 1 ||img_components > 4 )
|
||||
{
|
||||
LL_DEBUGS("Openjpeg") << "ERROR -> decodeImpl: failed to decode image wrong number of components: " << img_components << LL_ENDL;
|
||||
if (image)
|
||||
{
|
||||
opj_image_destroy(image);
|
||||
@@ -178,20 +187,21 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
}
|
||||
|
||||
// sometimes we get bad data out of the cache - check to see if the decode succeeded
|
||||
for (S32 i = 0; i < image->numcomps; i++)
|
||||
for (S32 i = 0; i < img_components; i++)
|
||||
{
|
||||
if (image->comps[i].factor != base.getRawDiscardLevel())
|
||||
{
|
||||
// if we didn't get the discard level we're expecting, fail
|
||||
opj_image_destroy(image);
|
||||
if (image) //anyway somthing odd with the image, better check than crash
|
||||
opj_image_destroy(image);
|
||||
base.mDecoding = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if(image->numcomps <= first_channel)
|
||||
if(img_components <= first_channel)
|
||||
{
|
||||
llwarns << "trying to decode more channels than are present in image: numcomps: " << image->numcomps << " first_channel: " << first_channel << llendl;
|
||||
LL_DEBUGS("Openjpeg") << "trying to decode more channels than are present in image: numcomps: " << img_components << " first_channel: " << first_channel << LL_ENDL;
|
||||
if (image)
|
||||
{
|
||||
opj_image_destroy(image);
|
||||
@@ -202,7 +212,6 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
|
||||
// Copy image data into our raw image format (instead of the separate channel format
|
||||
|
||||
S32 img_components = image->numcomps;
|
||||
S32 channels = img_components - first_channel;
|
||||
if( channels > max_channel_count )
|
||||
channels = max_channel_count;
|
||||
@@ -249,7 +258,10 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
|
||||
}
|
||||
|
||||
/* free image data structure */
|
||||
opj_image_destroy(image);
|
||||
if (image)
|
||||
{
|
||||
opj_image_destroy(image);
|
||||
}
|
||||
|
||||
return TRUE; // done
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ BOOL LLTemplateMessageReader::readMessage(const U8* data,class LLHost const &)
|
||||
}
|
||||
|
||||
BOOL gValidateMessage = FALSE;
|
||||
BOOL LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, LLHost const &sender, bool trusted)
|
||||
BOOL LLTemplateMessageReader::validateMessage(const U8*, S32 buffer_size, const LLHost& sender, bool trusted, BOOL custom)
|
||||
{
|
||||
return gValidateMessage;
|
||||
}
|
||||
|
||||
@@ -1016,8 +1016,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
|
||||
mFormatType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
default:
|
||||
//HACKY MCHACK HACK
|
||||
llinfos << "Bad number of components for texture: " << (U32)getComponents() << llendl;
|
||||
LL_DEBUGS("Openjpeg") << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL;
|
||||
to_create = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1487,8 +1487,8 @@ endif (INSTALL)
|
||||
# Add tests
|
||||
if (NOT STANDALONE)
|
||||
ADD_VIEWER_BUILD_TEST(llagentaccess viewer)
|
||||
ADD_VIEWER_BUILD_TEST(llworldmap viewer)
|
||||
ADD_VIEWER_BUILD_TEST(llworldmipmap viewer)
|
||||
#ADD_VIEWER_BUILD_TEST(llworldmap viewer)
|
||||
#ADD_VIEWER_BUILD_TEST(llworldmipmap viewer)
|
||||
ADD_VIEWER_BUILD_TEST(lltextureinfo viewer)
|
||||
ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer)
|
||||
ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer)
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
</array>
|
||||
<key>tags</key>
|
||||
<array>
|
||||
<string>ShaderLoading</string>
|
||||
<string>ShaderLoading</string>
|
||||
<string>Openjpeg</string>
|
||||
</array>
|
||||
</map>
|
||||
</array>
|
||||
|
||||
@@ -6140,6 +6140,17 @@
|
||||
<key>Value</key>
|
||||
<real>128.0</real>
|
||||
</map>
|
||||
<key>MapShowAgentCount</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show number of agents next to region names on world map</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>MapShowEvents</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -174,20 +174,6 @@ bool LLAvatarListEntry::getAlive()
|
||||
{
|
||||
mInSimFrame = U32_MAX;
|
||||
chat_avatar_status(mName, mID, ALERT_TYPE_SIM, false);
|
||||
if(gSavedSettings.getBOOL("RadarChatKeys"))
|
||||
{
|
||||
gMessageSystem->newMessage("ScriptDialogReply");
|
||||
gMessageSystem->nextBlock("AgentData");
|
||||
gMessageSystem->addUUID("AgentID", gAgent.getID());
|
||||
gMessageSystem->addUUID("SessionID", gAgent.getSessionID());
|
||||
gMessageSystem->nextBlock("Data");
|
||||
gMessageSystem->addUUID("ObjectID", gAgent.getID());
|
||||
gMessageSystem->addS32("ChatChannel", -777777777);
|
||||
gMessageSystem->addS32("ButtonIndex", 1);
|
||||
gMessageSystem->addString("ButtonLabel",llformat("%d,%d,", gFrameCount, 0) + mID.asString());
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
|
||||
}
|
||||
if (mInDrawFrame != U32_MAX && (current - mInDrawFrame) >= 2)
|
||||
{
|
||||
@@ -231,7 +217,14 @@ LLFloaterAvatarList::~LLFloaterAvatarList()
|
||||
gIdleCallbacks.deleteFunction(LLFloaterAvatarList::callbackIdle);
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
//static
|
||||
void LLFloaterAvatarList::createInstance(bool visible)
|
||||
{
|
||||
sInstance = new LLFloaterAvatarList();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
|
||||
if(!visible)
|
||||
sInstance->setVisible(FALSE);
|
||||
}
|
||||
//static
|
||||
void LLFloaterAvatarList::toggle(void*)
|
||||
{
|
||||
@@ -279,8 +272,7 @@ void LLFloaterAvatarList::showInstance()
|
||||
}
|
||||
else
|
||||
{
|
||||
sInstance = new LLFloaterAvatarList();
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_radar.xml");
|
||||
createInstance(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,6 +391,9 @@ void LLFloaterAvatarList::updateAvatarList()
|
||||
|
||||
size_t i;
|
||||
size_t count = avatar_ids.size();
|
||||
|
||||
bool announce = gSavedSettings.getBOOL("RadarChatKeys");
|
||||
std::queue<LLUUID> announce_keys;
|
||||
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
@@ -469,6 +464,8 @@ void LLFloaterAvatarList::updateAvatarList()
|
||||
{
|
||||
// Avatar not there yet, add it
|
||||
LLAvatarListEntry entry(avid, name, position);
|
||||
if(announce && avatarp->getRegion() == gAgent.getRegion())
|
||||
announce_keys.push(avid);
|
||||
mAvatars[avid] = entry;
|
||||
}
|
||||
}
|
||||
@@ -508,10 +505,58 @@ void LLFloaterAvatarList::updateAvatarList()
|
||||
else
|
||||
{
|
||||
LLAvatarListEntry entry(avid, name, position);
|
||||
if(announce && gAgent.getRegion()->pointInRegionGlobal(position))
|
||||
announce_keys.push(avid);
|
||||
mAvatars[avid] = entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
//let us send the keys in a more timely fashion
|
||||
if(announce && !announce_keys.empty())
|
||||
{
|
||||
std::ostringstream ids;
|
||||
int transact_num = (int)gFrameCount;
|
||||
int num_ids = 0;
|
||||
while(!announce_keys.empty())
|
||||
{
|
||||
LLUUID id = announce_keys.front();
|
||||
announce_keys.pop();
|
||||
|
||||
ids << "," << id.asString();
|
||||
++num_ids;
|
||||
|
||||
if(ids.tellp() > 200)
|
||||
{
|
||||
gMessageSystem->newMessage("ScriptDialogReply");
|
||||
gMessageSystem->nextBlock("AgentData");
|
||||
gMessageSystem->addUUID("AgentID", gAgent.getID());
|
||||
gMessageSystem->addUUID("SessionID", gAgent.getSessionID());
|
||||
gMessageSystem->nextBlock("Data");
|
||||
gMessageSystem->addUUID("ObjectID", gAgent.getID());
|
||||
gMessageSystem->addS32("ChatChannel", -777777777);
|
||||
gMessageSystem->addS32("ButtonIndex", 1);
|
||||
gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str());
|
||||
gAgent.sendReliableMessage();
|
||||
|
||||
num_ids = 0;
|
||||
ids.seekp(0);
|
||||
ids.str("");
|
||||
}
|
||||
}
|
||||
if(num_ids > 0)
|
||||
{
|
||||
gMessageSystem->newMessage("ScriptDialogReply");
|
||||
gMessageSystem->nextBlock("AgentData");
|
||||
gMessageSystem->addUUID("AgentID", gAgent.getID());
|
||||
gMessageSystem->addUUID("SessionID", gAgent.getSessionID());
|
||||
gMessageSystem->nextBlock("Data");
|
||||
gMessageSystem->addUUID("ObjectID", gAgent.getID());
|
||||
gMessageSystem->addS32("ChatChannel", -777777777);
|
||||
gMessageSystem->addS32("ButtonIndex", 1);
|
||||
gMessageSystem->addString("ButtonLabel",llformat("%d,%d", transact_num, num_ids) + ids.str());
|
||||
gAgent.sendReliableMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// llinfos << "radar refresh: done" << llendl;
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
/*virtual*/ void onOpen();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void draw();
|
||||
|
||||
static void createInstance(bool visible);
|
||||
/**
|
||||
* @brief Toggles interface visibility
|
||||
* There is only one instance of the avatar scanner at any time.
|
||||
|
||||
@@ -100,6 +100,7 @@ LLFloaterAvatarPicker::LLFloaterAvatarPicker() :
|
||||
BOOL LLFloaterAvatarPicker::postBuild()
|
||||
{
|
||||
childSetKeystrokeCallback("Edit", editKeystroke, this);
|
||||
childSetKeystrokeCallback("EditUUID", editKeystroke, this);
|
||||
|
||||
childSetAction("Find", onBtnFind, this);
|
||||
childDisable("Find");
|
||||
@@ -138,7 +139,7 @@ BOOL LLFloaterAvatarPicker::postBuild()
|
||||
childSetTabChangeCallback("ResidentChooserTabs", "SearchPanel", onTabChanged, this);
|
||||
childSetTabChangeCallback("ResidentChooserTabs", "CallingCardsPanel", onTabChanged, this);
|
||||
childSetTabChangeCallback("ResidentChooserTabs", "NearMePanel", onTabChanged, this);
|
||||
|
||||
childSetTabChangeCallback("ResidentChooserTabs", "KeyPanel", onTabChanged, this);
|
||||
setAllowMultiple(FALSE);
|
||||
|
||||
return TRUE;
|
||||
@@ -209,6 +210,17 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata)
|
||||
getSelectedAvatarData(self->getChild<LLScrollListCtrl>("NearMe"), avatar_names, avatar_ids);
|
||||
self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
|
||||
}
|
||||
else if(active_panel == self->getChild<LLPanel>("KeyPanel"))
|
||||
{
|
||||
LLUUID specified = self->getChild<LLLineEditor>("EditUUID")->getValue().asUUID();
|
||||
if(specified.isNull())
|
||||
return;
|
||||
std::vector<std::string> avatar_names;
|
||||
std::vector<LLUUID> avatar_ids;
|
||||
avatar_ids.push_back(specified);
|
||||
avatar_names.push_back(specified.asString());
|
||||
self->mCallback(avatar_names, avatar_ids, self->mCallbackUserdata);
|
||||
}
|
||||
}
|
||||
self->getChild<LLInventoryPanel>("InventoryPanel")->setSelection(LLUUID::null, FALSE);
|
||||
self->getChild<LLScrollListCtrl>("SearchResults")->deselectAllItems(TRUE);
|
||||
@@ -481,7 +493,14 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void*
|
||||
void LLFloaterAvatarPicker::editKeystroke(LLLineEditor* caller, void* user_data)
|
||||
{
|
||||
LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)user_data;
|
||||
self->childSetEnabled("Find", caller->getText().size() >= 3);
|
||||
LLPanel* active_panel = self->childGetVisibleTab("ResidentChooserTabs");
|
||||
if(active_panel == self->getChild<LLPanel>("SearchPanel"))
|
||||
self->childSetEnabled("Find", caller->getText().size() >= 3);
|
||||
else if(active_panel == self->getChild<LLPanel>("KeyPanel"))
|
||||
{
|
||||
LLUUID specified = self->getChild<LLLineEditor>("EditUUID")->getValue().asUUID();
|
||||
self->childSetEnabled("Select", specified.notNull());
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
||||
@@ -23,10 +23,6 @@ LLFloaterExportRegion::LLFloaterExportRegion(const LLSD& unused)
|
||||
{
|
||||
sInstance = this;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_export.xml");
|
||||
|
||||
//populate the list of objects to export
|
||||
//int numOfObjects = gObjectList.getNumObjects();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +33,177 @@ LLFloaterExportRegion::~LLFloaterExportRegion()
|
||||
|
||||
BOOL LLFloaterExportRegion::postBuild(void)
|
||||
{
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("export_list");
|
||||
|
||||
|
||||
LLViewerRegion* objregion = NULL;
|
||||
LLViewerRegion* agentregion = gAgent.getRegion();
|
||||
|
||||
if(!agentregion) return TRUE;
|
||||
|
||||
for (LLDynamicArrayPtr<LLPointer<LLViewerObject> >::iterator iter = gObjectList.getObjectMap().begin();
|
||||
iter != gObjectList.getObjectMap().end(); iter++)
|
||||
{
|
||||
LLViewerObject* objectp = (*iter);
|
||||
if(!objectp || objectp->isDead()) continue;
|
||||
|
||||
objregion = objectp->getRegion();
|
||||
|
||||
//if(!objregion || objregion->getHandle() != agentregion->getHandle()) continue;
|
||||
|
||||
if(objectp->isAvatar() || objectp->isAttachment()) continue; //we dont want avatars right now...
|
||||
|
||||
if(objectp->isRoot())
|
||||
{
|
||||
std::string objectp_id = llformat("%d", objectp->getLocalID());
|
||||
|
||||
if(list->getItemIndex(objectp->getID()) == -1)
|
||||
{
|
||||
bool is_attachment = false;
|
||||
bool is_root = true;
|
||||
LLViewerObject* parentp = objectp->getSubParent();
|
||||
if(parentp)
|
||||
{
|
||||
if(!parentp->isAvatar())
|
||||
{
|
||||
// parent is a prim I guess
|
||||
is_root = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// parent is an avatar
|
||||
is_attachment = true;
|
||||
//if(!avatars[parentp]) avatars[parentp] = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_prim = true;
|
||||
if(objectp->getPCode() >= LL_PCODE_APP)
|
||||
{
|
||||
is_prim = false;
|
||||
}
|
||||
|
||||
//bool is_avatar = objectp->isAvatar();
|
||||
|
||||
|
||||
if(is_root && is_prim)
|
||||
{
|
||||
LLSD element;
|
||||
element["id"] = objectp->getID();
|
||||
|
||||
LLSD& check_column = element["columns"][LIST_CHECKED];
|
||||
check_column["column"] = "checked";
|
||||
check_column["type"] = "checkbox";
|
||||
check_column["value"] = true;
|
||||
|
||||
LLSD& type_column = element["columns"][LIST_TYPE];
|
||||
type_column["column"] = "type";
|
||||
type_column["type"] = "icon";
|
||||
type_column["value"] = "inv_item_object.tga";
|
||||
|
||||
LLSD& name_column = element["columns"][LIST_NAME];
|
||||
name_column["column"] = "name";
|
||||
/*if(is_attachment)
|
||||
name_column["value"] = nodep->mName + " (worn on " + utf8str_tolower(objectp->getAttachmentPointName()) + ")";
|
||||
else*/
|
||||
name_column["value"] = "Object";
|
||||
|
||||
LLSD& avatarid_column = element["columns"][LIST_AVATARID];
|
||||
avatarid_column["column"] = "avatarid";
|
||||
if(is_attachment)
|
||||
avatarid_column["value"] = parentp->getID();
|
||||
else
|
||||
avatarid_column["value"] = LLUUID::null;
|
||||
|
||||
LLExportable* exportable = new LLExportable(objectp, "Object", mPrimNameMap);
|
||||
mExportables[objectp->getID()] = exportable->asLLSD();
|
||||
|
||||
list->addElement(element, ADD_BOTTOM);
|
||||
|
||||
addToPrimList(objectp);
|
||||
}//Do we really want avatars in the region exporter?
|
||||
/*
|
||||
else if(is_avatar)
|
||||
{
|
||||
if(!avatars[objectp])
|
||||
{
|
||||
avatars[objectp] = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
U32 localid = objectp->getLocalID();
|
||||
std::string name = "Object";
|
||||
mPrimNameMap[localid] = name;
|
||||
//Let's get names...
|
||||
LLViewerObject::child_list_t child_list = objectp->getChildren();
|
||||
for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i)
|
||||
{
|
||||
LLViewerObject* childp = *i;
|
||||
|
||||
LLViewerObject::child_list_t select_list = childp->getChildren();
|
||||
LLViewerObject::child_list_t::iterator select_iter;
|
||||
int block_counter;
|
||||
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectSelect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, childp->getLocalID());
|
||||
block_counter = 0;
|
||||
for (select_iter = select_list.begin(); select_iter != select_list.end(); ++select_iter)
|
||||
{
|
||||
block_counter++;
|
||||
if(block_counter >= 254)
|
||||
{
|
||||
// start a new message
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectSelect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, (*select_iter)->getLocalID());
|
||||
}
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectDeselect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, childp->getLocalID());
|
||||
block_counter = 0;
|
||||
for (select_iter = select_list.begin(); select_iter != select_list.end(); ++select_iter)
|
||||
{
|
||||
block_counter++;
|
||||
if(block_counter >= 254)
|
||||
{
|
||||
// start a new message
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
gMessageSystem->newMessageFast(_PREHASH_ObjectDeselect);
|
||||
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
|
||||
gMessageSystem->addUUID(_PREHASH_SessionID, gAgent.getSessionID());
|
||||
}
|
||||
gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, (*select_iter)->getLocalID());
|
||||
}
|
||||
gMessageSystem->sendReliable(childp->getRegion()->getHost());
|
||||
}
|
||||
}
|
||||
//Do we really want avatars in the region exporter?
|
||||
/*std::map<LLViewerObject*, bool>::iterator avatar_iter = avatars.begin();
|
||||
std::map<LLViewerObject*, bool>::iterator avatars_end = avatars.end();
|
||||
for( ; avatar_iter != avatars_end; avatar_iter++)
|
||||
{
|
||||
LLViewerObject* avatar = (*avatar_iter).first;
|
||||
addAvatarStuff((LLVOAvatar*)avatar);
|
||||
}*/
|
||||
|
||||
updateNamesProgress();
|
||||
|
||||
childSetAction("select_all_btn", onClickSelectAll, this);
|
||||
|
||||
@@ -2598,7 +2598,7 @@ bool idle_startup()
|
||||
LLRect window(0, gViewerWindow->getWindowHeight(), gViewerWindow->getWindowWidth(), 0);
|
||||
gViewerWindow->adjustControlRectanglesForFirstUse(window);
|
||||
|
||||
if(gSavedSettings.getBOOL("ShowMiniMap"))
|
||||
if (gSavedSettings.getBOOL("ShowMiniMap"))
|
||||
{
|
||||
LLFloaterMap::showInstance();
|
||||
}
|
||||
@@ -2606,6 +2606,12 @@ bool idle_startup()
|
||||
{
|
||||
LLFloaterAvatarList::showInstance();
|
||||
}
|
||||
// <edit>
|
||||
else if (gSavedSettings.getBOOL("RadarKeepOpen"))
|
||||
{
|
||||
LLFloaterAvatarList::createInstance(false);
|
||||
}
|
||||
// </edit>
|
||||
if (gSavedSettings.getBOOL("ShowCameraControls"))
|
||||
{
|
||||
LLFloaterCamera::showInstance();
|
||||
|
||||
@@ -117,6 +117,8 @@ public:
|
||||
|
||||
inline S32 getNumObjects() { return mObjects.count(); }
|
||||
|
||||
LLDynamicArrayPtr<LLPointer<LLViewerObject> > getObjectMap(){ return mMapObjects; }
|
||||
|
||||
void addToMap(LLViewerObject *objectp);
|
||||
void removeFromMap(LLViewerObject *objectp);
|
||||
|
||||
|
||||
@@ -532,16 +532,61 @@ const std::string LLViewerRegion::getSimAccessString() const
|
||||
std::string LLViewerRegion::regionFlagsToString(U32 flags)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
if (flags & REGION_FLAGS_SANDBOX)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Sandbox";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_ALLOW_DAMAGE)
|
||||
{
|
||||
result += " Not Safe";
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Not Safe";
|
||||
}
|
||||
// <edit>
|
||||
//These dont seem to have value anymore.
|
||||
/*if (!(flags & REGION_FLAGS_PUBLIC_ALLOWED))
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Private";
|
||||
}
|
||||
|
||||
if (!(flags & REGION_FLAGS_ALLOW_VOICE))
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Voice Disabled";
|
||||
}*/
|
||||
if (flags & REGION_FLAGS_ALLOW_LANDMARK)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Create Landmarks";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_ALLOW_DIRECT_TELEPORT)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Direct Teleport";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_DENY_ANONYMOUS)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Payment Info needed";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_DENY_AGEUNVERIFIED)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "Age Verified";
|
||||
}
|
||||
|
||||
if (flags & REGION_FLAGS_BLOCK_FLY)
|
||||
{
|
||||
if(!result.empty()) result += ", ";
|
||||
result += "No Fly";
|
||||
}
|
||||
|
||||
// </edit>
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4847,7 +4847,10 @@ LLVoiceClient::participantState::participantState(const std::string &uri) :
|
||||
void LLVoiceClient::sessionState::onAvatarNameLookup(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* user_data)
|
||||
{
|
||||
LLChat chat;
|
||||
chat.mText = "Possible eavesdropping by "+ first +" "+ last +" detected";
|
||||
std::string name(first + " " + last);
|
||||
chat.mFromName = name;
|
||||
chat.mURL = llformat("secondlife:///app/agent/%s/about",id.asString().c_str());
|
||||
chat.mText = name+" is possibly eavesdropping in voice.";
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
|
||||
@@ -113,9 +113,13 @@ public:
|
||||
const std::string getName() const { return mName; }
|
||||
const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); }
|
||||
const std::string getAccessString() const { return LLViewerRegion::accessToString((U8)mAccess); }
|
||||
const std::string getShortAccessString() const { return LLViewerRegion::accessToShortString((U8)mAccess); }
|
||||
|
||||
const S32 getAgentCount() const; // Compute the total agents count
|
||||
LLPointer<LLViewerImage> getLandForSaleImage(); // Get the overlay image, fetch it if necessary
|
||||
// <edit>
|
||||
//Added this so I could get map images on opensim.
|
||||
const LLUUID getMapImageID() const { return mMapImageID; }
|
||||
|
||||
bool isName(const std::string& name) const;
|
||||
bool isDown() { return (mAccess == SIM_ACCESS_DOWN); }
|
||||
@@ -159,7 +163,8 @@ private:
|
||||
// F32 mWaterHeight; // Water height on the region (not actively used)
|
||||
|
||||
// Handling the "land for sale / land for auction" overlay image
|
||||
LLUUID mMapImageID; // Image ID of the overlay image
|
||||
|
||||
LLUUID mMapImageID; // Image ID of the overlay image
|
||||
LLPointer<LLViewerImage> mOverlayImage; // Reference to the overlay image
|
||||
|
||||
// Items for this region
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
#include "llworldmap.h"
|
||||
#include "llagent.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
// <edit>
|
||||
#include "llviewernetwork.h" //for isInProductionGrid()
|
||||
// </edit>
|
||||
|
||||
const U32 LAYER_FLAG = 2;
|
||||
|
||||
@@ -159,7 +162,9 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
|
||||
msg->getU32Fast(_PREHASH_AgentData, _PREHASH_Flags, agent_flags);
|
||||
|
||||
// There's only one flag that we ever use here
|
||||
if (agent_flags != LAYER_FLAG)
|
||||
if (agent_flags != LAYER_FLAG
|
||||
//<edit>
|
||||
&& LLViewerLogin::getInstance()->getGridChoice() < GRID_INFO_OTHER)
|
||||
{
|
||||
llwarns << "Invalid map image type returned! layer = " << agent_flags << llendl;
|
||||
return;
|
||||
|
||||
@@ -460,9 +460,38 @@ void LLWorldMapView::draw()
|
||||
{
|
||||
mesg = llformat( "%s (%s)", info->getName().c_str(), sStringsMap["offline"].c_str());
|
||||
}
|
||||
// <edit>
|
||||
else if (gSavedSettings.getBOOL("MapShowAgentCount") && gSavedSettings.getBOOL("MapShowPeople"))
|
||||
{
|
||||
// Display the agent count after the region name
|
||||
S32 agent_count = info->getAgentCount();
|
||||
LLViewerRegion *region = gAgent.getRegion();
|
||||
|
||||
if (region && region->getHandle() == handle)
|
||||
{
|
||||
++agent_count; // Bump by 1 if we're in this region
|
||||
}
|
||||
|
||||
if (agent_count > 0)
|
||||
{
|
||||
std::string count = llformat("%d %s", agent_count, agent_count > 1 ? "avatars" : "avatar");
|
||||
font->renderUTF8(
|
||||
count, 0,
|
||||
llfloor(left + 3),
|
||||
llfloor(bottom + 20),
|
||||
LLColor4::white,
|
||||
LLFontGL::LEFT,
|
||||
LLFontGL::BASELINE,
|
||||
LLFontGL::DROP_SHADOW);
|
||||
|
||||
}
|
||||
mesg = info->getName() + " (" + info->getShortAccessString() +")";
|
||||
}
|
||||
// </edit>
|
||||
else
|
||||
{
|
||||
mesg = info->getName();
|
||||
// <edit>
|
||||
mesg = info->getName() + " (" + info->getShortAccessString() +")";
|
||||
}
|
||||
if (!mesg.empty())
|
||||
{
|
||||
@@ -1053,11 +1082,13 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
|
||||
|
||||
if (agent_count == 1)
|
||||
{
|
||||
message += "person";
|
||||
// <edit>
|
||||
message += "agents";
|
||||
}
|
||||
else
|
||||
{
|
||||
message += "people";
|
||||
// <edit>
|
||||
message += "agents";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,11 +1097,14 @@ BOOL LLWorldMapView::handleToolTip( S32 x, S32 y, std::string& msg, LLRect* stic
|
||||
// Optionally show region flags
|
||||
std::string region_flags = info->getFlagsString();
|
||||
|
||||
// <edit>
|
||||
// always seems to be zero anyways...
|
||||
if (!region_flags.empty())
|
||||
{
|
||||
msg += '\n';
|
||||
msg += region_flags;
|
||||
msg += "Region Flags: " + region_flags;
|
||||
}
|
||||
// </edit>
|
||||
|
||||
S32 SLOP = 4;
|
||||
localPointToScreen(
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
|
||||
#include "llviewerimagelist.h"
|
||||
#include "math.h" // log()
|
||||
// <edit>
|
||||
#include "llworldmap.h"
|
||||
#include "llviewernetwork.h" //for isProductionGrid();
|
||||
// </edit>
|
||||
|
||||
// Turn this on to output tile stats in the standard output
|
||||
#define DEBUG_TILES_STAT 0
|
||||
@@ -152,7 +156,23 @@ LLPointer<LLViewerImage> LLWorldMipmap::getObjectsTile(U32 grid_x, U32 grid_y, S
|
||||
if (load)
|
||||
{
|
||||
// Load it
|
||||
LLPointer<LLViewerImage> img = loadObjectsTile(grid_x, grid_y, level);
|
||||
LLPointer<LLViewerImage> img;
|
||||
// <edit>
|
||||
//this is a hack for opensims.
|
||||
if(LLViewerLogin::getInstance()->getGridChoice() < GRID_INFO_OTHER)
|
||||
img = loadObjectsTile(grid_x, grid_y, level);
|
||||
else
|
||||
{
|
||||
LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromHandle(handle);
|
||||
if(info)
|
||||
{
|
||||
img = gImageList.getImage(info->getMapImageID(), MIPMAP_TRUE, FALSE);
|
||||
img->setBoostLevel(LLViewerImageBoostLevel::BOOST_MAP);
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
// </edit>
|
||||
// Insert the image in the map
|
||||
level_mipmap.insert(sublevel_tiles_t::value_type( handle, img ));
|
||||
// Find the element again in the map (it's there now...)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater bottom="-380" can_close="true" can_drag_on_left="false" can_minimize="true"
|
||||
can_resize="true" height="350" left="400" min_height="200" min_width="265"
|
||||
mouse_opaque="true" name="avatarpicker" title="Choose Resident" width="265">
|
||||
can_resize="true" height="350" left="400" min_height="200" min_width="375"
|
||||
mouse_opaque="true" name="avatarpicker" title="Choose Resident" width="375">
|
||||
|
||||
<tab_container bottom="30" follows="left|right|top|bottom" height="300" left="4"
|
||||
name="ResidentChooserTabs" tab_position="top" tab_width="65" width="255">
|
||||
name="ResidentChooserTabs" tab_position="top" tab_width="65" width="365">
|
||||
<panel name="SearchPanel" label="Search"
|
||||
border="true" bottom="0" height="150" left="6" width="135"
|
||||
mouse_opaque="true">
|
||||
@@ -71,7 +71,21 @@
|
||||
draw_stripes="true" column_padding="5" sort_column="0" mouse_opaque="true"
|
||||
background_visible="true" multi_select="false" name="NearMe" />
|
||||
</panel>
|
||||
|
||||
<panel name="KeyPanel" label="By UUID"
|
||||
border="true" bottom="0" height="240" left="6" width="135" mouse_opaque="true">
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-24" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10"
|
||||
mouse_opaque="true" name="InstructSelectResident" v_pad="0"
|
||||
width="220">
|
||||
Avatar or Group UUID:
|
||||
</text>
|
||||
<line_editor bevel_style="in" border_style="line"
|
||||
border_thickness="1" bottom_delta="-20" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" height="16" left="10"
|
||||
max_length="36" mouse_opaque="true" name="EditUUID"
|
||||
width="230" />
|
||||
</panel>
|
||||
</tab_container>
|
||||
|
||||
<button bottom="6" left="10" follows="left|bottom" font="SansSerif" halign="center"
|
||||
|
||||
Reference in New Issue
Block a user