Collection of minor edits from Imprudence to fix bugs, etcetera. Also updated the version.

Also made the version almost entirely hard-coded to remove any remnants of Inertia's spoofer.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-21 14:49:46 -04:00
parent 64abd1889f
commit 2faa13a37b
19 changed files with 69 additions and 37 deletions

View File

@@ -276,6 +276,7 @@ protected:
U32 mAppearanceSerialNum; U32 mAppearanceSerialNum;
U32 mSkeletonSerialNum; U32 mSkeletonSerialNum;
LLAnimPauseRequest mPauseRequest; LLAnimPauseRequest mPauseRequest;
BOOL mInAppearance; BOOL mInAppearance;
private: private:

View File

@@ -40,7 +40,6 @@
#include "llhandmotion.h" #include "llhandmotion.h"
#include "llcriticaldamp.h" #include "llcriticaldamp.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Constants // Constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -507,6 +507,20 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
vergence_quat.transQuat(); vergence_quat.transQuat();
right_eye_rot = vergence_quat * eye_jitter_rot * right_eye_rot; right_eye_rot = vergence_quat * eye_jitter_rot * right_eye_rot;
//if in appearance, set the eyes straight forward
if(mCharacter->getAppearanceFlag()) // no idea why this variable is reversed
{
LLVector3 forward(1.f, 0.0, 0.0);
LLVector3 left;
LLVector3 up;
left.setVec(forward % forward);
up.setVec(forward % left);
target_eye_rot = LLQuaternion(forward, left, up);
mLeftEyeState->setRotation( target_eye_rot );
mRightEyeState->setRotation( target_eye_rot );
return TRUE;
}
mLeftEyeState->setRotation( left_eye_rot ); mLeftEyeState->setRotation( left_eye_rot );
mRightEyeState->setRotation( right_eye_rot ); mRightEyeState->setRotation( right_eye_rot );

View File

@@ -43,7 +43,8 @@ typedef enum e_chat_source_type
{ {
CHAT_SOURCE_SYSTEM = 0, CHAT_SOURCE_SYSTEM = 0,
CHAT_SOURCE_AGENT = 1, CHAT_SOURCE_AGENT = 1,
CHAT_SOURCE_OBJECT = 2 CHAT_SOURCE_OBJECT = 2,
CHAT_SOURCE_OBJECT_IM = 3
} EChatSourceType; } EChatSourceType;
typedef enum e_chat_type typedef enum e_chat_type

View File

@@ -74,3 +74,9 @@ void LLMortician::setZealous(BOOL b)
{ {
sDestroyImmediate = b; sDestroyImmediate = b;
} }
// static
BOOL LLMortician::getZealous()
{
return sDestroyImmediate;
}

View File

@@ -46,6 +46,7 @@ public:
// sets destroy immediate true // sets destroy immediate true
static void setZealous(BOOL b); static void setZealous(BOOL b);
static BOOL getZealous();
private: private:
static BOOL sDestroyImmediate; static BOOL sDestroyImmediate;

View File

@@ -36,7 +36,7 @@
const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MAJOR = 1;
const S32 LL_VERSION_MINOR = 4; const S32 LL_VERSION_MINOR = 4;
const S32 LL_VERSION_PATCH = 2; const S32 LL_VERSION_PATCH = 2;
const S32 LL_VERSION_BUILD = 6; const S32 LL_VERSION_BUILD = 7;
const char * const LL_CHANNEL = "Ascent Viewer Release"; const char * const LL_CHANNEL = "Ascent Viewer Release";

View File

@@ -154,7 +154,7 @@ U8* LLImageBase::allocateData(S32 size)
size = mWidth * mHeight * mComponents; size = mWidth * mHeight * mComponents;
if (size <= 0) if (size <= 0)
{ {
llerrs << llformat("LLImageBase::allocateData called with bad dimentions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl; llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl;
} }
} }
else if (size <= 0 || (size > 4096*4096*16 && sSizeOverride == FALSE)) else if (size <= 0 || (size > 4096*4096*16 && sSizeOverride == FALSE))
@@ -659,6 +659,12 @@ void LLImageRaw::fill( const LLColor4U& color )
// Src and dst can be any size. Src and dst can each have 3 or 4 components. // Src and dst can be any size. Src and dst can each have 3 or 4 components.
void LLImageRaw::copy(LLImageRaw* src) void LLImageRaw::copy(LLImageRaw* src)
{ {
if (!src)
{
llwarns << "LLImageRaw::copy called with a null src pointer" << llendl;
return;
}
LLImageRaw* dst = this; // Just for clarity. LLImageRaw* dst = this; // Just for clarity.
llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); llassert( (3 == src->getComponents()) || (4 == src->getComponents()) );
@@ -839,6 +845,7 @@ BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{ {
// Vertical // Vertical
S32 temp_data_size = old_width * new_height * getComponents(); S32 temp_data_size = old_width * new_height * getComponents();
llassert_always(temp_data_size > 0);
U8* temp_buffer = new U8[ temp_data_size ]; U8* temp_buffer = new U8[ temp_data_size ];
for( S32 col = 0; col < old_width; col++ ) for( S32 col = 0; col < old_width; col++ )
{ {

View File

@@ -99,7 +99,7 @@ void info_callback(const char* msg, void*)
LLImageJ2COJ::LLImageJ2COJ() : LLImageJ2CImpl() LLImageJ2COJ::LLImageJ2COJ() : LLImageJ2CImpl()
{ {
mRawImagep=NULL; mRawImagep=NULL;
} }
@@ -466,7 +466,7 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
/* open a byte stream */ /* open a byte stream */
cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize()); cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize());
/* decode the stream and fill the image structure */ /* decode the stream and fill the image structure */
if (!cio) return FALSE; if (!cio) return FALSE;
if (cio->bp == NULL) return FALSE; if (cio->bp == NULL) return FALSE;

View File

@@ -1018,6 +1018,7 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
default: default:
LL_DEBUGS("Openjpeg") << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL; LL_DEBUGS("Openjpeg") << "Bad number of components for texture: " << (U32)getComponents() << LL_ENDL;
to_create = false; to_create = false;
break;
} }
} }

View File

@@ -110,7 +110,7 @@ public:
BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE); BOOL setSubImage(const LLImageRaw* imageraw, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE);
BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE); BOOL setSubImage(const U8* datap, S32 data_width, S32 data_height, S32 x_pos, S32 y_pos, S32 width, S32 height, BOOL force_fast_update = FALSE);
BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height); BOOL setSubImageFromFrameBuffer(S32 fb_x, S32 fb_y, S32 x_pos, S32 y_pos, S32 width, S32 height);
// Read back a raw image for this discard level, if it exists // Read back a raw image for this discard level, if it exists
BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok); BOOL readBackRaw(S32 discard_level, LLImageRaw* imageraw, bool compressed_ok);
void destroyGLTexture(); void destroyGLTexture();

View File

@@ -16,7 +16,7 @@
* may be used to endorse or promote products derived from this * may be used to endorse or promote products derived from this
* software without specific prior written permission. * software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS <EFBFBD>AS IS<EFBFBD> * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS LTD AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS
@@ -55,7 +55,7 @@ std::string JCFloaterAreaSearch::sSearchedGroup;
const std::string request_string = "JCFloaterAreaSearch::Requested_<64><5F><EFBFBD>"; const std::string request_string = "JCFloaterAreaSearch::Requested_<64><5F><EFBFBD>";
const F32 min_refresh_interval = 0.25f; // Minimum interval between list refreshes in seconds. const F32 min_refresh_interval = 0.25f; // Minimum interval between list refreshes in seconds.
JCFloaterAreaSearch::JCFloaterAreaSearch() : JCFloaterAreaSearch::JCFloaterAreaSearch() :
LLFloater(), LLFloater(),
mCounterText(0), mCounterText(0),
mResultList(0) mResultList(0)
@@ -149,7 +149,7 @@ void JCFloaterAreaSearch::toggle()
void JCFloaterAreaSearch::onDoubleClick(void *userdata) void JCFloaterAreaSearch::onDoubleClick(void *userdata)
{ {
JCFloaterAreaSearch *self = (JCFloaterAreaSearch*)userdata; JCFloaterAreaSearch *self = (JCFloaterAreaSearch*)userdata;
LLScrollListItem *item = self->mResultList->getFirstSelected(); LLScrollListItem *item = self->mResultList->getFirstSelected();
if (!item) return; if (!item) return;
LLUUID object_id = item->getUUID(); LLUUID object_id = item->getUUID();
LLViewerObject* objectp = gObjectList.findObject(object_id); LLViewerObject* objectp = gObjectList.findObject(object_id);

View File

@@ -966,14 +966,12 @@ void LLPanelLogin::loadLoginPage()
oStr << "&firstlogin=TRUE"; oStr << "&firstlogin=TRUE";
} }
// <edit>
// Channel and Version
std::string version = llformat("%d.%d.%d (%d)", std::string version = llformat("%d.%d.%d (%d)",
LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD); LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD);
//char* curl_channel = curl_escape(LL_CHANNEL.c_str(), 0); char* curl_channel = curl_escape(LL_CHANNEL, 0);
char* curl_channel = curl_escape(gSavedSettings.getString("SpecifiedChannel").c_str(), 0);
// </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;

View File

@@ -65,7 +65,7 @@ void LLTranslate::translateMessage(LLHTTPClient::ResponderPtr &result, const std
//<edit> //<edit>
std::string user_agent = llformat("%s %d.%d.%d (%d)", std::string user_agent = llformat("%s %d.%d.%d (%d)",
gSavedSettings.getString("SpecifiedChannel").c_str(), LL_CHANNEL,
LL_VERSION_MAJOR, LL_VERSION_MAJOR,
LL_VERSION_MINOR, LL_VERSION_MINOR,
LL_VERSION_PATCH, LL_VERSION_PATCH,

View File

@@ -137,15 +137,15 @@ void LLUserAuth::authenticate(
//WOW NEIL YOU ARE SO AWESOME!! //WOW NEIL YOU ARE SO AWESOME!!
XMLRPC_VectorAppendString(params, "version", std::string( XMLRPC_VectorAppendString(params, "version", std::string(
gSavedSettings.getString("SpecifiedChannel") + " " + llformat("%s", LL_CHANNEL) + " " +
llformat("%d", LL_VERSION_MAJOR) + "." + llformat("%d", LL_VERSION_MAJOR) + "." +
llformat("%d", LL_VERSION_MINOR) + "." + llformat("%d", LL_VERSION_MINOR) + "." +
llformat("%d", LL_VERSION_PATCH) + "." + llformat("%d", LL_VERSION_PATCH) + "." +
llformat("%d", LL_VERSION_BUILD) llformat("%d", LL_VERSION_BUILD)
).c_str(), 0); // Includes channel name ).c_str(), 0); // Includes channel name
XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); XMLRPC_VectorAppendString(params, "channel", std::string(LL_CHANNEL).c_str(), 0);
// </edit>
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);
@@ -232,22 +232,18 @@ void LLUserAuth::authenticate(
XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0); XMLRPC_VectorAppendString(params, "last", lastname.c_str(), 0);
XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0); XMLRPC_VectorAppendString(params, "passwd", dpasswd.c_str(), 0);
XMLRPC_VectorAppendString(params, "start", start.c_str(), 0); XMLRPC_VectorAppendString(params, "start", start.c_str(), 0);
// <edit> //Partially correct but I'm very skeptical of the gSavedSettings part. Imprudence does it, but that doesn't mean it's right... -HgB
//XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name //XMLRPC_VectorAppendString(params, "version", gCurrentVersion.c_str(), 0); // Includes channel name
//XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0); //XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("VersionChannelName").c_str(), 0);
//WOW NEIL YOU ARE SO AWESOME!!
XMLRPC_VectorAppendString(params, "version", std::string( XMLRPC_VectorAppendString(params, "version", std::string(
gSavedSettings.getString("SpecifiedChannel") + " " + llformat("%s", LL_CHANNEL) + " " +
llformat("%d", LL_VERSION_MAJOR) + "." + llformat("%d", LL_VERSION_MAJOR) + "." +
llformat("%d", LL_VERSION_MINOR) + "." + llformat("%d", LL_VERSION_MINOR) + "." +
llformat("%d", LL_VERSION_PATCH) + "." + llformat("%d", LL_VERSION_PATCH) + "." +
llformat("%d", LL_VERSION_BUILD) llformat("%d", LL_VERSION_BUILD)
).c_str(), 0); // Includes channel name ).c_str(), 0); // Includes channel name
XMLRPC_VectorAppendString(params, "channel", gSavedSettings.getString("SpecifiedChannel").c_str(), 0); XMLRPC_VectorAppendString(params, "channel", std::string(LL_CHANNEL).c_str(), 0);
// </edit>
XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0); XMLRPC_VectorAppendString(params, "platform", PLATFORM_STRING, 0);
XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0); XMLRPC_VectorAppendString(params, "mac", hashed_mac.c_str(), 0);

View File

@@ -1565,7 +1565,7 @@ if(dialog == IM_TYPING_START
if( do_auto_response ) if( do_auto_response )
{ {
if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) || if((dialog == IM_NOTHING_SPECIAL && !is_auto_response) ||
(dialog == IM_TYPING_START && gSavedPerAccountSettings.getBOOL("AscentInstantMessageShowOnTyping")) (dialog == IM_TYPING_START && gSavedPerAccountSettings.getBOOL("AscentInstantMessageAnnounceIncoming"))
) )
{ {
BOOL has = gIMMgr->hasSession(computed_session_id); BOOL has = gIMMgr->hasSession(computed_session_id);
@@ -2137,7 +2137,18 @@ if(dialog == IM_TYPING_START
position, position,
true); true);
chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); std::string prepend_msg;
if (gAgent.isInGroup(session_id)&& gSavedSettings.getBOOL("OptionShowGroupNameInChatIM"))
{
prepend_msg = "[";
prepend_msg += std::string((char*)binary_bucket);
prepend_msg += "] ";
}
else
{
prepend_msg = std::string("IM: ");
}
chat.mText = prepend_msg + name + separator_string + saved + message.substr(message_offset);
LLFloaterChat::addChat(chat, TRUE, is_this_agent); LLFloaterChat::addChat(chat, TRUE, is_this_agent);
} }
break; break;

View File

@@ -647,9 +647,9 @@ public:
*/ */
void send_stats() void send_stats()
{ {
// <edit> Don't want to send ViewerStats // <edit> Don't want to send ViewerStats
if(1) return; if(1) return;
// </edit> // </edit>
// IW 9/23/02 I elected not to move this into LLViewerStats // IW 9/23/02 I elected not to move this into LLViewerStats
// because it depends on too many viewer.cpp globals. // because it depends on too many viewer.cpp globals.
// Someday we may want to merge all our stats into a central place // Someday we may want to merge all our stats into a central place
@@ -695,10 +695,7 @@ void send_stats()
// send fps only for time app spends in foreground // send fps only for time app spends in foreground
agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32();
// <edit> agent["version"] = gCurrentVersion;
//agent["version"] = gCurrentVersion;
agent["version"] = gSavedSettings.getString("SpecifiedChannel");
// </edit>
std::string language = LLUI::getLanguage(); std::string language = LLUI::getLanguage();
agent["language"] = language; agent["language"] = language;

View File

@@ -4846,7 +4846,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable)
void LLPipeline::resetVertexBuffers() void LLPipeline::resetVertexBuffers()
{ {
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter) iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{ {

View File

@@ -18,7 +18,7 @@
width="420"> width="420">
<button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20" <button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20"
label="New IM" label_selected="New IM" left="0" label="New IM" label_selected="New IM" left="0"
name="IM Received" scale_image="true" name="New IM" scale_image="true"
tool_tip="You have an instant message pending. Click to show IMs." tool_tip="You have an instant message pending. Click to show IMs."
width="102" /> width="102" />
<button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20" <button bottom="1" follows="left|bottom" font="SansSerif" halign="center" height="20"