Merge branch 'V2MultiWear' of git://github.com/Shyotl/SingularityViewer into V2MultiWear
This commit is contained in:
@@ -285,7 +285,7 @@ bool LLAudioEngine_FMODEX::init(const S32 num_channels, void* userdata)
|
|||||||
/*
|
/*
|
||||||
... and re-init.
|
... and re-init.
|
||||||
*/
|
*/
|
||||||
result = mSystem->init(100, FMOD_INIT_NORMAL, 0);
|
result = mSystem->init( num_channels + 2, fmod_flags, 0);
|
||||||
}
|
}
|
||||||
if(Check_FMOD_Error(result, "Error initializing FMOD Ex"))
|
if(Check_FMOD_Error(result, "Error initializing FMOD Ex"))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -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:
|
// Pack information about all texture entries into container:
|
||||||
// { TextureEntry Variable 2 }
|
// { TextureEntry Variable 2 }
|
||||||
// Includes information about image ID, color, scale S,T, offset S,T and rotation
|
// 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;
|
const U32 MAX_TES = 32;
|
||||||
|
|
||||||
U8 image_ids[MAX_TES*16];
|
U8 image_ids[MAX_TES*16];
|
||||||
@@ -1097,8 +1096,6 @@ BOOL LLPrimitive::packTEMessage(LLMessageSystem *mesgsys, int shield, std::strin
|
|||||||
U8 *cur_ptr = packed_buffer;
|
U8 *cur_ptr = packed_buffer;
|
||||||
|
|
||||||
S32 last_face_index = llmin((U32) getNumTEs(), MAX_TES) - 1;
|
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)
|
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++)
|
for (face_index = 0; face_index <= last_face_index; face_index++)
|
||||||
{
|
{
|
||||||
// Directly sending image_ids is not safe!
|
// 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))
|
memcpy(&image_ids[face_index*16],getTE(face_index)->getID().mData,16); /* Flawfinder: ignore */
|
||||||
{
|
|
||||||
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 */
|
|
||||||
|
|
||||||
// Cast LLColor4 to LLColor4U
|
// Cast LLColor4 to LLColor4U
|
||||||
coloru.setVec( getTE(face_index)->getColor() );
|
coloru.setVec( getTE(face_index)->getColor() );
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ public:
|
|||||||
|
|
||||||
// Modify texture entry properties
|
// Modify texture entry properties
|
||||||
inline BOOL validTE(const U8 te_num) const;
|
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 setNumTEs(const U8 num_tes);
|
||||||
virtual void setAllTETextures(const LLUUID &tex_id);
|
virtual void setAllTETextures(const LLUUID &tex_id);
|
||||||
@@ -364,7 +364,7 @@ public:
|
|||||||
void copyTEs(const LLPrimitive *primitive);
|
void copyTEs(const LLPrimitive *primitive);
|
||||||
S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
|
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);
|
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;
|
BOOL packTEMessage(LLDataPacker &dp) const;
|
||||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name);
|
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name);
|
||||||
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
|
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
|
||||||
|
|||||||
@@ -271,7 +271,7 @@
|
|||||||
<key>AscentShowFriendsTag</key>
|
<key>AscentShowFriendsTag</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<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>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
|
|||||||
@@ -131,25 +131,16 @@ void LLPrefsAscentVan::onCommitTextModified(LLUICtrl* ctrl, void* userdata)
|
|||||||
//static
|
//static
|
||||||
void LLPrefsAscentVan::onManualClientUpdate(void* data)
|
void LLPrefsAscentVan::onManualClientUpdate(void* data)
|
||||||
{
|
{
|
||||||
LLChat chat;
|
LLChat chat("Definitions already up-to-date.");
|
||||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||||
chat.mText = llformat("Definitions already up-to-date.");
|
if(SHClientTagMgr::instance().fetchDefinitions())
|
||||||
if (LLVOAvatar::updateClientTags())
|
{
|
||||||
{
|
if(SHClientTagMgr::instance().parseDefinitions())
|
||||||
chat.mText = llformat("Client definitions updated.");
|
chat.mText="Client definitons updated.";
|
||||||
LLVOAvatar::loadClientTags();
|
else
|
||||||
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
|
chat.mText="Failed to parse updated definitions.";
|
||||||
iter != LLCharacter::sInstances.end(); ++iter)
|
}
|
||||||
{
|
LLFloaterChat::addChat(chat);
|
||||||
LLVOAvatar* avatarp = (LLVOAvatar*) *iter;
|
|
||||||
if(avatarp)
|
|
||||||
{
|
|
||||||
LLVector3 root_pos_last = avatarp->mRoot.getWorldPosition();
|
|
||||||
avatarp->mClientTag = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LLFloaterChat::addChat(chat);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
@@ -159,32 +150,8 @@ void LLPrefsAscentVan::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
|||||||
|
|
||||||
// llinfos << "Control named " << ctrl->getControlName() << llendl;
|
// 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");
|
BOOL showCustomColors = gSavedSettings.getBOOL("AscentUseStatusColors");
|
||||||
self->childSetEnabled("friends_color_textbox", showCustomColors);
|
self->childSetEnabled("friends_color_textbox", showCustomColors);
|
||||||
self->childSetEnabled("friend_color_swatch", 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_text", showCustomOptions);
|
||||||
self->childSetEnabled("custom_tag_color_swatch", showCustomOptions);
|
self->childSetEnabled("custom_tag_color_swatch", showCustomOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gAgent.getID().isNull())
|
|
||||||
{
|
|
||||||
gAgent.sendAgentSetAppearance();
|
|
||||||
gAgent.resetClientTag();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store current settings for cancel
|
// Store current settings for cancel
|
||||||
|
|||||||
@@ -535,14 +535,6 @@ BOOL LLAgent::getPhantom()
|
|||||||
return exlPhantom;
|
return exlPhantom;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLAgent::resetClientTag()
|
|
||||||
{
|
|
||||||
if (gAgentAvatarp)
|
|
||||||
{
|
|
||||||
llinfos << "Resetting mClientTag." << llendl;
|
|
||||||
gAgentAvatarp->mClientTag = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -3971,45 +3963,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||||
|
gAgentAvatarp->sendAppearanceMessage( gMessageSystem );
|
||||||
/*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();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -169,12 +169,6 @@ public:
|
|||||||
void setGenderChosen(BOOL b) { mGenderChosen = b; }
|
void setGenderChosen(BOOL b) { mGenderChosen = b; }
|
||||||
private:
|
private:
|
||||||
BOOL mGenderChosen;
|
BOOL mGenderChosen;
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
// Client Tagging
|
|
||||||
//--------------------------------------------------------------------
|
|
||||||
public:
|
|
||||||
void resetClientTag();
|
|
||||||
|
|
||||||
/** Identity
|
/** Identity
|
||||||
** **
|
** **
|
||||||
|
|||||||
@@ -350,12 +350,12 @@ BOOL LLFloaterAvatarList::postBuild()
|
|||||||
|
|
||||||
if(gHippoGridManager->getConnectedGrid()->isSecondLife()){
|
if(gHippoGridManager->getConnectedGrid()->isSecondLife()){
|
||||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("avatar_list");
|
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("avatar_list");
|
||||||
list->getColumn(1)->setWidth(0);
|
list->getColumn(LIST_AVATAR_NAME)->setWidth(0);
|
||||||
list->getColumn(6)->setWidth(0);
|
list->getColumn(LIST_CLIENT)->setWidth(0);
|
||||||
list->getColumn(6)->mDynamicWidth = FALSE;
|
list->getColumn(LIST_CLIENT)->mDynamicWidth = FALSE;
|
||||||
list->getColumn(6)->mRelWidth = 0;
|
list->getColumn(LIST_CLIENT)->mRelWidth = 0;
|
||||||
list->getColumn(1)->mDynamicWidth = TRUE;
|
list->getColumn(LIST_AVATAR_NAME)->mDynamicWidth = TRUE;
|
||||||
list->getColumn(1)->mRelWidth = -1;
|
list->getColumn(LIST_AVATAR_NAME)->mRelWidth = -1;
|
||||||
list->updateLayout();
|
list->updateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -894,11 +894,11 @@ void LLFloaterAvatarList::refreshAvatarList()
|
|||||||
|
|
||||||
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
|
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
|
||||||
LLColor4 client_color(avatar_name_color);
|
LLColor4 client_color(avatar_name_color);
|
||||||
std::string client;
|
|
||||||
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
|
LLVOAvatar *avatarp = gObjectList.findAvatar(av_id);
|
||||||
if(avatarp)
|
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 == "")
|
if(client == "")
|
||||||
{
|
{
|
||||||
client_color = unselected_color;
|
client_color = unselected_color;
|
||||||
|
|||||||
@@ -586,25 +586,6 @@ bool handleCloudSettingsChanged(const LLSD& newvalue)
|
|||||||
return true;
|
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)
|
bool handleAscentAvatarModifier(const LLSD& newvalue)
|
||||||
{
|
{
|
||||||
llinfos << "Calling gAgent.sendAgentSetAppearance() because AscentAvatar*Modifier changed." << llendl;
|
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("EmeraldBreastPhysicsToggle")->getSignal()->connect(boost::bind(&handleAvatarBoobToggleChanged, _2));
|
||||||
gSavedSettings.getControl("EmeraldBoobXYInfluence")->getSignal()->connect(boost::bind(&handleAvatarBoobXYInfluence, _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("AscentAvatarXModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||||
gSavedSettings.getControl("AscentAvatarYModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
gSavedSettings.getControl("AscentAvatarYModifier")->getSignal()->connect(boost::bind(&handleAscentAvatarModifier, _2));
|
||||||
gSavedSettings.getControl("AscentAvatarZModifier")->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() );
|
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
|
||||||
if(!avatar) return true;
|
if(!avatar) return true;
|
||||||
|
const LLUUID clientID = SHClientTagMgr::instance().getClientID(avatar);
|
||||||
std::string clientID;
|
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID.asString()));
|
||||||
LLColor4 color;
|
|
||||||
avatar->getClientInfo(clientID, color, false);
|
|
||||||
gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(clientID));
|
|
||||||
return true;
|
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)
|
void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
||||||
{
|
{
|
||||||
LLChat chat;
|
LLChat chat;
|
||||||
@@ -3512,47 +3510,69 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||||||
{
|
{
|
||||||
msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
|
msg->getStringFast(_PREHASH_ChatData, _PREHASH_Message, mesg);
|
||||||
|
|
||||||
|
static std::map<LLUUID, bool> sChatObjectAuth;
|
||||||
|
|
||||||
if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) &&
|
if ((source_temp == CHAT_SOURCE_OBJECT) && (type_temp == CHAT_TYPE_OWNER) &&
|
||||||
(mesg.substr(0, 3) == "># ")) {
|
(mesg.substr(0, 3) == "># "))
|
||||||
if (mesg.substr(mesg.size()-3, 3) == " #<") {
|
{
|
||||||
|
if (mesg.substr(mesg.size()-3, 3) == " #<"){
|
||||||
// hello from object
|
// hello from object
|
||||||
if (from_id.isNull()) return;
|
if (from_id.isNull()) return;
|
||||||
char buf[200];
|
char buf[200];
|
||||||
snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch);
|
snprintf(buf, 200, "%s v%d.%d.%d", gVersionChannel, gVersionMajor, gVersionMinor, gVersionPatch);
|
||||||
send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570);
|
send_chat_from_viewer(buf, CHAT_TYPE_WHISPER, 427169570);
|
||||||
gChatObjectAuth[from_id] = 1;
|
sChatObjectAuth[from_id] = 1;
|
||||||
} else if (gChatObjectAuth.find(from_id) != gChatObjectAuth.end()) {
|
return;
|
||||||
|
}
|
||||||
|
else if (sChatObjectAuth.find(from_id) != sChatObjectAuth.end())
|
||||||
|
{
|
||||||
LLUUID key;
|
LLUUID key;
|
||||||
if (LLUUID::parseUUID(mesg.substr(3, 36), &key)) {
|
if (key.set(mesg.substr(3, 36),false))
|
||||||
|
{
|
||||||
// object command found
|
// object command found
|
||||||
if (key.isNull() && (mesg.size() == 39)) {
|
if (key.isNull() && (mesg.size() == 39))
|
||||||
|
{
|
||||||
// clear all nameplates
|
// clear all nameplates
|
||||||
for (int i=0; i<gObjectList.getNumObjects(); i++) {
|
for (int i=0; i<gObjectList.getNumObjects(); i++)
|
||||||
|
{
|
||||||
LLViewerObject *obj = gObjectList.getObject(i);
|
LLViewerObject *obj = gObjectList.getObject(i);
|
||||||
if (LLVOAvatar *avatar = dynamic_cast<LLVOAvatar*>(obj))
|
if (LLVOAvatar *avatar = dynamic_cast<LLVOAvatar*>(obj))
|
||||||
|
{
|
||||||
avatar->clearNameFromChat();
|
avatar->clearNameFromChat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
if (key.isNull()) {
|
else
|
||||||
|
{
|
||||||
|
if (key.isNull())
|
||||||
|
{
|
||||||
llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl;
|
llwarns << "Nameplate from chat on NULL avatar (ignored)" << llendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LLVOAvatar *avatar = gObjectList.findAvatar(key);
|
LLVOAvatar *avatar = gObjectList.findAvatar(key);
|
||||||
if (!avatar) {
|
if (!avatar)
|
||||||
|
{
|
||||||
llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl;
|
llwarns << "Nameplate from chat on invalid avatar (ignored)" << llendl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mesg.size() == 39) {
|
if (mesg.size() == 39)
|
||||||
|
{
|
||||||
avatar->clearNameFromChat();
|
avatar->clearNameFromChat();
|
||||||
} else if (mesg[39] == ' ') {
|
}
|
||||||
|
else if (mesg[39] == ' ')
|
||||||
|
{
|
||||||
avatar->setNameFromChat(mesg.substr(40));
|
avatar->setNameFromChat(mesg.substr(40));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (mesg.substr(2, 9) == " floater ") {
|
}
|
||||||
|
else if (mesg.substr(2, 9) == " floater ")
|
||||||
|
{
|
||||||
HippoFloaterXml::execute(mesg.substr(11));
|
HippoFloaterXml::execute(mesg.substr(11));
|
||||||
return;
|
return;
|
||||||
} else if (mesg.substr(2, 6) == " auth ") {
|
}
|
||||||
|
else if (mesg.substr(2, 6) == " auth ")
|
||||||
|
{
|
||||||
std::string authUrl = mesg.substr(8);
|
std::string authUrl = mesg.substr(8);
|
||||||
authUrl += (authUrl.find('?') != std::string::npos)? "&auth=": "?auth=";
|
authUrl += (authUrl.find('?') != std::string::npos)? "&auth=": "?auth=";
|
||||||
authUrl += gAuthString;
|
authUrl += gAuthString;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -78,6 +78,45 @@ class LLTexGlobalColor;
|
|||||||
class LLVOAvatarBoneInfo;
|
class LLVOAvatarBoneInfo;
|
||||||
class LLVOAvatarSkeletonInfo;
|
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
|
// LLVOAvatar
|
||||||
//
|
//
|
||||||
@@ -239,16 +278,20 @@ public:
|
|||||||
void idleUpdateLoadingEffect();
|
void idleUpdateLoadingEffect();
|
||||||
void idleUpdateWindEffect();
|
void idleUpdateWindEffect();
|
||||||
void idleUpdateNameTag(const LLVector3& root_pos_last);
|
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();
|
void clearNameTag();
|
||||||
static void invalidateNameTag(const LLUUID& agent_id);
|
static void invalidateNameTag(const LLUUID& agent_id);
|
||||||
// force all name tags to rebuild, useful when display names turned on/off
|
// force all name tags to rebuild, useful when display names turned on/off
|
||||||
static void invalidateNameTags();
|
static void invalidateNameTags();
|
||||||
|
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
|
||||||
void idleUpdateRenderCost();
|
void idleUpdateRenderCost();
|
||||||
void idleUpdateBelowWater();
|
void idleUpdateBelowWater();
|
||||||
void idleUpdateBoobEffect(); //Emerald
|
void idleUpdateBoobEffect(); //Emerald
|
||||||
|
|
||||||
LLFrameTimer mIdleTimer;
|
|
||||||
std::string getIdleTime();
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Static preferences (controlled by user settings/menus)
|
// Static preferences (controlled by user settings/menus)
|
||||||
@@ -387,8 +430,6 @@ private:
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
public:
|
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);
|
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
|
||||||
bool isVisuallyMuted() const;
|
bool isVisuallyMuted() const;
|
||||||
|
|
||||||
@@ -814,12 +855,10 @@ public:
|
|||||||
// Chat
|
// Chat
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
public:
|
public:
|
||||||
void setNameFromChat(const std::string &text);
|
|
||||||
void clearNameFromChat();
|
|
||||||
void addChat(const LLChat& chat);
|
void addChat(const LLChat& chat);
|
||||||
void clearChat();
|
void clearChat();
|
||||||
void startTyping() { mTyping = TRUE; mTypingTimer.reset(); mIdleTimer.reset();}
|
void startTyping() { mTyping = TRUE; mTypingTimer.reset(); mIdleTimer.reset();}
|
||||||
void stopTyping() { mTyping = FALSE; }
|
void stopTyping() { mTyping = FALSE; mIdleTimer.reset();}
|
||||||
private:
|
private:
|
||||||
BOOL mVisibleChat;
|
BOOL mVisibleChat;
|
||||||
|
|
||||||
@@ -945,19 +984,16 @@ protected:
|
|||||||
static void getAnimLabels(LLDynamicArray<std::string>* labels);
|
static void getAnimLabels(LLDynamicArray<std::string>* labels);
|
||||||
static void getAnimNames(LLDynamicArray<std::string>* names);
|
static void getAnimNames(LLDynamicArray<std::string>* names);
|
||||||
private:
|
private:
|
||||||
std::string mNameString;
|
std::string mNameString; // UTF-8 title + name + status
|
||||||
std::string mSubNameString;
|
|
||||||
std::string mTitle;
|
std::string mTitle;
|
||||||
bool mNameAway;
|
bool mNameAway;
|
||||||
bool mNameBusy;
|
bool mNameBusy;
|
||||||
bool mNameMute;
|
bool mNameMute;
|
||||||
bool mNameAppearance;
|
bool mNameAppearance;
|
||||||
bool mRenderTag;
|
bool mNameFriend;
|
||||||
bool mRenderGroupTitles;
|
bool mNameCloud;
|
||||||
std::string mRenderedName;
|
F32 mNameAlpha;
|
||||||
std::string mClientName;
|
BOOL mRenderGroupTitles;
|
||||||
std::string mIdleString;
|
|
||||||
S32 mUsedNameSystem;
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// Display the name (then optionally fade it out)
|
// Display the name (then optionally fade it out)
|
||||||
@@ -971,28 +1007,7 @@ private:
|
|||||||
BOOL mTyping;
|
BOOL mTyping;
|
||||||
public:
|
public:
|
||||||
BOOL isTyping(){ return mTyping; }
|
BOOL isTyping(){ return mTyping; }
|
||||||
private:
|
|
||||||
LLFrameTimer mTypingTimer;
|
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
|
/** Name
|
||||||
** **
|
** **
|
||||||
@@ -1188,18 +1203,28 @@ protected: // Shared with LLVOAvatarSelf
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
// <edit>
|
// <edit>
|
||||||
|
|
||||||
|
//Avatar idle timer
|
||||||
|
private:
|
||||||
|
std::string getIdleTime(bool is_away, bool is_busy, bool is_appearance);
|
||||||
public:
|
public:
|
||||||
//bool mNametagSaysIdle;
|
LLFrameTimer mIdleTimer;
|
||||||
//bool mIdleForever;
|
private:
|
||||||
//LLFrameTimer mIdleTimer;
|
S32 mIdleMinute;
|
||||||
//U32 mIdleMinutes;
|
|
||||||
LLUUID mFocusObject;
|
//CCS Nametag
|
||||||
LLVector3d mFocusVector;
|
public:
|
||||||
//void resetIdleTime();
|
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>
|
// </edit>
|
||||||
}; // LLVOAvatar
|
}; // LLVOAvatar
|
||||||
|
|
||||||
extern const F32 SELF_ADDITIONAL_PRI;
|
extern const F32 SELF_ADDITIONAL_PRI;
|
||||||
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
|
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
|
|||||||
|
|
||||||
mMotionController.mIsSelf = TRUE;
|
mMotionController.mIsSelf = TRUE;
|
||||||
|
|
||||||
|
SHClientTagMgr::instance().updateAvatarTag(this); //No TE update messages for self. Force update here.
|
||||||
|
|
||||||
lldebugs << "Marking avatar as self " << id << llendl;
|
lldebugs << "Marking avatar as self " << id << llendl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2530,7 +2532,10 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
|
|||||||
{
|
{
|
||||||
LLTextureEntry* entry = getTE((U8) index);
|
LLTextureEntry* entry = getTE((U8) index);
|
||||||
texture_id[index] = entry->getID();
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1398,19 +1398,19 @@ scratch and wear it.
|
|||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom="-410" drop_shadow_visible="true" follows="left|top"
|
bottom="-410" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||||
left="8" mouse_opaque="true" name="AvatarHeightText" v_pad="0" width="140">
|
left="8" mouse_opaque="false" name="AvatarHeightText" v_pad="0" width="140">
|
||||||
Avatar Height:
|
Avatar Height:
|
||||||
</text>
|
</text>
|
||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
|
bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||||
left="8" mouse_opaque="true" name="HeightTextM" v_pad="0" width="140">
|
left="8" mouse_opaque="false" name="HeightTextM" v_pad="0" width="140">
|
||||||
(metric)
|
(metric)
|
||||||
</text>
|
</text>
|
||||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
|
bottom_delta="-18" drop_shadow_visible="true" follows="left|top"
|
||||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||||
left="8" mouse_opaque="true" name="HeightTextI" v_pad="0" width="140">
|
left="8" mouse_opaque="false" name="HeightTextI" v_pad="0" width="140">
|
||||||
(imperial)
|
(imperial)
|
||||||
</text>
|
</text>
|
||||||
<button name="Import" label="Import"
|
<button name="Import" label="Import"
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
<string name="TeleportLureMaturity">
|
<string name="TeleportLureMaturity">
|
||||||
[NAME]'s teleport lure is to [DESTINATION]
|
[NAME]'s teleport lure is to [DESTINATION]
|
||||||
</string>
|
</string>
|
||||||
|
<string name="AvatarIdle">
|
||||||
|
Idle [MINUTES]min
|
||||||
|
</string>
|
||||||
|
|
||||||
<!-- Default Args - these arguments will be replaced in all strings -->
|
<!-- Default Args - these arguments will be replaced in all strings -->
|
||||||
<string name="SECOND_LIFE">Second Life</string>
|
<string name="SECOND_LIFE">Second Life</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user