aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llglsandbox.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-14 17:52:41 -0700
committerMcCabe Maxsted2009-09-14 17:52:41 -0700
commit7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd (patch)
tree0243666021de3ae6ac61a6c6f4e57d42771fe964 /linden/indra/newview/llglsandbox.cpp
parentApplied BlockClickSit debug setting from Emerald to block sit click action (diff)
downloadmeta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.zip
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.gz
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.bz2
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.xz
Merged in jacek/next
Diffstat (limited to '')
-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 2b51948..296cdaa 100644
--- a/linden/indra/newview/llglsandbox.cpp
+++ b/linden/indra/newview/llglsandbox.cpp
@@ -166,6 +166,13 @@ extern BOOL gDebugSelect;
166// Returns true if you got at least one object 166// Returns true if you got at least one object
167void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) 167void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
168{ 168{
169// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b)
170 if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT))
171 {
172 return;
173 }
174// [/RLVa:KB]
175
169 LLVector3 av_pos = gAgent.getPositionAgent(); 176 LLVector3 av_pos = gAgent.getPositionAgent();
170 F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance"); 177 F32 select_dist_squared = gSavedSettings.getF32("MaxSelectDistance");
171 select_dist_squared = select_dist_squared * select_dist_squared; 178 select_dist_squared = select_dist_squared * select_dist_squared;
@@ -230,6 +237,27 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
230 LLViewerCamera::getInstance()->setFar(new_far); 237 LLViewerCamera::getInstance()->setFar(new_far);
231 LLViewerCamera::getInstance()->setNear(new_near); 238 LLViewerCamera::getInstance()->setNear(new_near);
232 } 239 }
240// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
241 if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
242 {
243 // We'll allow drag selection under fartouch, but only within the fartouch range
244 // (just copy/paste the code above us to make that work, thank you Lindens!)
245 LLVector3 relative_av_pos = av_pos;
246 relative_av_pos -= LLViewerCamera::getInstance()->getOrigin();
247
248 F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f;
249 F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f;
250
251 new_near = llmax(new_near, 0.1f);
252
253 LLViewerCamera::getInstance()->setFar(new_far);
254 LLViewerCamera::getInstance()->setNear(new_near);
255
256 // Usurp these two
257 limit_select_distance = TRUE;
258 select_dist_squared = 1.5f * 1.5f;
259 }
260// [/RLVa:KB]
233 LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION, 261 LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
234 center_x-width/2, center_y-height/2, width, height, 262 center_x-width/2, center_y-height/2, width, height,
235 limit_select_distance); 263 limit_select_distance);