summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-11-19 16:14:19 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-11-19 16:14:19 +0200
commit5725b04b084f5ad2699e834421b12795af351975 (patch)
tree61c78a2a715717c172cc94f9fdd8bd80161991d7 /indra/newview/llnetmap.cpp
parent88cce61b09d225df0bcd8aab9dbd2c5a01ee7e19 (diff)
parent884a9887a7a9e833478d266ddf8a7808cdba2ae6 (diff)
Merge from default branch
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rw-r--r--indra/newview/llnetmap.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 6145588df2..234fe13217 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -92,7 +92,6 @@ LLNetMap::LLNetMap (const Params & p)
mObjectImagep(),
mClosestAgentToCursor(),
mClosestAgentAtLastRightClick(),
- mRotateMap(FALSE),
mToolTipMsg()
{
mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS);
@@ -175,7 +174,8 @@ void LLNetMap::draw()
gGL.translatef( (F32) center_sw_left, (F32) center_sw_bottom, 0.f);
- if( mRotateMap )
+ static LLUICachedControl<bool> rotate_map("MiniMapRotate", true);
+ if( rotate_map )
{
// rotate subsequent draws to agent rotation
rotation = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
@@ -408,7 +408,7 @@ void LLNetMap::draw()
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- if( mRotateMap )
+ if( rotate_map )
{
gGL.color4fv((map_frustum_color()).mV);
@@ -454,7 +454,8 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
pos_local.mV[VY] *= mPixelsPerMeter;
// leave Z component in meters
- if( mRotateMap )
+ static LLUICachedControl<bool> rotate_map("MiniMapRotate", true);
+ if( rotate_map )
{
F32 radians = atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
LLQuaternion rot(radians, LLVector3(0.f, 0.f, 1.f));
@@ -502,7 +503,8 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
F32 radians = - atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] );
- if( mRotateMap )
+ static LLUICachedControl<bool> rotate_map("MiniMapRotate", true);
+ if( rotate_map )
{
LLQuaternion rot(radians, LLVector3(0.f, 0.f, 1.f));
pos_local.rotVec( rot );