diff options
author | McCabe Maxsted | 2011-06-08 09:37:06 -0700 |
---|---|---|
committer | Jacek Antonelli | 2011-06-09 23:11:58 -0500 |
commit | 231e9eee263a042459d4d0c13343656e2dcfea3f (patch) | |
tree | 08b85cd604a232943225b2a9bea4cd06fa05f4e6 /linden/indra | |
parent | Added copy group link button to create clickable links to groups in the viewer (diff) | |
download | meta-impy-231e9eee263a042459d4d0c13343656e2dcfea3f.zip meta-impy-231e9eee263a042459d4d0c13343656e2dcfea3f.tar.gz meta-impy-231e9eee263a042459d4d0c13343656e2dcfea3f.tar.bz2 meta-impy-231e9eee263a042459d4d0c13343656e2dcfea3f.tar.xz |
Removed debug setting MaxSelectDistance...
... in favor of setting the select distance differently between
opensim and second life in the hippo limits
(cherry picked from commit 2545b11e06538010bd5ddb46499920a43889ed0f)
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/hippolimits.cpp | 5 | ||||
-rw-r--r-- | linden/indra/newview/hippolimits.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/llglsandbox.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/llmaniprotate.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llmanipscale.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llmaniptranslate.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llselectmgr.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/lltoolplacer.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewercamera.cpp | 4 |
10 files changed, 25 insertions, 21 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 57c2065..2c5d858 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -8188,17 +8188,6 @@ | |||
8188 | <key>Value</key> | 8188 | <key>Value</key> |
8189 | <real>48.0</real> | 8189 | <real>48.0</real> |
8190 | </map> | 8190 | </map> |
8191 | <key>MaxSelectDistance</key> | ||
8192 | <map> | ||
8193 | <key>Comment</key> | ||
8194 | <string>Maximum allowed selection distance (meters from avatar)</string> | ||
8195 | <key>Persist</key> | ||
8196 | <integer>1</integer> | ||
8197 | <key>Type</key> | ||
8198 | <string>F32</string> | ||
8199 | <key>Value</key> | ||
8200 | <real>64.0</real> | ||
8201 | </map> | ||
8202 | <key>MeanCollisionBump</key> | 8191 | <key>MeanCollisionBump</key> |
8203 | <map> | 8192 | <map> |
8204 | <key>Comment</key> | 8193 | <key>Comment</key> |
diff --git a/linden/indra/newview/hippolimits.cpp b/linden/indra/newview/hippolimits.cpp index 2990a45..2c581ae 100644 --- a/linden/indra/newview/hippolimits.cpp +++ b/linden/indra/newview/hippolimits.cpp | |||
@@ -24,7 +24,8 @@ HippoLimits::HippoLimits() | |||
24 | mMaxPrimScale(256.0f), | 24 | mMaxPrimScale(256.0f), |
25 | mMaxLinkedPrims(-1), | 25 | mMaxLinkedPrims(-1), |
26 | mMaxDragDistance(0.f), | 26 | mMaxDragDistance(0.f), |
27 | mVoiceConnector("SLVoice") | 27 | mVoiceConnector("SLVoice"), |
28 | mMaxSelectDistance(64.0f) | ||
28 | { | 29 | { |
29 | setLimits(); | 30 | setLimits(); |
30 | } | 31 | } |
@@ -71,6 +72,7 @@ void HippoLimits::setOpenSimLimits() | |||
71 | mEnforceMaxBuild = FALSE; | 72 | mEnforceMaxBuild = FALSE; |
72 | mRenderWater = TRUE; | 73 | mRenderWater = TRUE; |
73 | mVoiceConnector = "SLVoice"; | 74 | mVoiceConnector = "SLVoice"; |
75 | mMaxSelectDistance = 192.0f; | ||
74 | 76 | ||
75 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { | 77 | if (gHippoGridManager->getConnectedGrid()->isRenderCompat()) { |
76 | llinfos << "Using rendering compatible OpenSim limits" << llendl; | 78 | llinfos << "Using rendering compatible OpenSim limits" << llendl; |
@@ -114,6 +116,7 @@ void HippoLimits::setSecondLifeLimits() | |||
114 | mEnforceMaxBuild = FALSE; | 116 | mEnforceMaxBuild = FALSE; |
115 | mRenderWater = TRUE; | 117 | mRenderWater = TRUE; |
116 | mVoiceConnector = "SLVoice"; | 118 | mVoiceConnector = "SLVoice"; |
119 | mMaxSelectDistance = 64.0f; | ||
117 | } | 120 | } |
118 | 121 | ||
119 | void HippoLimits::setSecondLifeMaxPrimScale() | 122 | void HippoLimits::setSecondLifeMaxPrimScale() |
diff --git a/linden/indra/newview/hippolimits.h b/linden/indra/newview/hippolimits.h index d63d1b0..9cc6160 100644 --- a/linden/indra/newview/hippolimits.h +++ b/linden/indra/newview/hippolimits.h | |||
@@ -15,6 +15,7 @@ public: | |||
15 | const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } | 15 | const S32& getMaxPhysLinkedPrims() const { return mMaxPhysLinkedPrims; } |
16 | const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } | 16 | const F32& getMaxInventoryItemsTransfer() const { return mMaxInventoryItemsTransfer; } |
17 | const std::string& getVoiceConnector() const { return mVoiceConnector; } | 17 | const std::string& getVoiceConnector() const { return mVoiceConnector; } |
18 | const F32& getMaxSelectDistance() const { return mMaxSelectDistance; } | ||
18 | 19 | ||
19 | // Returns the max prim size we can use on a grid | 20 | // Returns the max prim size we can use on a grid |
20 | F32 getMinPrimScale() const; | 21 | F32 getMinPrimScale() const; |
@@ -46,6 +47,7 @@ public: | |||
46 | F32 mMinPrimXPos; | 47 | F32 mMinPrimXPos; |
47 | F32 mMinPrimYPos; | 48 | F32 mMinPrimYPos; |
48 | F32 mMinPrimZPos; | 49 | F32 mMinPrimZPos; |
50 | F32 mMaxSelectDistance; | ||
49 | 51 | ||
50 | S32 mRenderName; | 52 | S32 mRenderName; |
51 | 53 | ||
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 96fd39b..89f9ffa 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp | |||
@@ -68,6 +68,8 @@ | |||
68 | #include "llresmgr.h" | 68 | #include "llresmgr.h" |
69 | #include "pipeline.h" | 69 | #include "pipeline.h" |
70 | #include "llspatialpartition.h" | 70 | #include "llspatialpartition.h" |
71 | |||
72 | #include "hippolimits.h" | ||
71 | 73 | ||
72 | // [RLVa:KB] | 74 | // [RLVa:KB] |
73 | #include "rlvhandler.h" | 75 | #include "rlvhandler.h" |
@@ -180,7 +182,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) | |||
180 | // [/RLVa:KB] | 182 | // [/RLVa:KB] |
181 | 183 | ||
182 | LLVector3 av_pos = gAgent.getPositionAgent(); | 184 | LLVector3 av_pos = gAgent.getPositionAgent(); |
183 | F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance"); | 185 | F32 select_dist_squared = gHippoLimits->getMaxSelectDistance(); |
184 | select_dist_squared = select_dist_squared * select_dist_squared; | 186 | select_dist_squared = select_dist_squared * select_dist_squared; |
185 | 187 | ||
186 | BOOL deselect = (mask == MASK_CONTROL); | 188 | BOOL deselect = (mask == MASK_CONTROL); |
@@ -235,8 +237,8 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) | |||
235 | LLVector3 relative_av_pos = av_pos; | 237 | LLVector3 relative_av_pos = av_pos; |
236 | relative_av_pos -= LLViewerCamera::getInstance()->getOrigin(); | 238 | relative_av_pos -= LLViewerCamera::getInstance()->getOrigin(); |
237 | 239 | ||
238 | F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + gSavedSettings.getF32("MaxSelectDistance"); | 240 | F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + gHippoLimits->getMaxSelectDistance(); |
239 | F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - gSavedSettings.getF32("MaxSelectDistance"); | 241 | F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - gHippoLimits->getMaxSelectDistance(); |
240 | 242 | ||
241 | new_near = llmax(new_near, 0.1f); | 243 | new_near = llmax(new_near, 0.1f); |
242 | 244 | ||
diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp index df503ec..b094328 100644 --- a/linden/indra/newview/llmaniprotate.cpp +++ b/linden/indra/newview/llmaniprotate.cpp | |||
@@ -63,6 +63,8 @@ | |||
63 | #include "lldrawable.h" | 63 | #include "lldrawable.h" |
64 | #include "llglheaders.h" | 64 | #include "llglheaders.h" |
65 | 65 | ||
66 | #include "hippolimits.h" | ||
67 | |||
66 | const F32 RADIUS_PIXELS = 100.f; // size in screen space | 68 | const F32 RADIUS_PIXELS = 100.f; // size in screen space |
67 | const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; | 69 | const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; |
68 | const F32 WIDTH_PIXELS = 8; | 70 | const F32 WIDTH_PIXELS = 8; |
@@ -1126,7 +1128,7 @@ BOOL LLManipRotate::updateVisiblity() | |||
1126 | // Don't drag manip if object too far away | 1128 | // Don't drag manip if object too far away |
1127 | if (gSavedSettings.getBOOL("LimitSelectDistance")) | 1129 | if (gSavedSettings.getBOOL("LimitSelectDistance")) |
1128 | { | 1130 | { |
1129 | F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); | 1131 | F32 max_select_distance = gHippoLimits->getMaxSelectDistance(); |
1130 | if (dist_vec(gAgent.getPositionAgent(), center) > max_select_distance) | 1132 | if (dist_vec(gAgent.getPositionAgent(), center) > max_select_distance) |
1131 | { | 1133 | { |
1132 | visible = FALSE; | 1134 | visible = FALSE; |
diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp index b38abe4..32709fd 100644 --- a/linden/indra/newview/llmanipscale.cpp +++ b/linden/indra/newview/llmanipscale.cpp | |||
@@ -238,7 +238,7 @@ void LLManipScale::render() | |||
238 | // Don't draw manip if object too far away | 238 | // Don't draw manip if object too far away |
239 | if (gSavedSettings.getBOOL("LimitSelectDistance")) | 239 | if (gSavedSettings.getBOOL("LimitSelectDistance")) |
240 | { | 240 | { |
241 | F32 max_select_distance = gSavedSettings.getF32("MaxSelectDistance"); | 241 | F32 max_select_distance = gHippoLimits->getMaxSelectDistance(); |
242 | if (range_from_agent > max_select_distance) | 242 | if (range_from_agent > max_select_distance) |
243 | { | 243 | { |
244 | return; | 244 | return; |
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index 3b78553..c113446 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp | |||
@@ -1823,7 +1823,7 @@ void LLManipTranslate::renderTranslationHandles() | |||
1823 | // Don't draw handles if you're too far away | 1823 | // Don't draw handles if you're too far away |
1824 | if (gSavedSettings.getBOOL("LimitSelectDistance")) | 1824 | if (gSavedSettings.getBOOL("LimitSelectDistance")) |
1825 | { | 1825 | { |
1826 | if (range_from_agent > gSavedSettings.getF32("MaxSelectDistance")) | 1826 | if (range_from_agent > gHippoLimits->getMaxSelectDistance()) |
1827 | { | 1827 | { |
1828 | return; | 1828 | return; |
1829 | } | 1829 | } |
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index f1092e7..ba73324 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp | |||
@@ -92,6 +92,8 @@ | |||
92 | 92 | ||
93 | #include "llglheaders.h" | 93 | #include "llglheaders.h" |
94 | 94 | ||
95 | #include "hippolimits.h" | ||
96 | |||
95 | // [RLVa:KB] | 97 | // [RLVa:KB] |
96 | #include "rlvhandler.h" | 98 | #include "rlvhandler.h" |
97 | // [/RLVa:KB] | 99 | // [/RLVa:KB] |
@@ -3500,9 +3502,9 @@ void LLSelectMgr::deselectAllIfTooFar() | |||
3500 | && !mSelectedObjects->isAttachment() | 3502 | && !mSelectedObjects->isAttachment() |
3501 | && !selectionCenter.isExactlyZero()) | 3503 | && !selectionCenter.isExactlyZero()) |
3502 | { | 3504 | { |
3503 | // F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance"); | 3505 | // F32 deselect_dist = gHippoLimits->getMaxSelectDistance(); |
3504 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | 3506 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f |
3505 | F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f; | 3507 | F32 deselect_dist = (!fRlvFartouch) ? gHippoLimits->getMaxSelectDistance() : 1.5f; |
3506 | // [/RLVa:KB] | 3508 | // [/RLVa:KB] |
3507 | F32 deselect_dist_sq = deselect_dist * deselect_dist; | 3509 | F32 deselect_dist_sq = deselect_dist * deselect_dist; |
3508 | 3510 | ||
diff --git a/linden/indra/newview/lltoolplacer.cpp b/linden/indra/newview/lltoolplacer.cpp index 52053f5..9f5eb09 100644 --- a/linden/indra/newview/lltoolplacer.cpp +++ b/linden/indra/newview/lltoolplacer.cpp | |||
@@ -69,6 +69,8 @@ | |||
69 | #include "llviewerparcelmgr.h" // RezWithLandGroup | 69 | #include "llviewerparcelmgr.h" // RezWithLandGroup |
70 | #include "roles_constants.h" // Ele: Land Group Override | 70 | #include "roles_constants.h" // Ele: Land Group Override |
71 | 71 | ||
72 | #include "hippolimits.h" | ||
73 | |||
72 | // [RLVa:KB] | 74 | // [RLVa:KB] |
73 | #include "rlvhandler.h" | 75 | #include "rlvhandler.h" |
74 | // [/RLVa:KB] | 76 | // [/RLVa:KB] |
diff --git a/linden/indra/newview/llviewercamera.cpp b/linden/indra/newview/llviewercamera.cpp index 16f6e57..fecab65 100644 --- a/linden/indra/newview/llviewercamera.cpp +++ b/linden/indra/newview/llviewercamera.cpp | |||
@@ -51,6 +51,8 @@ | |||
51 | #include "lltoolmgr.h" | 51 | #include "lltoolmgr.h" |
52 | #include "llviewerjoystick.h" | 52 | #include "llviewerjoystick.h" |
53 | 53 | ||
54 | #include "hippolimits.h" | ||
55 | |||
54 | //glu pick matrix implementation borrowed from Mesa3D | 56 | //glu pick matrix implementation borrowed from Mesa3D |
55 | glh::matrix4f gl_pick_matrix(GLfloat x, GLfloat y, GLfloat width, GLfloat height, GLint* viewport) | 57 | glh::matrix4f gl_pick_matrix(GLfloat x, GLfloat y, GLfloat width, GLfloat height, GLint* viewport) |
56 | { | 58 | { |
@@ -334,7 +336,7 @@ void LLViewerCamera::setPerspective(BOOL for_selection, | |||
334 | if (limit_select_distance) | 336 | if (limit_select_distance) |
335 | { | 337 | { |
336 | // ...select distance from control | 338 | // ...select distance from control |
337 | z_far = gSavedSettings.getF32("MaxSelectDistance"); | 339 | z_far = gHippoLimits->getMaxSelectDistance(); |
338 | } | 340 | } |
339 | else | 341 | else |
340 | { | 342 | { |