diff options
author | Josh Bell <josh@lindenlab.com> | 2007-09-13 18:17:52 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-09-13 18:17:52 +0000 |
commit | b3d807d5ff8dca6c891e9a5e0ddc7bc147d69f8c (patch) | |
tree | 8b94c90d06bcd0ed5d258ab1e8c5d67024683cab | |
parent | a5f3ac2a8dc9aee2c04f24c3b3304c1b24808acb (diff) |
svn merge -r 68690:69597 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-18-3-Viewer --> release
Merge patches made in the 1-18-3 RC iterations into the trunk.
NOTE: Includes the reversion of SL-51274 (originally maintenance r67559, changed lltracker.cpp)
-rw-r--r-- | doc/contributions.txt | 1 | ||||
-rw-r--r-- | indra/llcommon/lllslconstants.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llversionviewer.h | 4 | ||||
-rw-r--r-- | indra/llmath/llvolume.cpp | 43 | ||||
-rw-r--r-- | indra/llui/llspinctrl.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llspinctrl.h | 4 | ||||
-rw-r--r-- | indra/lscript/lscript_compile/indra.l | 2 | ||||
-rw-r--r-- | indra/lscript/lscript_library/lscript_library.cpp | 2 | ||||
-rw-r--r-- | indra/newview/English.lproj/InfoPlist.strings | 4 | ||||
-rw-r--r-- | indra/newview/Info-SecondLife.plist | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/keywords.ini | 2 | ||||
-rwxr-xr-x | indra/newview/linux_tools/wrapper.sh | 8 | ||||
-rw-r--r-- | indra/newview/llpanelgroupgeneral.cpp | 55 | ||||
-rw-r--r-- | indra/newview/llpanelgroupgeneral.h | 4 | ||||
-rw-r--r-- | indra/newview/lltracker.cpp | 51 |
15 files changed, 108 insertions, 81 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 1ce46e5755..723a60312b 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -191,6 +191,7 @@ Strife Onizuka VWR-74 VWR-85 VWR-148 + VWR-2265 tenebrous pau VWR-247 TBBle Kurosawa diff --git a/indra/llcommon/lllslconstants.h b/indra/llcommon/lllslconstants.h index 9f6ac1c521..8ca7260753 100644 --- a/indra/llcommon/lllslconstants.h +++ b/indra/llcommon/lllslconstants.h @@ -147,7 +147,7 @@ const S32 STRING_TRIM_TAIL = 0x02; const S32 STRING_TRIM = STRING_TRIM_HEAD | STRING_TRIM_TAIL; // llGetObjectDetails -const S32 OBJECT_UNKOWN_DETAIL = -1; +const S32 OBJECT_UNKNOWN_DETAIL = -1; const S32 OBJECT_NAME = 1; const S32 OBJECT_DESC = 2; const S32 OBJECT_POS = 3; diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 7edef268bd..c6405a1b01 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -11,8 +11,8 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 18; -const S32 LL_VERSION_PATCH = 2; -const S32 LL_VERSION_BUILD = 46464; +const S32 LL_VERSION_PATCH = 3; +const S32 LL_VERSION_BUILD = 3; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 06f1c5c6ea..ce5782e7f1 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -58,6 +58,11 @@ const F32 TAPER_MAX = 1.f; const F32 SKEW_MIN = -0.95f; const F32 SKEW_MAX = 0.95f; +const S32 SCULPT_REZ_1 = 6; // changed from 4 to 6 - 6 looks round whereas 4 looks square +const S32 SCULPT_REZ_2 = 8; +const S32 SCULPT_REZ_3 = 16; +const S32 SCULPT_REZ_4 = 32; + BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm) { LLVector3 test = (pt2-pt1)%(pt3-pt2); @@ -435,25 +440,27 @@ LLProfile::Face* LLProfile::addHole(BOOL flat, F32 sides, F32 offset, F32 box_ho } -F32 next_power_of_two(F32 value) -{ - S32 power = (S32)llceil((F32)log((double)value)/(F32)log(2.0)); - return pow(2.0f, power); -} - -F32 nearest_power_of_two(F32 value) +S32 sculpt_sides(F32 detail) { - // nearest in the linear sense means closest w/r/t a "halfway" point. - // in the exponential sense, the "halfway" point isn't 1/2, it's 1/sqrt(2). - // our windows build hates the math.h defines, so do it here. -qarl - F32 const INVSQRT2 = 0.7071067812f; + // detail is usually one of: 1, 1.5, 2.5, 4.0. - F32 answer = next_power_of_two(value * INVSQRT2); - - // llwarns << value << " -> " << answer << llendl; - - return answer; + if (detail <= 1.0) + { + return SCULPT_REZ_1; + } + if (detail <= 2.0) + { + return SCULPT_REZ_2; + } + if (detail <= 3.0) + { + return SCULPT_REZ_3; + } + else + { + return SCULPT_REZ_4; + } } @@ -599,7 +606,7 @@ BOOL LLProfile::generate(BOOL path_open,F32 detail, S32 split, BOOL is_sculpted) S32 sides = (S32)circle_detail; if (is_sculpted) - sides = (S32)nearest_power_of_two((F32)sides - 1); + sides = sculpt_sides(detail); genNGon(sides); @@ -1146,7 +1153,7 @@ BOOL LLPath::generate(F32 detail, S32 split, BOOL is_sculpted) S32 sides = (S32)llfloor(llfloor((MIN_DETAIL_FACES * detail + twist_mag * 3.5f * (detail-0.5f))) * mParams.getRevolutions()); if (is_sculpted) - sides = (S32)nearest_power_of_two((F32)sides - 1); + sides = sculpt_sides(detail); genNGon(sides); } diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 34363eb506..178400594a 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -527,3 +527,8 @@ LLView* LLSpinCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory * return spinner; } + +BOOL LLSpinCtrl::isDirty() const +{ + return( mValue != mInitialValue ); +} diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 4fe1a26f5d..981cf0def5 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -56,7 +56,7 @@ public: virtual void setValue(const LLSD& value ); virtual LLSD getValue() const; F32 get() { return (F32)getValue().asReal(); } - void set(F32 value) { setValue(value); } + void set(F32 value) { setValue(value); mInitialValue = value; } virtual void setMinValue(LLSD min_value) { setMinValue((F32)min_value.asReal()); } virtual void setMaxValue(LLSD max_value) { setMaxValue((F32)max_value.asReal()); } @@ -66,6 +66,8 @@ public: virtual void setEnabled( BOOL b ); virtual void setFocus( BOOL b ); virtual void clear(); + virtual BOOL isDirty() const; + virtual void setPrecision(S32 precision); virtual void setMinValue(F32 min) { mMinValue = min; } virtual void setMaxValue(F32 max) { mMaxValue = max; } diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 94cb196aea..a8fbcbe260 100644 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -227,7 +227,7 @@ extern "C" { int yyerror(const char *fmt, ...); } "CHANGED_REGION" { count(); yylval.ival = 0x100; return(INTEGER_CONSTANT); } "CHANGED_TELEPORT" { count(); yylval.ival = 0x200; return(INTEGER_CONSTANT); } -"OBJECT_UNKOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKOWN_DETAIL; return(INTEGER_CONSTANT); } +"OBJECT_UNKNOWN_DETAIL" { count(); yylval.ival = OBJECT_UNKNOWN_DETAIL; return(INTEGER_CONSTANT); } "OBJECT_NAME" { count(); yylval.ival = OBJECT_NAME; return(INTEGER_CONSTANT); } "OBJECT_DESC" { count(); yylval.ival = OBJECT_DESC; return(INTEGER_CONSTANT); } "OBJECT_POS" { count(); yylval.ival = OBJECT_POS; return(INTEGER_CONSTANT); } diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp index f3a5e95169..c3272566cd 100644 --- a/indra/lscript/lscript_library/lscript_library.cpp +++ b/indra/lscript/lscript_library/lscript_library.cpp @@ -406,7 +406,7 @@ void LLScriptLibrary::init() addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL.")); addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llRegionSay", NULL, "is", "llRegionSay(integer channel, string msg)\nbroadcasts msg to entire region on channel (not 0.)")); - addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_DETAILS_NAME, _DESCRIPTION, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR.")); + addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetObjectDetails", "l", "kl", "list llGetObjectDetails(key id, list params)\nGets the object details specified in params for the object with key id.\nDetails are OBJECT_NAME, _DESC, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR.")); // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index e3ef269a68..0b95b39824 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -1,5 +1,5 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 1.18.2.46464"; -CFBundleGetInfoString = "Second Life version 1.18.2.46464, Copyright 2004-2007 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 1.18.3.3"; +CFBundleGetInfoString = "Second Life version 1.18.3.3, Copyright 2004-2007 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 3c7d18078b..e1e04be477 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>1.18.2.46464</string> + <string>1.18.3.3</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 4496ee746f..5a68c5b163 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -149,7 +149,7 @@ PSYS_SRC_PATTERN_ANGLE PSYS_SRC_PATTERN_ANGLE_CONE PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY -OBJECT_UNKOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type. +OBJECT_UNKNOWN_DETAIL Returned by llGetObjectDetails when passed an invalid object parameter type. OBJECT_NAME Used with llGetObjectDetails to get an object's name. OBJECT_DESC Used with llGetObjectDetails to get an object's description. OBJECT_POS Used with llGetObjectDetails to get an object's position. diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 2a57b66883..fd15f215c4 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -38,6 +38,7 @@ export LL_GL_BASICEXT=x ## you're building your own viewer, bear in mind that the executable ## in the bin directory will be stripped: you should replace it with ## an unstripped binary before you run. +#export LL_WRAPPER='gdb --args' #export LL_WRAPPER='valgrind --smc-check=all --log-file=secondlife.vg --leak-check=full --suppressions=/usr/lib/valgrind/glibc-2.5.supp --suppressions=secondlife-i686.supp' ## - Avoids an often-buggy X feature that doesn't really benefit us anyway. @@ -68,7 +69,12 @@ if [ -n "$LL_TCMALLOC" ]; then fi fi fi -LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}" $LL_WRAPPER bin/do-not-directly-run-secondlife-bin `cat gridargs.dat` $@ | cat + +export SL_ENV='LD_LIBRARY_PATH="`pwd`"/lib:"`pwd`"/app_settings/mozilla-runtime-linux-i686:"${LD_LIBRARY_PATH}"' +export SL_CMD='$LL_WRAPPER bin/do-not-directly-run-secondlife-bin' +export SL_OPT="`cat gridargs.dat` $@" + +eval ${SL_ENV} ${SL_CMD} ${SL_OPT} || echo Unclean shutdown. echo echo '*********************************************************' diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 944251ac07..9139b01e0f 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -160,6 +160,7 @@ BOOL LLPanelGroupGeneral::postBuild() { mSpinEnrollmentFee->setCommitCallback(onCommitAny); mSpinEnrollmentFee->setCallbackUserData(this); + mSpinEnrollmentFee->setPrecision(0); } BOOL accept_notices = FALSE; @@ -473,6 +474,8 @@ bool LLPanelGroupGeneral::apply(LLString& mesg) { gdatap->mMembershipFee = (mCtrlEnrollmentFee->get()) ? (S32) mSpinEnrollmentFee->get() : 0; + // Set to the used value, and reset initial value used for isdirty check + mSpinEnrollmentFee->set( (F32)gdatap->mMembershipFee ); } } @@ -494,6 +497,8 @@ bool LLPanelGroupGeneral::apply(LLString& mesg) mChanged = FALSE; notifyObservers(); + notifyObservers(); + return true; } @@ -792,28 +797,32 @@ void LLPanelGroupGeneral::updateMembers() void LLPanelGroupGeneral::updateChanged() { + // List all the controls we want to check for changes... + LLUICtrl *check_list[] = + { + mGroupNameEditor, + mGroupName, + mFounderName, + mInsignia, + mEditCharter, + mCtrlShowInGroupList, + mCtrlMature, + mCtrlOpenEnrollment, + mCtrlEnrollmentFee, + mSpinEnrollmentFee, + mCtrlReceiveNotices, + mCtrlListGroup, + mComboActiveTitle + }; + mChanged = FALSE; - if ( mGroupNameEditor ) - mChanged = mGroupNameEditor->isDirty(); - if ( mGroupName ) - mChanged |= mGroupName->isDirty(); - if ( mFounderName ) - mChanged |= mFounderName->isDirty(); - if ( mInsignia ) - mChanged |= mInsignia->isDirty(); - if ( mEditCharter ) - mChanged |= mEditCharter->isDirty(); - if ( mCtrlShowInGroupList) - mChanged |= mCtrlShowInGroupList->isDirty(); - if ( mCtrlMature) - mChanged |= mCtrlMature->isDirty(); - if ( mCtrlOpenEnrollment) - mChanged |= mCtrlOpenEnrollment->isDirty(); - if ( mCtrlEnrollmentFee) - mChanged |= mCtrlEnrollmentFee->isDirty(); - if ( mSpinEnrollmentFee) - mChanged |= mSpinEnrollmentFee->isDirty(); -// if ( mCtrlReceiveNotices ) // "Receive group notices" is different, see onReceiveNotices() -// mChanged |= mCtrlReceiveNotices->isDirty(); -} + for( int i= 0; i< sizeof(check_list)/sizeof(*check_list); i++ ) + { + if( check_list[i] && check_list[i]->isDirty() ) + { + mChanged = TRUE; + break; + } + } +} diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index a8f10b04ef..29a913d198 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -64,7 +64,7 @@ private: std::string mConfirmGroupCreateStr; LLUUID mDefaultIconID; - // Group information + // Group information (include any updates in updateChanged) LLLineEditor *mGroupNameEditor; LLTextBox *mGroupName; LLNameBox *mFounderName; @@ -75,7 +75,7 @@ private: LLNameListCtrl *mListVisibleMembers; - // Options + // Options (include any updates in updateChanged) LLCheckBoxCtrl *mCtrlShowInGroupList; LLCheckBoxCtrl *mCtrlMature; LLCheckBoxCtrl *mCtrlOpenEnrollment; diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 4166cc16fe..42ef25ac4e 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -87,6 +87,15 @@ void LLTracker::stopTracking(void* userdata) // static virtual void LLTracker::drawHUDArrow() { + /* tracking autopilot destination has been disabled + -- 2004.01.09, Leviathan + // Draw dot for autopilot target + if (gAgent.getAutoPilot()) + { + instance()->drawMarker( gAgent.getAutoPilotTargetGlobal(), gTrackColor ); + return; + } + */ switch (getTrackingStatus()) { case TRACKING_AVATAR: @@ -450,6 +459,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, if (dist > 0.99f * gCamera->getFar()) { color_frac = 0.4f; + // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(gCamera->getFar()/dist)*to_vec; } else { @@ -474,6 +484,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global, draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color); + //glScalef(1.f, 1.f, 1000.f); glColor4fv(fogged_color.mV); const U32 BEACON_VERTS = 256; const F32 step = 1024.0f/BEACON_VERTS; @@ -523,30 +534,24 @@ void LLTracker::renderBeacon(LLVector3d pos_global, glEnd(); } + //gCylinder.render(1000); glPopMatrix(); - if (!gCamera || to_vec.magVec() > gCamera->getFar()) - { - hud_textp->clearString(); - } - else - { - char text[1024]; /* Flawfinder: ignore */ - snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */ + char text[1024]; /* Flawfinder: ignore */ + snprintf(text, sizeof(text), "%.0f m", to_vec.magVec()); /* Flawfinder: ignore */ - LLWString wstr; - wstr += utf8str_to_wstring(label); - wstr += '\n'; - wstr += utf8str_to_wstring(text); + LLWString wstr; + wstr += utf8str_to_wstring(label); + wstr += '\n'; + wstr += utf8str_to_wstring(text); - hud_textp->setFont(LLFontGL::sSansSerif); - hud_textp->setZCompare(FALSE); - hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); + hud_textp->setFont(LLFontGL::sSansSerif); + hud_textp->setZCompare(FALSE); + hud_textp->setColor(LLColor4(1.f, 1.f, 1.f, llmax(0.2f, llmin(1.f,(dist-FADE_DIST)/FADE_DIST)))); - hud_textp->setString(wstr); - hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER); - hud_textp->setPositionAgent(pos_agent); - } + hud_textp->setString(wstr); + hud_textp->setVertAlignment(LLHUDText::ALIGN_VERT_CENTER); + hud_textp->setPositionAgent(pos_agent); } @@ -618,14 +623,6 @@ void LLTracker::drawMarker(const LLVector3d& pos_global, const LLColor4& color) return; } - LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal(); - to_vec.mdV[2] = 0; - - if (to_vec.magVec() > gCamera->getFar()) - { //only draw arrow if lateral distance to object is less than view distance. - return; - } - // get position LLVector3 pos_local = gAgent.getPosAgentFromGlobal(pos_global); |