Massive commit, mainly client tag stuff and random id0 and random mac,
red name if not actually in the sim in active speakers for voice.
This commit is contained in:
@@ -24,6 +24,7 @@ set(llimage_SOURCE_FILES
|
|||||||
llimagedxt.cpp
|
llimagedxt.cpp
|
||||||
llimagej2c.cpp
|
llimagej2c.cpp
|
||||||
llimagejpeg.cpp
|
llimagejpeg.cpp
|
||||||
|
llimagemetadatareader.cpp
|
||||||
llimagepng.cpp
|
llimagepng.cpp
|
||||||
llimagetga.cpp
|
llimagetga.cpp
|
||||||
llimageworker.cpp
|
llimageworker.cpp
|
||||||
@@ -38,6 +39,7 @@ set(llimage_HEADER_FILES
|
|||||||
llimagedxt.h
|
llimagedxt.h
|
||||||
llimagej2c.h
|
llimagej2c.h
|
||||||
llimagejpeg.h
|
llimagejpeg.h
|
||||||
|
llimagemetadatareader.h
|
||||||
llimagepng.h
|
llimagepng.h
|
||||||
llimagetga.h
|
llimagetga.h
|
||||||
llimageworker.h
|
llimageworker.h
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
S16 mMemType; // debug
|
S16 mMemType; // debug
|
||||||
|
std::string decodedImageComment; //lol comment decoding haha
|
||||||
static BOOL sSizeOverride;
|
static BOOL sSizeOverride;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,9 @@
|
|||||||
#include "lldir.h"
|
#include "lldir.h"
|
||||||
#include "llimagej2c.h"
|
#include "llimagej2c.h"
|
||||||
#include "llmemtype.h"
|
#include "llmemtype.h"
|
||||||
|
// <edit>
|
||||||
|
#include "llimagemetadatareader.h"
|
||||||
|
// </edit>
|
||||||
typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
|
typedef LLImageJ2CImpl* (*CreateLLImageJ2CFunction)();
|
||||||
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
|
typedef void (*DestroyLLImageJ2CFunction)(LLImageJ2CImpl*);
|
||||||
typedef const char* (*EngineInfoLLImageJ2CFunction)();
|
typedef const char* (*EngineInfoLLImageJ2CFunction)();
|
||||||
@@ -297,6 +299,9 @@ BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 fir
|
|||||||
// Update the raw discard level
|
// Update the raw discard level
|
||||||
updateRawDiscardLevel();
|
updateRawDiscardLevel();
|
||||||
mDecoding = TRUE;
|
mDecoding = TRUE;
|
||||||
|
// <edit>
|
||||||
|
raw_imagep->decodedImageComment = LLImageMetaDataReader::ExtractEncodedComment(getData(),getDataSize());
|
||||||
|
// </edit>
|
||||||
res = mImpl->decodeImpl(*this, *raw_imagep, decode_time, first_channel, max_channel_count);
|
res = mImpl->decodeImpl(*this, *raw_imagep, decode_time, first_channel, max_channel_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
127
indra/llimage/llimagemetadatareader.cpp
Normal file
127
indra/llimage/llimagemetadatareader.cpp
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
// <edit>
|
||||||
|
#include "linden_common.h"
|
||||||
|
#include "llimagemetadatareader.h"
|
||||||
|
|
||||||
|
LLJ2cParser::LLJ2cParser(U8* data,int data_size)
|
||||||
|
{
|
||||||
|
if(data && data_size)
|
||||||
|
{
|
||||||
|
mData.resize(data_size);
|
||||||
|
memcpy(&(mData[0]), data, data_size);
|
||||||
|
//std::copy(data,data+data_size,mData.begin());
|
||||||
|
}
|
||||||
|
mIter = mData.begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
U8 LLJ2cParser::nextChar()
|
||||||
|
{
|
||||||
|
U8 rtn = 0x00;
|
||||||
|
if(mIter != mData.end())
|
||||||
|
{
|
||||||
|
rtn = (*mIter);
|
||||||
|
mIter++;
|
||||||
|
}
|
||||||
|
return rtn;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<U8> LLJ2cParser::nextCharArray(int len)
|
||||||
|
{
|
||||||
|
std::vector<U8> array;
|
||||||
|
if(len > 0)
|
||||||
|
{
|
||||||
|
array.resize(len);
|
||||||
|
for(S32 i = 0; i < len; i++)
|
||||||
|
{
|
||||||
|
array[i] = nextChar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<U8> LLJ2cParser::GetNextComment()
|
||||||
|
{
|
||||||
|
std::vector<U8> content;
|
||||||
|
while (mIter != mData.end())
|
||||||
|
{
|
||||||
|
U8 marker = nextChar();
|
||||||
|
if (marker == 0xff)
|
||||||
|
{
|
||||||
|
U8 marker_type = nextChar();
|
||||||
|
if (marker_type == 0x4f)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (marker_type == 0x90)
|
||||||
|
{
|
||||||
|
//llinfos << "FOUND 0x90" << llendl;
|
||||||
|
break; //return empty vector
|
||||||
|
}
|
||||||
|
|
||||||
|
if (marker_type == 0x64)
|
||||||
|
{
|
||||||
|
//llinfos << "FOUND 0x64 COMMENT SECTION" << llendl;
|
||||||
|
S32 len = ((S32)nextChar())*256 + (S32)nextChar();
|
||||||
|
if (len > 3) content = nextCharArray(len - 2);
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content.clear(); //return empty vector by clear anything there
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
//static
|
||||||
|
std::string LLImageMetaDataReader::ExtractEncodedComment(U8* data,int data_size)
|
||||||
|
{
|
||||||
|
LLJ2cParser* parser = new LLJ2cParser(data,data_size);
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
std::vector<U8> comment = parser->GetNextComment();
|
||||||
|
if (comment.empty()) break; //exit loop
|
||||||
|
if (comment[1] == 0x00 && comment.size() == 130)
|
||||||
|
{
|
||||||
|
//llinfos << "FOUND PAYLOAD" << llendl;
|
||||||
|
std::vector<U8> payload(128);
|
||||||
|
S32 i;
|
||||||
|
memcpy(&(payload[0]), &(comment[2]), 128);
|
||||||
|
if (payload[2] == payload[127])
|
||||||
|
{
|
||||||
|
// emkdu.dll
|
||||||
|
for (i = 4; i < 128; i += 4)
|
||||||
|
{
|
||||||
|
payload[i] ^= payload[3];
|
||||||
|
payload[i + 1] ^= payload[1];
|
||||||
|
payload[i + 2] ^= payload[0];
|
||||||
|
payload[i + 3] ^= payload[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (payload[3] == payload[127])
|
||||||
|
{
|
||||||
|
// emkdu.dll or onyxkdu.dll
|
||||||
|
for (i = 4; i < 128; i += 4)
|
||||||
|
{
|
||||||
|
payload[i] ^= payload[2];
|
||||||
|
payload[i + 1] ^= payload[0];
|
||||||
|
payload[i + 2] ^= payload[1];
|
||||||
|
payload[i + 3] ^= payload[3];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;//exit loop
|
||||||
|
}
|
||||||
|
for (i = 4; i < 128; ++i)
|
||||||
|
{
|
||||||
|
if (payload[i] == 0) break;
|
||||||
|
}
|
||||||
|
std::string result(payload.begin()+4,payload.begin()+i);
|
||||||
|
//llinfos << "FOUND COMMENT: " << result << llendl;
|
||||||
|
delete parser;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//end of loop
|
||||||
|
delete parser;
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
26
indra/llimage/llimagemetadatareader.h
Normal file
26
indra/llimage/llimagemetadatareader.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
// <edit>
|
||||||
|
#ifndef LL_LLIMAGEMETADATAREADER_H
|
||||||
|
#define LL_LLIMAGEMETADATAREADER_H
|
||||||
|
#include "stdtypes.h"
|
||||||
|
#include <string.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class LLJ2cParser
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LLJ2cParser(U8* data,int data_size);
|
||||||
|
std::vector<U8> GetNextComment();
|
||||||
|
private:
|
||||||
|
U8 nextChar();
|
||||||
|
std::vector<U8> nextCharArray(int len);
|
||||||
|
std::vector<U8> mData;
|
||||||
|
std::vector<U8>::iterator mIter;
|
||||||
|
};
|
||||||
|
class LLImageMetaDataReader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static std::string ExtractEncodedComment(U8* data,int data_size);
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
// </edit>
|
||||||
@@ -461,6 +461,7 @@ void LLPanelActiveSpeakers::refreshSpeakers()
|
|||||||
}
|
}
|
||||||
|
|
||||||
LLColor4 icon_color;
|
LLColor4 icon_color;
|
||||||
|
|
||||||
if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
|
if (speakerp->mStatus == LLSpeaker::STATUS_MUTED)
|
||||||
{
|
{
|
||||||
icon_cell->setValue(mute_icon_image);
|
icon_cell->setValue(mute_icon_image);
|
||||||
@@ -504,6 +505,20 @@ void LLPanelActiveSpeakers::refreshSpeakers()
|
|||||||
// draw inactive speakers in gray
|
// draw inactive speakers in gray
|
||||||
name_cell->setColor(LLColor4::grey4);
|
name_cell->setColor(LLColor4::grey4);
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
else if(speakerp->mType == LLSpeaker::SPEAKER_AGENT && speakerp->mID != gAgent.getID())
|
||||||
|
{
|
||||||
|
// let us check to see if they are actually in the sim
|
||||||
|
LLViewerRegion* regionp = gAgent.getRegion();
|
||||||
|
if(regionp)
|
||||||
|
{
|
||||||
|
if(regionp->mMapAvatarIDs.find(speakerp->mID) == -1)
|
||||||
|
{
|
||||||
|
name_cell->setColor(LLColor4::red);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
name_cell->setColor(LLColor4::black);
|
name_cell->setColor(LLColor4::black);
|
||||||
|
|||||||
@@ -772,6 +772,30 @@ void LLFloaterAvatarList::refreshAvatarList()
|
|||||||
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
|
snprintf(temp, sizeof(temp), "%d", (S32)position.mdV[VZ]);
|
||||||
}
|
}
|
||||||
element["columns"][LIST_ALTITUDE]["value"] = temp;
|
element["columns"][LIST_ALTITUDE]["value"] = temp;
|
||||||
|
|
||||||
|
element["columns"][LIST_CLIENT]["column"] = "client";
|
||||||
|
element["columns"][LIST_CLIENT]["type"] = "text";
|
||||||
|
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
||||||
|
std::string client;
|
||||||
|
LLVOAvatar *avatarp = (LLVOAvatar*)gObjectList.findObject(av_id);
|
||||||
|
if(avatarp)
|
||||||
|
{
|
||||||
|
avatarp->getClientTag(client, avatar_name_color, TRUE);
|
||||||
|
if(client == "")
|
||||||
|
{
|
||||||
|
avatar_name_color = gColors.getColor( "ScrollUnselectedColor" );
|
||||||
|
client = "?";
|
||||||
|
}
|
||||||
|
element["columns"][LIST_CLIENT]["value"] = client.c_str();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element["columns"][LIST_CLIENT]["value"] = "Out Of Range";
|
||||||
|
}
|
||||||
|
//Blend to make the color show up better
|
||||||
|
avatar_name_color = avatar_name_color * 0.5f + gColors.getColor( "ScrollUnselectedColor" ) * 0.5f;
|
||||||
|
|
||||||
|
element["columns"][LIST_CLIENT]["color"] = avatar_name_color.getValue();
|
||||||
|
|
||||||
// Add to list
|
// Add to list
|
||||||
mAvatarList->addElement(element, ADD_BOTTOM);
|
mAvatarList->addElement(element, ADD_BOTTOM);
|
||||||
|
|||||||
@@ -200,7 +200,8 @@ private:
|
|||||||
LIST_AVATAR_NAME,
|
LIST_AVATAR_NAME,
|
||||||
LIST_DISTANCE,
|
LIST_DISTANCE,
|
||||||
LIST_POSITION,
|
LIST_POSITION,
|
||||||
LIST_ALTITUDE
|
LIST_ALTITUDE,
|
||||||
|
LIST_CLIENT
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*avlist_command_t)(const LLUUID &avatar, const std::string &name);
|
typedef void (*avlist_command_t)(const LLUUID &avatar, const std::string &name);
|
||||||
|
|||||||
@@ -77,11 +77,11 @@
|
|||||||
|
|
||||||
#include "llglheaders.h"
|
#include "llglheaders.h"
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
#include "llappviewer.h"
|
#include "llappviewer.h"
|
||||||
#include "llspinctrl.h"
|
#include "llspinctrl.h"
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
// </edit>
|
// </edit>
|
||||||
#define USE_VIEWER_AUTH 0
|
#define USE_VIEWER_AUTH 0
|
||||||
|
|
||||||
const S32 BLACK_BORDER_HEIGHT = 160;
|
const S32 BLACK_BORDER_HEIGHT = 160;
|
||||||
@@ -108,8 +108,8 @@ public:
|
|||||||
|
|
||||||
LLLoginRefreshHandler gLoginRefreshHandler;
|
LLLoginRefreshHandler gLoginRefreshHandler;
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
std::string gFullName;
|
std::string gFullName;
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
// helper class that trys to download a URL from a web site and calls a method
|
// helper class that trys to download a URL from a web site and calls a method
|
||||||
@@ -303,10 +303,10 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||||||
|
|
||||||
// childSetAction("quit_btn", onClickQuit, this);
|
// childSetAction("quit_btn", onClickQuit, this);
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
//std::string channel = gSavedSettings.getString("VersionChannelName");
|
//std::string channel = gSavedSettings.getString("VersionChannelName");
|
||||||
std::string channel = gSavedSettings.getString("SpecifiedChannel");
|
std::string channel = gSavedSettings.getString("SpecifiedChannel");
|
||||||
// </edit>
|
// </edit>
|
||||||
std::string version = llformat("%d.%d.%d (%d)",
|
std::string version = llformat("%d.%d.%d (%d)",
|
||||||
LL_VERSION_MAJOR,
|
LL_VERSION_MAJOR,
|
||||||
LL_VERSION_MINOR,
|
LL_VERSION_MINOR,
|
||||||
@@ -365,64 +365,69 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||||||
refreshLocation( false );
|
refreshLocation( false );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
std::string specified_channel = gSavedSettings.getString("SpecifiedChannel");
|
std::string specified_channel = gSavedSettings.getString("SpecifiedChannel");
|
||||||
getChild<LLLineEditor>("channel_edit")->setText(specified_channel);
|
getChild<LLLineEditor>("channel_edit")->setText(specified_channel);
|
||||||
|
|
||||||
bool specify_mac = gSavedSettings.getBOOL("SpecifyMAC");
|
bool specify_mac = gSavedSettings.getBOOL("SpecifyMAC");
|
||||||
bool specify_id0 = gSavedSettings.getBOOL("SpecifyID0");
|
bool specify_id0 = gSavedSettings.getBOOL("SpecifyID0");
|
||||||
std::string specified_mac = gSavedSettings.getString("SpecifiedMAC");
|
std::string specified_mac = gSavedSettings.getString("SpecifiedMAC");
|
||||||
std::string specified_id0 = gSavedSettings.getString("SpecifiedID0");
|
std::string specified_id0 = gSavedSettings.getString("SpecifiedID0");
|
||||||
|
|
||||||
// Don't allow specify for empty strings (just in case)
|
// Don't allow specify for empty strings (just in case)
|
||||||
if(specified_mac.length() == 0) specify_mac = false;
|
if(specified_mac.length() == 0) specify_mac = false;
|
||||||
if(specified_id0.length() == 0) specify_id0 = false;
|
if(specified_id0.length() == 0) specify_id0 = false;
|
||||||
|
|
||||||
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
|
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
|
||||||
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
|
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
|
||||||
|
|
||||||
getChild<LLCheckBoxCtrl>("mac_check")->setValue(specify_mac);
|
getChild<LLCheckBoxCtrl>("mac_check")->setValue(specify_mac);
|
||||||
getChild<LLLineEditor>("mac_edit")->setEnabled(specify_mac);
|
getChild<LLLineEditor>("mac_edit")->setEnabled(specify_mac);
|
||||||
getChild<LLCheckBoxCtrl>("id0_check")->setValue(specify_id0);
|
getChild<LLCheckBoxCtrl>("id0_check")->setValue(specify_id0);
|
||||||
getChild<LLLineEditor>("id0_edit")->setEnabled(specify_id0);
|
getChild<LLLineEditor>("id0_edit")->setEnabled(specify_id0);
|
||||||
|
|
||||||
fillMAC();
|
childSetEnabled("mac_random_btn",specify_mac);
|
||||||
|
childSetEnabled("id0_random_btn",specify_id0);
|
||||||
|
|
||||||
|
fillMAC();
|
||||||
fillID0();
|
fillID0();
|
||||||
fillVer();
|
fillVer();
|
||||||
|
|
||||||
childSetCommitCallback("mac_check", onCheckMAC, this);
|
childSetCommitCallback("mac_check", onCheckMAC, this);
|
||||||
childSetCommitCallback("id0_check", onCheckID0, this);
|
childSetCommitCallback("id0_check", onCheckID0, this);
|
||||||
// </edit>
|
childSetAction("mac_random_btn", onClickMACRandom, this);
|
||||||
}
|
childSetAction("id0_random_btn", onClickID0Random, this);
|
||||||
|
// </edit>
|
||||||
// <edit>
|
}
|
||||||
void LLPanelLogin::fillMAC()
|
|
||||||
{
|
// <edit>
|
||||||
if(gSavedSettings.getBOOL("SpecifyMAC"))
|
void LLPanelLogin::fillMAC()
|
||||||
{
|
{
|
||||||
getChild<LLLineEditor>("mac_edit")->setText(gSavedSettings.getString("SpecifiedMAC"));
|
if(gSavedSettings.getBOOL("SpecifyMAC"))
|
||||||
}
|
{
|
||||||
else
|
getChild<LLLineEditor>("mac_edit")->setText(gSavedSettings.getString("SpecifiedMAC"));
|
||||||
{
|
}
|
||||||
char hashed_mac_string[MD5HEX_STR_SIZE];
|
else
|
||||||
LLMD5 hashed_mac;
|
{
|
||||||
hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
|
char hashed_mac_string[MD5HEX_STR_SIZE];
|
||||||
hashed_mac.finalize();
|
LLMD5 hashed_mac;
|
||||||
hashed_mac.hex_digest(hashed_mac_string);
|
hashed_mac.update( gMACAddress, MAC_ADDRESS_BYTES );
|
||||||
getChild<LLLineEditor>("mac_edit")->setText(std::string(hashed_mac_string));
|
hashed_mac.finalize();
|
||||||
}
|
hashed_mac.hex_digest(hashed_mac_string);
|
||||||
}
|
getChild<LLLineEditor>("mac_edit")->setText(std::string(hashed_mac_string));
|
||||||
|
}
|
||||||
void LLPanelLogin::fillID0()
|
}
|
||||||
{
|
|
||||||
if(gSavedSettings.getBOOL("SpecifyID0"))
|
void LLPanelLogin::fillID0()
|
||||||
{
|
{
|
||||||
getChild<LLLineEditor>("id0_edit")->setText(gSavedSettings.getString("SpecifiedID0"));
|
if(gSavedSettings.getBOOL("SpecifyID0"))
|
||||||
}
|
{
|
||||||
else
|
getChild<LLLineEditor>("id0_edit")->setText(gSavedSettings.getString("SpecifiedID0"));
|
||||||
{
|
}
|
||||||
getChild<LLLineEditor>("id0_edit")->setText(LLAppViewer::instance()->getSerialNumber());
|
else
|
||||||
}
|
{
|
||||||
|
getChild<LLLineEditor>("id0_edit")->setText(LLAppViewer::instance()->getSerialNumber());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelLogin::fillVer()
|
void LLPanelLogin::fillVer()
|
||||||
@@ -431,27 +436,66 @@ void LLPanelLogin::fillVer()
|
|||||||
getChild<LLSpinCtrl>("vermin_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionMin"));
|
getChild<LLSpinCtrl>("vermin_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionMin"));
|
||||||
getChild<LLSpinCtrl>("verpatch_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionPatch"));
|
getChild<LLSpinCtrl>("verpatch_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionPatch"));
|
||||||
getChild<LLSpinCtrl>("verbuild_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionBuild"));
|
getChild<LLSpinCtrl>("verbuild_spin")->forceSetValue((S32)gSavedSettings.getU32("SpecifiedVersionBuild"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPanelLogin::onCheckMAC(LLUICtrl* ctrl, void* userData)
|
void LLPanelLogin::onCheckMAC(LLUICtrl* ctrl, void* userData)
|
||||||
{
|
{
|
||||||
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
||||||
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
|
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
|
||||||
gSavedSettings.setBOOL("SpecifyMAC", enabled);
|
gSavedSettings.setBOOL("SpecifyMAC", enabled);
|
||||||
panel->getChild<LLLineEditor>("mac_edit")->setEnabled(enabled);
|
panel->getChild<LLLineEditor>("mac_edit")->setEnabled(enabled);
|
||||||
panel->fillMAC();
|
panel->childSetEnabled("mac_random_btn",enabled);
|
||||||
}
|
panel->fillMAC();
|
||||||
|
}
|
||||||
// static
|
|
||||||
void LLPanelLogin::onCheckID0(LLUICtrl* ctrl, void* userData)
|
// static
|
||||||
{
|
void LLPanelLogin::onCheckID0(LLUICtrl* ctrl, void* userData)
|
||||||
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
{
|
||||||
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
|
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
||||||
gSavedSettings.setBOOL("SpecifyID0", enabled);
|
bool enabled = ((LLCheckBoxCtrl*)ctrl)->getValue();
|
||||||
panel->getChild<LLLineEditor>("id0_edit")->setEnabled(enabled);
|
gSavedSettings.setBOOL("SpecifyID0", enabled);
|
||||||
panel->fillID0();
|
panel->getChild<LLLineEditor>("id0_edit")->setEnabled(enabled);
|
||||||
}
|
panel->childSetEnabled("id0_random_btn",enabled);
|
||||||
|
panel->fillID0();
|
||||||
|
}
|
||||||
|
// static
|
||||||
|
void LLPanelLogin::onClickMACRandom(void* userData)
|
||||||
|
{
|
||||||
|
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
||||||
|
unsigned char seed[16]; /* Flawfinder: ignore */
|
||||||
|
LLUUID::getNodeID(&seed[0]);
|
||||||
|
seed[6]='U';
|
||||||
|
seed[7]='W';
|
||||||
|
LLUUID::getSystemTime((uuid_time_t *)(&seed[8]));
|
||||||
|
|
||||||
|
char hash_string[MD5HEX_STR_SIZE];
|
||||||
|
LLMD5 hash;
|
||||||
|
hash.update( seed , 16 );
|
||||||
|
hash.finalize();
|
||||||
|
hash.hex_digest(hash_string);
|
||||||
|
gSavedSettings.setString("SpecifiedMAC",std::string(hash_string));
|
||||||
|
panel->fillMAC();
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void LLPanelLogin::onClickID0Random(void* userData)
|
||||||
|
{
|
||||||
|
LLPanelLogin* panel = (LLPanelLogin*)userData;
|
||||||
|
unsigned char seed[16]; /* Flawfinder: ignore */
|
||||||
|
LLUUID::getNodeID(&seed[0]);
|
||||||
|
seed[6]='W';
|
||||||
|
seed[7]='U';
|
||||||
|
LLUUID::getSystemTime((uuid_time_t *)(&seed[8]));
|
||||||
|
|
||||||
|
char hash_string[MD5HEX_STR_SIZE];
|
||||||
|
LLMD5 hash;
|
||||||
|
hash.update( seed , 16 );
|
||||||
|
hash.finalize();
|
||||||
|
hash.hex_digest(hash_string);
|
||||||
|
gSavedSettings.setString("SpecifiedID0",std::string(hash_string));
|
||||||
|
panel->fillID0();
|
||||||
|
}
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
void LLPanelLogin::setSiteIsAlive( bool alive )
|
void LLPanelLogin::setSiteIsAlive( bool alive )
|
||||||
@@ -1018,10 +1062,10 @@ void LLPanelLogin::loadLoginPage()
|
|||||||
// Channel and Version
|
// Channel and Version
|
||||||
std::string version = llformat("%d.%d.%d (%d)",
|
std::string version = llformat("%d.%d.%d (%d)",
|
||||||
gSavedSettings.getU32("SpecifiedVersionMaj"), gSavedSettings.getU32("SpecifiedVersionMin"), gSavedSettings.getU32("SpecifiedVersionPatch"), gSavedSettings.getU32("SpecifiedVersionBuild"));
|
gSavedSettings.getU32("SpecifiedVersionMaj"), gSavedSettings.getU32("SpecifiedVersionMin"), gSavedSettings.getU32("SpecifiedVersionPatch"), gSavedSettings.getU32("SpecifiedVersionBuild"));
|
||||||
|
|
||||||
//char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0);
|
//char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0);
|
||||||
char* curl_channel = curl_escape(gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
|
char* curl_channel = curl_escape(gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
|
||||||
// </edit>
|
// </edit>
|
||||||
char* curl_version = curl_escape(version.c_str(), 0);
|
char* curl_version = curl_escape(version.c_str(), 0);
|
||||||
|
|
||||||
oStr << "&channel=" << curl_channel;
|
oStr << "&channel=" << curl_channel;
|
||||||
@@ -1183,26 +1227,26 @@ void LLPanelLogin::onClickConnect(void *)
|
|||||||
{
|
{
|
||||||
if (sInstance && sInstance->mCallback)
|
if (sInstance && sInstance->mCallback)
|
||||||
{
|
{
|
||||||
// <edit> save identity settings for login
|
// <edit> save identity settings for login
|
||||||
bool specify_mac = sInstance->getChild<LLCheckBoxCtrl>("mac_check")->getValue();
|
bool specify_mac = sInstance->getChild<LLCheckBoxCtrl>("mac_check")->getValue();
|
||||||
bool specify_id0 = sInstance->getChild<LLCheckBoxCtrl>("id0_check")->getValue();
|
bool specify_id0 = sInstance->getChild<LLCheckBoxCtrl>("id0_check")->getValue();
|
||||||
|
|
||||||
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
|
|
||||||
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
|
|
||||||
|
|
||||||
if(specify_mac)
|
gSavedSettings.setBOOL("SpecifyMAC", specify_mac);
|
||||||
{
|
gSavedSettings.setBOOL("SpecifyID0", specify_id0);
|
||||||
std::string specified_mac = sInstance->getChild<LLLineEditor>("mac_edit")->getText();
|
|
||||||
gSavedSettings.setString("SpecifiedMAC", specified_mac);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(specify_id0)
|
if(specify_mac)
|
||||||
{
|
{
|
||||||
std::string specified_id0 = sInstance->getChild<LLLineEditor>("id0_edit")->getText();
|
std::string specified_mac = sInstance->getChild<LLLineEditor>("mac_edit")->getText();
|
||||||
gSavedSettings.setString("SpecifiedID0", specified_id0);
|
gSavedSettings.setString("SpecifiedMAC", specified_mac);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string specified_channel = sInstance->getChild<LLLineEditor>("channel_edit")->getText();
|
if(specify_id0)
|
||||||
|
{
|
||||||
|
std::string specified_id0 = sInstance->getChild<LLLineEditor>("id0_edit")->getText();
|
||||||
|
gSavedSettings.setString("SpecifiedID0", specified_id0);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string specified_channel = sInstance->getChild<LLLineEditor>("channel_edit")->getText();
|
||||||
gSavedSettings.setString("SpecifiedChannel", specified_channel);
|
gSavedSettings.setString("SpecifiedChannel", specified_channel);
|
||||||
|
|
||||||
U32 specified_ver_maj = (U32)sInstance->getChild<LLSpinCtrl>("vermaj_spin")->getValue().asInteger();
|
U32 specified_ver_maj = (U32)sInstance->getChild<LLSpinCtrl>("vermaj_spin")->getValue().asInteger();
|
||||||
@@ -1213,7 +1257,7 @@ void LLPanelLogin::onClickConnect(void *)
|
|||||||
gSavedSettings.setU32("SpecifiedVersionPatch", specified_ver_patch);
|
gSavedSettings.setU32("SpecifiedVersionPatch", specified_ver_patch);
|
||||||
U32 specified_ver_build = (U32)sInstance->getChild<LLSpinCtrl>("verbuild_spin")->getValue().asInteger();
|
U32 specified_ver_build = (U32)sInstance->getChild<LLSpinCtrl>("verbuild_spin")->getValue().asInteger();
|
||||||
gSavedSettings.setU32("SpecifiedVersionBuild", specified_ver_build);
|
gSavedSettings.setU32("SpecifiedVersionBuild", specified_ver_build);
|
||||||
|
|
||||||
// </edit>
|
// </edit>
|
||||||
// tell the responder we're not here anymore
|
// tell the responder we're not here anymore
|
||||||
if ( gResponsePtr )
|
if ( gResponsePtr )
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
|
|
||||||
class LLUIImage;
|
class LLUIImage;
|
||||||
|
|
||||||
// <edit>
|
// <edit>
|
||||||
extern std::string gFullName;
|
extern std::string gFullName;
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
class LLPanelLogin:
|
class LLPanelLogin:
|
||||||
@@ -117,12 +117,14 @@ private:
|
|||||||
static void onLoginComboLostFocus(LLFocusableElement* fe, void*);
|
static void onLoginComboLostFocus(LLFocusableElement* fe, void*);
|
||||||
static void onNameCheckChanged(LLUICtrl* ctrl, void* data);
|
static void onNameCheckChanged(LLUICtrl* ctrl, void* data);
|
||||||
static void clearPassword();
|
static void clearPassword();
|
||||||
// <edit>
|
// <edit>
|
||||||
void fillMAC();
|
void fillMAC();
|
||||||
void fillID0();
|
void fillID0();
|
||||||
void fillVer();
|
void fillVer();
|
||||||
static void onCheckMAC(LLUICtrl* ctrl, void* userData);
|
static void onCheckMAC(LLUICtrl* ctrl, void* userData);
|
||||||
static void onCheckID0(LLUICtrl* ctrl, void* userData);
|
static void onCheckID0(LLUICtrl* ctrl, void* userData);
|
||||||
|
static void onClickMACRandom(void* userData);
|
||||||
|
static void onClickID0Random(void* userData);
|
||||||
// </edit>
|
// </edit>
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -523,6 +523,7 @@ BOOL LLViewerImage::createTexture(S32 usename/*= 0*/)
|
|||||||
|
|
||||||
U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel;
|
U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel;
|
||||||
U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
|
U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel;
|
||||||
|
decodedComment = mRawImage->decodedImageComment;
|
||||||
if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
|
if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE )
|
||||||
{
|
{
|
||||||
llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl;
|
llinfos << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << llendl;
|
||||||
|
|||||||
@@ -365,6 +365,8 @@ public:
|
|||||||
LLFrameTimer mLastPacketTimer; // Time since last packet.
|
LLFrameTimer mLastPacketTimer; // Time since last packet.
|
||||||
LLFrameTimer mLastReferencedTimer;
|
LLFrameTimer mLastReferencedTimer;
|
||||||
|
|
||||||
|
std::string decodedComment;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLUUID mID;
|
LLUUID mID;
|
||||||
|
|
||||||
|
|||||||
@@ -3012,7 +3012,162 @@ void LLVOAvatar::idleUpdateWindEffect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void LLVOAvatar::getClientTag(std::string& client, LLColor4& color, BOOL useComment)
|
||||||
|
{
|
||||||
|
std::string uuid_str = getTE(0)->getID().asString(); //UUID of the head texture
|
||||||
|
|
||||||
|
if(getTEImage(TEX_HEAD_BODYPAINT)->isMissingAsset())
|
||||||
|
{
|
||||||
|
color = LLColor4(1.f, 1.0f, 1.0f);
|
||||||
|
client = "Unknown viewer";
|
||||||
|
}
|
||||||
|
else if (uuid_str == "ccda2b3b-e72c-a112-e126-fee238b67218")
|
||||||
|
{
|
||||||
|
// textures other than head are 4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6
|
||||||
|
color = LLColor4(0.f, 1.0f, 0.0f);
|
||||||
|
client = "Emerald";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "0bcd5f5d-a4ce-9ea4-f9e8-15132653b3d8")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.3f, 0.5f);
|
||||||
|
client = "MoyMix";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "5855f37d-63e5-3918-1404-8ffa3820eb6d")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.3f, 0.5f);
|
||||||
|
client = "MoyMix/B";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "9ba526b6-f43d-6b60-42de-ce62a25ee7fb")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.3f, 0.5f);
|
||||||
|
client = "MoyMix/nolife";
|
||||||
|
|
||||||
|
}
|
||||||
|
//else if (uuid_str == "abbca853-30ba-49c1-a1e7-2a5b9a70573f")
|
||||||
|
//{
|
||||||
|
// color = LLColor4(0.5f, 0.75f, 1.0f);
|
||||||
|
// strcat(line, " (CryoLife/" + "A)");
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
else if (uuid_str == "0f6723d2-5b23-6b58-08ab-308112b33786")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.5f, 0.75f, 1.0f);
|
||||||
|
client = "CryoLife";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "2c9c1e0b-e5d1-263e-16b1-7fc6d169f3d6")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.5f, 0.75f, 1.0f);
|
||||||
|
client = "Phoxy SL";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "c252d89d-6f7c-7d90-f430-d140d2e3fbbe")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.7f, 0.7f, 0.7f);
|
||||||
|
client = "VLife";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "5aa5c70d-d787-571b-0495-4fc1bdef1500")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.f, 0.0f, 0.0f);
|
||||||
|
client = "GridProxy/LordGregGreg";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "8183e823-c443-2142-6eb6-2ab763d4f81c")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.f, 1.f, 0.0f);
|
||||||
|
client = "GridProxy/DayOh";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "f3fd74a6-fee7-4b2f-93ae-ddcb5991da04")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.0f, 1.0f);
|
||||||
|
client = "PSL/A";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "77662f23-c77a-9b4d-5558-26b757b2144c")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.0f, 1.0f);
|
||||||
|
client = "PSL/B";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "1c29480c-c608-df87-28bb-964fb64c5366")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.f, 1.0f, 1.0f);
|
||||||
|
client = "Emerald/GEMINI";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "e6f9c019-8783-dc3e-b265-41f1510333fc")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.4f,0.4f,0.4f);
|
||||||
|
client = "Onyx";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "5262d71a-88f7-ef40-3b15-00ea148ab4b5")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.9f, 0.9f, 0.9f);
|
||||||
|
client = "GEMINI Bot";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "adcbe893-7643-fd12-f61c-0b39717e2e32")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f, 0.5f, 0.4f);
|
||||||
|
client = "tyk3n";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "f5a48821-9a98-d09e-8d6a-50cc08ba9a47")
|
||||||
|
{
|
||||||
|
color = gColors.getColor( "AvatarNameColor" );
|
||||||
|
client = "NeilLife";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "cc7a030f-282f-c165-44d2-b5ee572e72bf")
|
||||||
|
{
|
||||||
|
color = LLColor4::purple;
|
||||||
|
client = "Imprudence";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.5f, 0.5f, 0.5f);
|
||||||
|
client = "Viewer 2.0";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "380ae30b-f2c7-b07c-041e-5688e89a6fc1")
|
||||||
|
{
|
||||||
|
color = LLColor4(0.65f, 0.93f, 0.14f);
|
||||||
|
client = "Nano";
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (uuid_str == "c58fca06-33b3-827d-d81c-a886a631affc")
|
||||||
|
{
|
||||||
|
color = LLColor4(1.0f,0.61176f,0.0f);
|
||||||
|
client = "Whale";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = gColors.getColor( "AvatarNameColor" );
|
||||||
|
color.setAlpha(1.f);
|
||||||
|
//llinfos << "Apparently this tag isn't registered: " << uuid_str << llendl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(useComment)
|
||||||
|
{
|
||||||
|
LLUUID id = getTE(9)->getID();
|
||||||
|
LLPointer<LLViewerImage> image = gImageList.getImage(id);
|
||||||
|
if(image && image->decodedComment.length())
|
||||||
|
{
|
||||||
|
if(client.length())
|
||||||
|
client += " , " + image->decodedComment;
|
||||||
|
else
|
||||||
|
client = image->decodedComment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
||||||
{
|
{
|
||||||
// update chat bubble
|
// update chat bubble
|
||||||
@@ -3057,6 +3212,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
|||||||
new_name = TRUE;
|
new_name = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// <edit>
|
||||||
|
std::string client;
|
||||||
|
// </edit>
|
||||||
|
|
||||||
// First Calculate Alpha
|
// First Calculate Alpha
|
||||||
// If alpha > 0, create mNameText if necessary, otherwise delete it
|
// If alpha > 0, create mNameText if necessary, otherwise delete it
|
||||||
{
|
{
|
||||||
@@ -3096,10 +3255,16 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
|||||||
new_name = TRUE;
|
new_name = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
||||||
// <edit>
|
// <edit>
|
||||||
//LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
if(isFullyLoaded() && !mIsSelf)
|
||||||
//avatar_name_color.setAlpha(alpha);
|
{
|
||||||
|
getClientTag(client,avatar_name_color);
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
|
avatar_name_color.setAlpha(alpha);
|
||||||
|
mNameText->setColor(avatar_name_color);
|
||||||
|
|
||||||
LLQuaternion root_rot = mRoot.getWorldRotation();
|
LLQuaternion root_rot = mRoot.getWorldRotation();
|
||||||
mNameText->setUsePixelSize(TRUE);
|
mNameText->setUsePixelSize(TRUE);
|
||||||
LLVector3 pixel_right_vec;
|
LLVector3 pixel_right_vec;
|
||||||
@@ -3153,7 +3318,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
|||||||
(!title && !mTitle.empty()) ||
|
(!title && !mTitle.empty()) ||
|
||||||
(title && mTitle != title->getString()) ||
|
(title && mTitle != title->getString()) ||
|
||||||
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute)
|
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute)
|
||||||
|| is_appearance != mNameAppearance)
|
|| is_appearance != mNameAppearance
|
||||||
|
|| client.length() ) // <edit>
|
||||||
{
|
{
|
||||||
std::string line;
|
std::string line;
|
||||||
if (!sRenderGroupTitles)
|
if (!sRenderGroupTitles)
|
||||||
@@ -3179,133 +3345,20 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
|
|||||||
line += lastname->getString();
|
line += lastname->getString();
|
||||||
BOOL need_comma = FALSE;
|
BOOL need_comma = FALSE;
|
||||||
|
|
||||||
// <edit>
|
if (client.length() || is_away || is_muted || is_busy)
|
||||||
if(getTEImage(TEX_HEAD_BODYPAINT)->isMissingAsset())
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.f, 1.0f, 1.0f));
|
|
||||||
line += " (Unknown viewer)";
|
|
||||||
}
|
|
||||||
else if(isFullyLoaded() && !mIsSelf)
|
|
||||||
{
|
|
||||||
std::string uuid_str = getTE(0)->getID().asString();
|
|
||||||
|
|
||||||
if(uuid_str == "ccda2b3b-e72c-a112-e126-fee238b67218")
|
|
||||||
{
|
|
||||||
// textures other than head are 4934f1bf-3b1f-cf4f-dbdf-a72550d05bc6
|
|
||||||
mNameText->setColor(LLColor4(0.f, 1.0f, 0.0f));
|
|
||||||
line += " (Emerald)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "0bcd5f5d-a4ce-9ea4-f9e8-15132653b3d8")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.3f, 0.5f));
|
|
||||||
line += " (MoyMix)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "5855f37d-63e5-3918-1404-8ffa3820eb6d")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.3f, 0.5f));
|
|
||||||
line += " (MoyMix/B)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "9ba526b6-f43d-6b60-42de-ce62a25ee7fb")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.3f, 0.5f));
|
|
||||||
line += " (MoyMix/nolife)";
|
|
||||||
}
|
|
||||||
//else if(uuid_str == "abbca853-30ba-49c1-a1e7-2a5b9a70573f")
|
|
||||||
//{
|
|
||||||
// mNameText->setColor(LLColor4(0.5f, 0.75f, 1.0f));
|
|
||||||
// strcat(line, " (CryoLife/" + "A)");
|
|
||||||
//}
|
|
||||||
else if(uuid_str == "0f6723d2-5b23-6b58-08ab-308112b33786")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.5f, 0.75f, 1.0f));
|
|
||||||
line += " (CryoLife)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "2c9c1e0b-e5d1-263e-16b1-7fc6d169f3d6")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.5f, 0.75f, 1.0f));
|
|
||||||
line += " (Phoxy SL)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "c252d89d-6f7c-7d90-f430-d140d2e3fbbe")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.7f, 0.7f, 0.7f));
|
|
||||||
line += " (VLife)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "5aa5c70d-d787-571b-0495-4fc1bdef1500")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.f, 0.0f, 0.0f));
|
|
||||||
line += " (GridProxy/LordGregGreg)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "8183e823-c443-2142-6eb6-2ab763d4f81c")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.f, 1.f, 0.0f));
|
|
||||||
line += " (GridProxy/DayOh)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "f3fd74a6-fee7-4b2f-93ae-ddcb5991da04")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.0f, 1.0f));
|
|
||||||
line += " (PSL/A)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "77662f23-c77a-9b4d-5558-26b757b2144c")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.0f, 1.0f));
|
|
||||||
line += " (PSL/B)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "1c29480c-c608-df87-28bb-964fb64c5366")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.f, 1.0f, 1.0f));
|
|
||||||
line += " (Emerald/GEMINI)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "5262d71a-88f7-ef40-3b15-00ea148ab4b5")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.9f, 0.9f, 0.9f));
|
|
||||||
line += " (GEMINI Bot)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "adcbe893-7643-fd12-f61c-0b39717e2e32")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(1.0f, 0.5f, 0.4f));
|
|
||||||
line += " (tyk3n)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "f5a48821-9a98-d09e-8d6a-50cc08ba9a47")
|
|
||||||
{
|
|
||||||
mNameText->setColor(gColors.getColor( "AvatarNameColor" ));
|
|
||||||
line += " (NeilLife)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "cc7a030f-282f-c165-44d2-b5ee572e72bf")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4::purple);
|
|
||||||
line += " (Imprudence)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "c228d1cf-4b5d-4ba8-84f4-899a0796aa97")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.5f, 0.5f, 0.5f));
|
|
||||||
line += " (Viewer 2.0)";
|
|
||||||
}
|
|
||||||
else if(uuid_str == "380ae30b-f2c7-b07c-041e-5688e89a6fc1")
|
|
||||||
{
|
|
||||||
mNameText->setColor(LLColor4(0.65f, 0.93f, 0.14f));
|
|
||||||
line += " (Nano)";
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
|
||||||
avatar_name_color.setAlpha(1.f);
|
|
||||||
//llinfos << "Apparently this tag isn't registered: " << uuid_str << llendl;
|
|
||||||
mNameText->setColor(avatar_name_color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" );
|
|
||||||
avatar_name_color.setAlpha(1.f);
|
|
||||||
mNameText->setColor(avatar_name_color);
|
|
||||||
}
|
|
||||||
// </edit>
|
|
||||||
if (is_away || is_muted || is_busy)
|
|
||||||
{
|
{
|
||||||
line += " (";
|
line += " (";
|
||||||
|
if (client != "")
|
||||||
|
{
|
||||||
|
line += client;
|
||||||
|
need_comma = TRUE;
|
||||||
|
}
|
||||||
if (is_away)
|
if (is_away)
|
||||||
{
|
{
|
||||||
|
if (need_comma)
|
||||||
|
{
|
||||||
|
line += ", ";
|
||||||
|
}
|
||||||
line += "Away";
|
line += "Away";
|
||||||
need_comma = TRUE;
|
need_comma = TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,10 @@ public:
|
|||||||
|
|
||||||
static void updateImpostors();
|
static void updateImpostors();
|
||||||
|
|
||||||
|
// <edit>
|
||||||
|
void getClientTag(std::string& client, LLColor4& color, BOOL useComment = FALSE);
|
||||||
|
// </edit>
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
// LLViewerObject interface
|
// LLViewerObject interface
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
<column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)"/>
|
<column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)"/>
|
||||||
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
|
<column name="position" label="Pos." width="60" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims"/>
|
||||||
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
|
<column name="altitude" label="Alt." width="48" tool_tip="Altitude"/>
|
||||||
|
<column name="client" label="Client" width="80" dynamicwidth="true" tool_tip="Client the avatar is possibly using"/>
|
||||||
</scroll_list>
|
</scroll_list>
|
||||||
|
|
||||||
<tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false"
|
<tab_container border="false" bottom_delta="-130" height="120" left="6" mouse_opaque="false"
|
||||||
|
|||||||
@@ -118,6 +118,9 @@
|
|||||||
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
|
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
|
||||||
height="20" left_delta="64" max_length="32" mouse_opaque="true"
|
height="20" left_delta="64" max_length="32" mouse_opaque="true"
|
||||||
name="mac_edit" select_all_on_focus_received="true" width="230" enabled="false" font_size="Small" />
|
name="mac_edit" select_all_on_focus_received="true" width="230" enabled="false" font_size="Small" />
|
||||||
|
<button bottom_delta="0" follows="left|bottom" font="SansSerif" halign="center"
|
||||||
|
height="20" label="r" left_delta="235" mouse_opaque="true" name="mac_random_btn" scale_image="TRUE"
|
||||||
|
width="20" />
|
||||||
<check_box bottom="8" follows="left|bottom" font="SansSerifSmall" height="16"
|
<check_box bottom="8" follows="left|bottom" font="SansSerifSmall" height="16"
|
||||||
initial_value="false" label="ID0:" control_name="SpecifyID0"
|
initial_value="false" label="ID0:" control_name="SpecifyID0"
|
||||||
left="750" mouse_opaque="true" name="id0_check" width="138" font_size="Small" />
|
left="750" mouse_opaque="true" name="id0_check" width="138" font_size="Small" />
|
||||||
@@ -125,7 +128,10 @@
|
|||||||
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
|
follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
|
||||||
height="20" left_delta="64" max_length="32" mouse_opaque="true"
|
height="20" left_delta="64" max_length="32" mouse_opaque="true"
|
||||||
name="id0_edit" select_all_on_focus_received="true" width="230" enabled="false" font_size="Small" />
|
name="id0_edit" select_all_on_focus_received="true" width="230" enabled="false" font_size="Small" />
|
||||||
|
<button bottom_delta="0" follows="left|bottom" font="SansSerif" halign="center"
|
||||||
|
height="20" label="r" left_delta="235" mouse_opaque="true" name="id0_random_btn" scale_image="TRUE"
|
||||||
|
width="20" />
|
||||||
|
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom="54" drop_shadow_visible="true" follows="left|bottom"
|
bottom="54" drop_shadow_visible="true" follows="left|bottom"
|
||||||
font="SansSerif" h_pad="0" halign="left" height="16"
|
font="SansSerif" h_pad="0" halign="left" height="16"
|
||||||
|
|||||||
Reference in New Issue
Block a user