aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llglsandbox.cpp')
-rw-r--r--linden/indra/newview/llglsandbox.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp
index 91beb80..7213e24 100644
--- a/linden/indra/newview/llglsandbox.cpp
+++ b/linden/indra/newview/llglsandbox.cpp
@@ -167,6 +167,13 @@ extern BOOL gDebugSelect;
167// Returns true if you got at least one object 167// Returns true if you got at least one object
168void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) 168void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
169{ 169{
170// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b)
171 if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
172 {
173 return;
174 }
175// [/RLVa:KB]
176
170 LLVector3 av_pos = gAgent.getPositionAgent(); 177 LLVector3 av_pos = gAgent.getPositionAgent();
171 F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance"); 178 F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance");
172 select_dist_squared = select_dist_squared * select_dist_squared; 179 select_dist_squared = select_dist_squared * select_dist_squared;
@@ -231,6 +238,27 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
231 LLViewerCamera::getInstance()->setFar(new_far); 238 LLViewerCamera::getInstance()->setFar(new_far);
232 LLViewerCamera::getInstance()->setNear(new_near); 239 LLViewerCamera::getInstance()->setNear(new_near);
233 } 240 }
241// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
242 if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
243 {
244 // We'll allow drag selection under fartouch, but only within the fartouch range
245 // (just copy/paste the code above us to make that work, thank you Lindens!)
246 LLVector3 relative_av_pos = av_pos;
247 relative_av_pos -= LLViewerCamera::getInstance()->getOrigin();
248
249 F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f;
250 F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f;
251
252 new_near = llmax(new_near, 0.1f);
253
254 LLViewerCamera::getInstance()->setFar(new_far);
255 LLViewerCamera::getInstance()->setNear(new_near);
256
257 // Usurp these two
258 limit_select_distance = TRUE;
259 select_dist_squared = 1.5f * 1.5f;
260 }
261// [/RLVa:KB]
234 LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, 262 LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
235 center_x-width/2, center_y-height/2, width, height, 263 center_x-width/2, center_y-height/2, width, height,
236 limit_select_distance); 264 limit_select_distance);