Merge branch 'master' of git://github.com/Shyotl/SingularityViewer

Conflicts:
	indra/newview/llvoavatar.cpp
This commit is contained in:
Lirusaito
2012-02-01 11:24:45 -05:00
9 changed files with 122 additions and 78 deletions

View File

@@ -2766,6 +2766,11 @@ bool idle_startup()
LL_DEBUGS("AppInit") << "Initialization complete" << LL_ENDL;
gRenderStartTime.reset();
// We're not allowed to call reset() when paused, and we might or might not be paused depending on
// whether or not the main window lost focus before we get here (see LLViewerWindow::handleFocusLost).
// The simplest, legal way to make sure we're unpaused is to just pause/unpause here.
gForegroundTime.pause();
gForegroundTime.unpause();
gForegroundTime.reset();
if (gSavedSettings.getBOOL("FetchInventoryOnLogin")

View File

@@ -402,7 +402,7 @@ void LLTexLayerSetBuffer::readBackAndUpload()
BOOL valid = FALSE;
LLPointer<LLImageJ2C> integrity_test = new LLImageJ2C;
S32 file_size = 0;
U8* data = LLVFile::readFile(gVFS, asset_id, LLAssetType::AT_TEXTURE, &file_size);
U8* data = LLVFile::readFile(gVFS, LLImageBase::getPrivatePool(), asset_id, LLAssetType::AT_TEXTURE, &file_size);
if (data)
{
valid = integrity_test->validate(data, file_size); // integrity_test will delete 'data'

View File

@@ -3258,6 +3258,29 @@ void LLVOAvatar::getClientInfo(std::string& client, LLColor4& color, BOOL useCom
return;
std::string uuid_str = getTE(TEX_HEAD_BODYPAINT)->getID().asString(); //UUID of the head texture
if(isFullyLoaded())
{
//Zwagoth's new client identification - HgB
// Overwrite the current tag/color settings if new method
// exists -- charbl.
const LLTextureEntry* texentry = getTE(0);
if(texentry->getGlow() > 0.0)
{
///llinfos << "Using new client identifier." << llendl;
U8 tag_buffer[UUID_BYTES+1];
memset(&tag_buffer, 0, UUID_BYTES);
memcpy(&tag_buffer[0], &texentry->getID().mData, UUID_BYTES);
tag_buffer[UUID_BYTES] = 0;
U32 tag_len = strlen((const char*)&tag_buffer[0]);
tag_len = (tag_len>UUID_BYTES) ? (UUID_BYTES) : tag_len;
client = std::string((char*)&tag_buffer[0], tag_len);
LLStringFn::replace_ascii_controlchars(mClientTag, LL_UNKNOWN_CHAR);
mNameString.clear();
color = texentry->getColor();
return;
}
}
static const LLCachedControl<LLColor4> avatar_name_color(gColors,"AvatarNameColor",LLColor4(LLColor4U(251, 175, 93, 255)) );
if (isSelf())
{
@@ -3553,38 +3576,15 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
static const LLCachedControl<LLColor4> avatar_name_color(gColors, "AvatarNameColor" );
//As pointed out by Zwagoth, we really shouldn't be doing this per-frame. Skip if we already have the data. -HgB
if (mClientTag == "")
{
mClientColor = avatar_name_color;
if(isFullyLoaded())
getClientInfo(mClientTag,mClientColor);
if(mClientTag == "")
{
//Zwagoth's new client identification - HgB
// Overwrite the current tag/color settings if new method
// exists -- charbl.
const LLTextureEntry* texentry = getTE(0);
if(texentry->getGlow() > 0.0)
{
llinfos << "Using new client identifier." << llendl;
U8 tag_buffer[UUID_BYTES+1];
memset(&tag_buffer, 0, UUID_BYTES);
memcpy(&tag_buffer[0], &texentry->getID().mData, UUID_BYTES);
tag_buffer[UUID_BYTES] = 0;
U32 tag_len = strlen((const char*)&tag_buffer[0]);
tag_len = (tag_len>UUID_BYTES) ? (UUID_BYTES) : tag_len;
mClientTag = std::string((char*)&tag_buffer[0], tag_len);
LLStringFn::replace_ascii_controlchars(mClientTag, LL_UNKNOWN_CHAR);
mNameString.clear();
mClientColor = texentry->getColor();
}
else
{
//llinfos << "Using Emerald-style client identifier." << llendl;
//The old client identification. Used only if the new method doesn't exist, so that it isn't automatically overwritten. -HgB
getClientInfo(mClientTag,mClientColor);
if(mClientTag == "")
client = "?"; //prevent console spam..
}
client = "?"; //prevent console spam..
}
// Overwrite the tag/color shit yet again if we want to see