diff options
author | McCabe Maxsted | 2010-06-23 20:52:31 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-06-26 19:01:36 -0500 |
commit | 1cd42040bfee73dd3b6400976e6be10b54c04165 (patch) | |
tree | 455bdb10a7cd10155ebb1f10a56d133a093064b7 /linden/indra/newview/llnetmap.cpp | |
parent | Allow map teleports up to the set grid height (diff) | |
download | meta-impy-1cd42040bfee73dd3b6400976e6be10b54c04165.zip meta-impy-1cd42040bfee73dd3b6400976e6be10b54c04165.tar.gz meta-impy-1cd42040bfee73dd3b6400976e6be10b54c04165.tar.bz2 meta-impy-1cd42040bfee73dd3b6400976e6be10b54c04165.tar.xz |
Use the max height for the grid as the max mini-map zoom out distance
Diffstat (limited to 'linden/indra/newview/llnetmap.cpp')
-rw-r--r-- | linden/indra/newview/llnetmap.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index d587170..2b9810d 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -71,9 +71,11 @@ | |||
71 | 71 | ||
72 | #include "llglheaders.h" | 72 | #include "llglheaders.h" |
73 | 73 | ||
74 | #include "hippoLimits.h" | ||
75 | |||
74 | const F32 MAP_SCALE_MIN = 32; | 76 | const F32 MAP_SCALE_MIN = 32; |
75 | const F32 MAP_SCALE_MID = 1024; | 77 | const F32 MAP_SCALE_MID = 1024; |
76 | const F32 MAP_SCALE_MAX = 4096; | 78 | //const F32 MAP_SCALE_MAX = 4096; Now uses the max height value from hippo limits |
77 | const F32 MAP_SCALE_INCREMENT = 16; | 79 | const F32 MAP_SCALE_INCREMENT = 16; |
78 | const F32 MAP_SCALE_ZOOM_FACTOR = 1.25f; // Zoom in factor per click of the scroll wheel (25%) | 80 | const F32 MAP_SCALE_ZOOM_FACTOR = 1.25f; // Zoom in factor per click of the scroll wheel (25%) |
79 | const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; | 81 | const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f; |
@@ -603,7 +605,7 @@ BOOL LLNetMap::handleScrollWheel(S32 x, S32 y, S32 clicks) | |||
603 | F32 scale = mScale; | 605 | F32 scale = mScale; |
604 | 606 | ||
605 | scale *= pow(MAP_SCALE_ZOOM_FACTOR, -clicks); | 607 | scale *= pow(MAP_SCALE_ZOOM_FACTOR, -clicks); |
606 | setScale(llclamp(scale, MAP_SCALE_MIN, MAP_SCALE_MAX)); | 608 | setScale(llclamp(scale, MAP_SCALE_MIN, gHippoLimits->getMaxHeight())); |
607 | 609 | ||
608 | return TRUE; | 610 | return TRUE; |
609 | } | 611 | } |
@@ -969,7 +971,7 @@ bool LLNetMap::LLScaleMap::handleEvent(LLPointer<LLEvent> event, const LLSD& use | |||
969 | self->setScale(MAP_SCALE_MID); | 971 | self->setScale(MAP_SCALE_MID); |
970 | break; | 972 | break; |
971 | case 2: | 973 | case 2: |
972 | self->setScale(MAP_SCALE_MAX); | 974 | self->setScale(gHippoLimits->getMaxHeight()); |
973 | break; | 975 | break; |
974 | default: | 976 | default: |
975 | break; | 977 | break; |