Updated client tagging system. Client tags only looked up in opensim, and most logic pulled out into its own singleton.
This commit is contained in:
@@ -1076,9 +1076,8 @@ S32 LLPrimitive::unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 dat
|
||||
// Pack information about all texture entries into container:
|
||||
// { TextureEntry Variable 2 }
|
||||
// Includes information about image ID, color, scale S,T, offset S,T and rotation
|
||||
BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::string client_str) const
|
||||
BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys) const
|
||||
{
|
||||
LLUUID client_tag = LLUUID(client_str);
|
||||
const U32 MAX_TES = 32;
|
||||
|
||||
U8 image_ids[MAX_TES*16];
|
||||
@@ -1097,8 +1096,6 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
||||
U8 *cur_ptr = packed_buffer;
|
||||
|
||||
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
|
||||
|
||||
if (client_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97") shield = 0;
|
||||
|
||||
if (last_face_index > -1)
|
||||
{
|
||||
@@ -1108,18 +1105,7 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
||||
for (face_index = 0; face_index <= last_face_index; face_index++)
|
||||
{
|
||||
// Directly sending image_ids is not safe!
|
||||
if(shield && !(face_index == 20 || face_index == 8 || face_index == 9 || face_index == 10 || face_index == 11 || face_index == 18 || face_index == 19))
|
||||
{
|
||||
S8 f_f_i = face_index;
|
||||
if(face_index == 0)f_f_i = 64;
|
||||
if(face_index == 5)f_f_i = 9;
|
||||
if(face_index == 6)f_f_i = 10;
|
||||
if(face_index == 3)f_f_i = 11;
|
||||
if(f_f_i == face_index)memcpy(&image_ids[face_index*16],LLUUID("c228d1cf-4b5d-4ba8-84f4-899a0796aa97").mData,16);
|
||||
else if(f_f_i == 64)memcpy(&image_ids[face_index*16],client_tag.mData,16);
|
||||
else memcpy(&image_ids[face_index*16],LLUUID("4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6").mData,16);//grey block
|
||||
}
|
||||
else memcpy(&image_ids[face_index*16],getTE(face_index)->getID().mData,16); /* Flawfinder: ignore */
|
||||
memcpy(&image_ids[face_index*16],getTE(face_index)->getID().mData,16); /* Flawfinder: ignore */
|
||||
|
||||
// Cast LLColor4 to LLColor4U
|
||||
coloru.setVec( getTE(face_index)->getColor() );
|
||||
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
|
||||
// Modify texture entry properties
|
||||
inline BOOL validTE(const U8 te_num) const;
|
||||
LLTextureEntry *getTE(const U8 te_num) const;
|
||||
LLTextureEntry* getTE(const U8 te_num) const;
|
||||
|
||||
virtual void setNumTEs(const U8 num_tes);
|
||||
virtual void setAllTETextures(const LLUUID &tex_id);
|
||||
@@ -364,7 +364,7 @@ public:
|
||||
void copyTEs(const LLPrimitive *primitive);
|
||||
S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
|
||||
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
|
||||
BOOL packTEMessage(LLMessageSystem *mesgsys, int shield = 0, std::string client_str = "") const;
|
||||
BOOL packTEMessage(LLMessageSystem *mesgsys) const;
|
||||
BOOL packTEMessage(LLDataPacker &dp) const;
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name);
|
||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
<key>AscentShowFriendsTag</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show friends client tags as (Friend), and colorize them specially.</string>
|
||||
<string>Show friends' client tags as (Friend).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
||||
@@ -131,25 +131,16 @@ void LLPrefsAscentVan::onCommitTextModified(LLUICtrl* ctrl, void* userdata)
|
||||
//static
|
||||
void LLPrefsAscentVan::onManualClientUpdate(void* data)
|
||||
{
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = llformat("Definitions already up-to-date.");
|
||||
if (LLVOAvatar::updateClientTags())
|
||||
{
|
||||
chat.mText = llformat("Client definitions updated.");
|
||||
LLVOAvatar::loadClientTags();
|
||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
|
||||
if(avatarp)
|
||||
{
|
||||
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
|
||||
avatarp->mClientTag = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
LLFloaterChat::addChat(chat);
|
||||
LLChat chat("Definitions already up-to-date.");
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
if(SHClientTagMgr::instance().fetchDefinitions())
|
||||
{
|
||||
if(SHClientTagMgr::instance().parseDefinitions())
|
||||
chat.mText="Client definitons updated.";
|
||||
else
|
||||
chat.mText="Failed to parse updated definitions.";
|
||||
}
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
|
||||
//static
|
||||
@@ -159,32 +150,8 @@ void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
|
||||
// llinfos << "Control named " << ctrl->getControlName() << llendl;
|
||||
|
||||
if (ctrl->getName() == "show_friend_tag_check")
|
||||
if (ctrl->getName() == "use_status_check")
|
||||
{
|
||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
|
||||
if(avatarp)
|
||||
{
|
||||
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
|
||||
avatarp->mClientTag = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ctrl->getName() == "use_status_check")
|
||||
{
|
||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
||||
iter != LLCharacter::sInstances.end(); ++iter)
|
||||
{
|
||||
LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
|
||||
if(avatarp)
|
||||
{
|
||||
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
|
||||
avatarp->mClientTag = "";
|
||||
}
|
||||
}
|
||||
|
||||
BOOL showCustomColors = gSavedSettings.getBOOL("AscentUseStatusColors");
|
||||
self->childSetEnabled("friends_color_textbox", showCustomColors);
|
||||
self->childSetEnabled("friend_color_swatch", showCustomColors);
|
||||
@@ -200,12 +167,6 @@ void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
self->childSetEnabled("custom_tag_color_text", showCustomOptions);
|
||||
self->childSetEnabled("custom_tag_color_swatch", showCustomOptions);
|
||||
}
|
||||
|
||||
if (!gAgent.getID().isNull())
|
||||
{
|
||||
gAgent.sendAgentSetAppearance();
|
||||
gAgent.resetClientTag();
|
||||
}
|
||||
}
|
||||
|
||||
// Store current settings for cancel
|
||||
|
||||
@@ -535,14 +535,6 @@ BOOL LLAgent::getPhantom()
|
||||
return exlPhantom;
|
||||
}
|
||||
|
||||
void LLAgent::resetClientTag()
|
||||
{
|
||||
if (gAgentAvatarp)
|
||||
{
|
||||
llinfos << "Resetting mClientTag." << llendl;
|
||||
gAgentAvatarp->mClientTag = "";
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3971,45 +3963,7 @@ void LLAgent::sendAgentSetAppearance()
|
||||
}
|
||||
}
|
||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||
|
||||
/*if (gSavedSettings.getBOOL("AscentUseCustomTag"))
|
||||
{
|
||||
LLColor4 color;
|
||||
if (!gSavedSettings.getBOOL("AscentStoreSettingsPerAccount"))
|
||||
{
|
||||
color = gSavedSettings.setColor4("AscentCustomTagColor");
|
||||
}
|
||||
else
|
||||
{
|
||||
color = gSavedPerAccountSettings.getColor4("AscentCustomTagColor");
|
||||
}
|
||||
LLUUID old_teid;
|
||||
U8 client_buffer[UUID_BYTES];
|
||||
memset(&client_buffer, 0, UUID_BYTES);
|
||||
LLTextureEntry* entry = (LLTextureEntry*)gAgentAvatarp->getTE(0);
|
||||
old_teid = entry->getID();
|
||||
//You edit this to change the tag in your client. Yes.
|
||||
const char* tag_client = "Ascent";
|
||||
strncpy((char*)&client_buffer[0], tag_client, UUID_BYTES);
|
||||
LLUUID part_a;
|
||||
memcpy(&part_a.mData, &client_buffer[0], UUID_BYTES);
|
||||
entry->setColor(color);
|
||||
//This glow is used to tell if the tag color and name is set or not.
|
||||
entry->setGlow(0.1f);
|
||||
entry->setID(part_a);
|
||||
gAgentAvatarp->packTEMessage( gMessageSystem, 1, gSavedSettings.getString("AscentReportClientUUID") );
|
||||
entry->setID(old_teid);
|
||||
|
||||
}
|
||||
else
|
||||
{*/
|
||||
if (gSavedSettings.getBOOL("AscentUseTag"))
|
||||
gAgentAvatarp->packTEMessage( gMessageSystem, 1, gSavedSettings.getString("AscentReportClientUUID"));
|
||||
else
|
||||
gAgentAvatarp->packTEMessage( gMessageSystem, 1, "c228d1cf-4b5d-4ba8-84f4-899a0796aa97");
|
||||
//}
|
||||
resetClientTag();
|
||||
|
||||
gAgentAvatarp->sendAppearanceMessage( gMessageSystem );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -169,12 +169,6 @@ public:
|
||||
void setGenderChosen(BOOL b) { mGenderChosen = b; }
|
||||
private:
|
||||
BOOL mGenderChosen;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Client Tagging
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void resetClientTag();
|
||||
|
||||
/** Identity
|
||||
** **
|
||||
|
||||
@@ -350,12 +350,12 @@ BOOL LLFloaterAvatarList::postBuild()
|
||||
|
||||
if(gHippoGridManager->getConnectedGrid()->isSecondLife()){
|
||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("avatar_list");
|
||||
list->getColumn(1)->setWidth(0);
|
||||
list->getColumn(6)->setWidth(0);
|
||||
list->getColumn(6)->mDynamicWidth = FALSE;
|
||||
list->getColumn(6)->mRelWidth = 0;
|
||||
list->getColumn(1)->mDynamicWidth = TRUE;
|
||||
list->getColumn(1)->mRelWidth = -1;
|
||||
list->getColumn(LIST_AVATAR_NAME)->setWidth(0);
|
||||
list->getColumn(LIST_CLIENT)->setWidth(0);
|
||||
list->getColumn(LIST_CLIENT)->mDynamicWidth = FALSE;
|
||||
list->getColumn(LIST_CLIENT)->mRelWidth = 0;
|
||||
list->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE;
|
||||
list->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1;
|
||||
list->updateLayout();
|
||||
}
|
||||
|
||||
@@ -894,11 +894,11 @@ void LLFloaterAvatarList::refreshAvatarList()
|
||||
|
||||
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
|
||||
LLColor4 client_color(avatar_name_color);
|
||||
std::string client;
|
||||
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
|
||||
if(avatarp)
|
||||
{
|
||||
avatarp->getClientInfo(client, client_color, TRUE);
|
||||
std::string client = SHClientTagMgr::instance().getClientName(avatarp, false);
|
||||
SHClientTagMgr::instance().getClientColor(avatarp, false, client_color);
|
||||
if(client == "")
|
||||
{
|
||||
client_color = unselected_color;
|
||||
|
||||
@@ -586,25 +586,6 @@ bool handleCloudSettingsChanged(const LLSD& newvalue)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool handleAscentSelfTag(const LLSD& newvalue)
|
||||
{
|
||||
if(gAgentAvatarp)
|
||||
gAgentAvatarp->mClientTag = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool handleAscentGlobalTag(const LLSD& newvalue)
|
||||
{
|
||||
S32 object_count = gObjectList.getNumObjects();
|
||||
for (S32 i = 0; i < object_count; i++)
|
||||
{
|
||||
LLViewerObject *objectp = gObjectList.getObject(i);
|
||||
if (objectp && objectp->isAvatar())
|
||||
((LLVOAvatar*)objectp)->mClientTag = "";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool handleAscentAvatarModifier(const LLSD& newvalue)
|
||||
{
|
||||
llinfos << "Calling gAgent.sendAgentSetAppearance() because AscentAvatar*Modifier changed." << llendl;
|
||||
@@ -791,13 +772,6 @@ void settings_setup_listeners()
|
||||
gSavedSettings.getControl("EmeraldBreastPhysicsToggle")->getSignal()->connect(boost::bind(&handleAvatarBoobToggleChanged, _2));
|
||||
gSavedSettings.getControl("EmeraldBoobXYInfluence")->getSignal()->connect(boost::bind(&handleAvatarBoobXYInfluence, _2));
|
||||
|
||||
gSavedSettings.getControl("AscentUseTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_2));
|
||||
gSavedSettings.getControl("AscentUseCustomTag")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_2));
|
||||
gSavedSettings.getControl("AscentCustomTagColor")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_2));
|
||||
gSavedSettings.getControl("AscentCustomTagLabel")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_2));
|
||||
gSavedSettings.getControl("AscentReportClientUUID")->getSignal()->connect(boost::bind(&handleAscentSelfTag,_2));
|
||||
gSavedSettings.getControl("AscentShowFriendsTag")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_2));
|
||||
gSavedSettings.getControl("AscentUseStatusColors")->getSignal()->connect(boost::bind(&handleAscentGlobalTag,_2));
|
||||
gSavedSettings.getControl("AscentAvatarXModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||
gSavedSettings.getControl("AscentAvatarYModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||
gSavedSettings.getControl("AscentAvatarZModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||
|
||||
@@ -3192,11 +3192,8 @@ class LLAvatarClientUUID : public view_listener_t
|
||||
{
|
||||
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||
if(!avatar) return true;
|
||||
|
||||
std::string clientID;
|
||||
LLColor4 color;
|
||||
avatar->getClientInfo(clientID, color, false);
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID));
|
||||
const LLUUID clientID = SHClientTagMgr::instance().getClientID(avatar);
|
||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID.asString()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3343,8 +3343,6 @@ class AuthHandler : public HippoRestHandlerRaw
|
||||
}
|
||||
};
|
||||
|
||||
std::map<LLUUID, int> gChatObjectAuth;
|
||||
|
||||
void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
LLChat chat;
|
||||
@@ -3512,47 +3510,69 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||
{
|
||||
msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
|
||||
|
||||
static std::map<LLUUID, bool> sChatObjectAuth;
|
||||
|
||||
if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) &&
|
||||
(mesg.substr(0, 3) == "># ")) {
|
||||
if (mesg.substr(mesg.size()-3, 3) == " #<") {
|
||||
(mesg.substr(0, 3) == "># "))
|
||||
{
|
||||
if (mesg.substr(mesg.size()-3, 3) == " #<"){
|
||||
// hello from object
|
||||
if (from_id.isNull()) return;
|
||||
char buf[200];
|
||||
snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch);
|
||||
send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570);
|
||||
gChatObjectAuth[from_id] = 1;
|
||||
} else if (gChatObjectAuth.find(from_id) != gChatObjectAuth.end()) {
|
||||
sChatObjectAuth[from_id] = 1;
|
||||
return;
|
||||
}
|
||||
else if (sChatObjectAuth.find(from_id) != sChatObjectAuth.end())
|
||||
{
|
||||
LLUUID key;
|
||||
if (LLUUID::parseUUID(mesg.substr(3, 36), &key)) {
|
||||
if (key.set(mesg.substr(3, 36),false))
|
||||
{
|
||||
// object command found
|
||||
if (key.isNull() && (mesg.size() == 39)) {
|
||||
if (key.isNull() && (mesg.size() == 39))
|
||||
{
|
||||
// clear all nameplates
|
||||
for (int i=0; i<gObjectList.getNumObjects(); i++) {
|
||||
for (int i=0; i<gObjectList.getNumObjects(); i++)
|
||||
{
|
||||
LLViewerObject *obj = gObjectList.getObject(i);
|
||||
if (LLVOAvatar *avatar = dynamic_cast<LLVOAvatar*>(obj))
|
||||
{
|
||||
avatar->clearNameFromChat();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (key.isNull()) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key.isNull())
|
||||
{
|
||||
llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl;
|
||||
return;
|
||||
}
|
||||
LLVOAvatar *avatar = gObjectList.findAvatar(key);
|
||||
if (!avatar) {
|
||||
if (!avatar)
|
||||
{
|
||||
llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl;
|
||||
return;
|
||||
}
|
||||
if (mesg.size() == 39) {
|
||||
if (mesg.size() == 39)
|
||||
{
|
||||
avatar->clearNameFromChat();
|
||||
} else if (mesg[39] == ' ') {
|
||||
}
|
||||
else if (mesg[39] == ' ')
|
||||
{
|
||||
avatar->setNameFromChat(mesg.substr(40));
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else if (mesg.substr(2, 9) == " floater ") {
|
||||
}
|
||||
else if (mesg.substr(2, 9) == " floater ")
|
||||
{
|
||||
HippoFloaterXml::execute(mesg.substr(11));
|
||||
return;
|
||||
} else if (mesg.substr(2, 6) == " auth ") {
|
||||
}
|
||||
else if (mesg.substr(2, 6) == " auth ")
|
||||
{
|
||||
std::string authUrl = mesg.substr(8);
|
||||
authUrl += (authUrl.find('?') != std::string::npos)? "&auth=": "?auth=";
|
||||
authUrl += gAuthString;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -78,6 +78,45 @@ class LLTexGlobalColor;
|
||||
class LLVOAvatarBoneInfo;
|
||||
class LLVOAvatarSkeletonInfo;
|
||||
|
||||
class SHClientTagMgr : public LLSingleton<SHClientTagMgr>, public boost::signals2::trackable
|
||||
{
|
||||
public:
|
||||
SHClientTagMgr();
|
||||
//Fetch updated client_tags_sg1.xml from server
|
||||
bool fetchDefinitions() const;
|
||||
//Parse definitions from client_tags_sg1.xml
|
||||
bool parseDefinitions();
|
||||
private:
|
||||
//Just refreshes the tag for the agent avatar.
|
||||
//Used for boost::bind to verify agent avatar is valid before calling updateAvatarTag
|
||||
void updateAgentAvatarTag();
|
||||
//Actually generate the tag information for the avatar
|
||||
const LLSD generateClientTag(const LLVOAvatar* pAvatar) const;
|
||||
public:
|
||||
//Generates tag for particular avatar and sets dirty if the tag has changed. Call on received TE updates.
|
||||
void updateAvatarTag(LLVOAvatar* pAvatar);
|
||||
//Removes entry in mAvatarTags map. Call on destruction of avatar.
|
||||
void clearAvatarTag(const LLVOAvatar* pAvatar);
|
||||
|
||||
// Accessors
|
||||
|
||||
//Returns true if tag system is enabled.
|
||||
bool getIsEnabled() const;
|
||||
//If a tag entry exists, returns the clientname if found. If is_friend is set, will return "Friend" if AscentShowFriendsTag is true.
|
||||
const std::string getClientName(const LLVOAvatar* pAvatar, bool is_friend) const;
|
||||
//Returns ID of tag entry if it exists, else returns a null LLUUID.
|
||||
const LLUUID getClientID(const LLVOAvatar* pAvatar) const;
|
||||
//Sets color to either 'status' color, or falls back to client color if status isn't relevant.
|
||||
//If neither status or client color are found, returns false.
|
||||
bool getClientColor(const LLVOAvatar* pAvatar, bool check_status, LLColor4& color) const;
|
||||
|
||||
private:
|
||||
//UUID map associating texture uuids to client info entries parsed from client_tags_sg1.xml
|
||||
std::map<LLUUID, LLSD> mClientDefinitions;
|
||||
//UUID map associating avatar uuids to their CURRENT client tag info.
|
||||
std::map<LLUUID, LLSD> mAvatarTags;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// LLVOAvatar
|
||||
//
|
||||
@@ -239,16 +278,20 @@ public:
|
||||
void idleUpdateLoadingEffect();
|
||||
void idleUpdateWindEffect();
|
||||
void idleUpdateNameTag(const LLVector3& root_pos_last);
|
||||
void idleUpdateNameTagText(BOOL new_name);
|
||||
LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last);
|
||||
void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha);
|
||||
LLColor4 getNameTagColor(bool is_friend);
|
||||
void clearNameTag();
|
||||
static void invalidateNameTag(const LLUUID& agent_id);
|
||||
// force all name tags to rebuild, useful when display names turned on/off
|
||||
static void invalidateNameTags();
|
||||
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
|
||||
void idleUpdateRenderCost();
|
||||
void idleUpdateBelowWater();
|
||||
void idleUpdateBoobEffect(); //Emerald
|
||||
|
||||
LLFrameTimer mIdleTimer;
|
||||
std::string getIdleTime();
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Static preferences (controlled by user settings/menus)
|
||||
@@ -387,8 +430,6 @@ private:
|
||||
**/
|
||||
|
||||
public:
|
||||
// Graphical stuff for objects - maybe broken out into render class later?
|
||||
U32 renderFootShadows();
|
||||
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
|
||||
bool isVisuallyMuted() const;
|
||||
|
||||
@@ -814,12 +855,10 @@ public:
|
||||
// Chat
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setNameFromChat(const std::string &text);
|
||||
void clearNameFromChat();
|
||||
void addChat(const LLChat& chat);
|
||||
void clearChat();
|
||||
void startTyping() { mTyping = TRUE; mTypingTimer.reset(); mIdleTimer.reset();}
|
||||
void stopTyping() { mTyping = FALSE; }
|
||||
void stopTyping() { mTyping = FALSE; mIdleTimer.reset();}
|
||||
private:
|
||||
BOOL mVisibleChat;
|
||||
|
||||
@@ -945,19 +984,16 @@ protected:
|
||||
static void getAnimLabels(LLDynamicArray<std::string>* labels);
|
||||
static void getAnimNames(LLDynamicArray<std::string>* names);
|
||||
private:
|
||||
std::string mNameString;
|
||||
std::string mSubNameString;
|
||||
std::string mNameString; // UTF-8 title + name + status
|
||||
std::string mTitle;
|
||||
bool mNameAway;
|
||||
bool mNameBusy;
|
||||
bool mNameMute;
|
||||
bool mNameAppearance;
|
||||
bool mRenderTag;
|
||||
bool mRenderGroupTitles;
|
||||
std::string mRenderedName;
|
||||
std::string mClientName;
|
||||
std::string mIdleString;
|
||||
S32 mUsedNameSystem;
|
||||
bool mNameFriend;
|
||||
bool mNameCloud;
|
||||
F32 mNameAlpha;
|
||||
BOOL mRenderGroupTitles;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Display the name (then optionally fade it out)
|
||||
@@ -971,28 +1007,7 @@ private:
|
||||
BOOL mTyping;
|
||||
public:
|
||||
BOOL isTyping(){ return mTyping; }
|
||||
private:
|
||||
LLFrameTimer mTypingTimer;
|
||||
static void on_avatar_name_response(const LLUUID& agent_id, const LLAvatarName& av_name, void *userdata);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Client tagging
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// <edit>
|
||||
void getClientInfo(std::string& clientTag, LLColor4& tagColor, BOOL useComment=FALSE);
|
||||
std::string extraMetadata;
|
||||
// </edit>
|
||||
|
||||
static bool updateClientTags();
|
||||
static bool loadClientTags();
|
||||
std::string mClientTag; //Zwagoth's new client identification system. -HgB
|
||||
LLColor4 mClientColor; //Zwagoth's new client identification system. -HgB
|
||||
|
||||
bool mNameFromChatOverride;
|
||||
bool mNameFromChatChanged;
|
||||
std::string mNameFromChatText;
|
||||
std::string mNameFromAttachment;
|
||||
|
||||
/** Name
|
||||
** **
|
||||
@@ -1188,18 +1203,28 @@ protected: // Shared with LLVOAvatarSelf
|
||||
*******************************************************************************/
|
||||
// <edit>
|
||||
|
||||
//Avatar idle timer
|
||||
private:
|
||||
std::string getIdleTime(bool is_away, bool is_busy, bool is_appearance);
|
||||
public:
|
||||
//bool mNametagSaysIdle;
|
||||
//bool mIdleForever;
|
||||
//LLFrameTimer mIdleTimer;
|
||||
//U32 mIdleMinutes;
|
||||
LLUUID mFocusObject;
|
||||
LLVector3d mFocusVector;
|
||||
//void resetIdleTime();
|
||||
LLFrameTimer mIdleTimer;
|
||||
private:
|
||||
S32 mIdleMinute;
|
||||
|
||||
//CCS Nametag
|
||||
public:
|
||||
void setNameFromChat(const std::string &text);
|
||||
void clearNameFromChat();
|
||||
private:
|
||||
void idleCCSUpdateAttachmentText(bool render_name);
|
||||
LLFrameTimer mCCSUpdateAttachmentTimer;
|
||||
std::string mCCSAttachmentText;
|
||||
bool mCCSChatTextOverride;
|
||||
std::string mCCSChatText;
|
||||
|
||||
static LLSD sClientResolutionList;
|
||||
// </edit>
|
||||
}; // LLVOAvatar
|
||||
|
||||
extern const F32 SELF_ADDITIONAL_PRI;
|
||||
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
|
||||
|
||||
|
||||
@@ -143,6 +143,8 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
|
||||
|
||||
mMotionController.mIsSelf = TRUE;
|
||||
|
||||
SHClientTagMgr::instance().updateAvatarTag(this); //No TE update messages for self. Force update here.
|
||||
|
||||
lldebugs << "Marking avatar as self " << id << llendl;
|
||||
}
|
||||
|
||||
@@ -2530,7 +2532,10 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
|
||||
{
|
||||
LLTextureEntry* entry = getTE((U8) index);
|
||||
texture_id[index] = entry->getID();
|
||||
entry->setID(IMG_DEFAULT_AVATAR);
|
||||
if (SHClientTagMgr::instance().getIsEnabled() && index == 0 && gSavedSettings.getBOOL("AscentUseTag"))
|
||||
entry->setID(LLUUID(gSavedSettings.getString("AscentReportClientUUID")));
|
||||
else
|
||||
entry->setID(IMG_DEFAULT_AVATAR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
<string name="TeleportLureMaturity">
|
||||
[NAME]'s teleport lure is to [DESTINATION]
|
||||
</string>
|
||||
<string name="AvatarIdle">
|
||||
Idle [MINUTES]min
|
||||
</string>
|
||||
|
||||
<!-- Default Args - these arguments will be replaced in all strings -->
|
||||
<string name="SECOND_LIFE">Second Life</string>
|
||||
|
||||
Reference in New Issue
Block a user