aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmapresponders.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llmapresponders.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/linden/indra/newview/llmapresponders.cpp b/linden/indra/newview/llmapresponders.cpp
index eba890b..d16bc78 100644
--- a/linden/indra/newview/llmapresponders.cpp
+++ b/linden/indra/newview/llmapresponders.cpp
@@ -45,7 +45,7 @@ void LLMapLayerResponder::result(const LLSD& result)
45 45
46 S32 agent_flags = result["AgentData"]["Flags"]; 46 S32 agent_flags = result["AgentData"]["Flags"];
47 47
48 if (agent_flags != gWorldMap->mCurrentMap) 48 if (agent_flags != LLWorldMap::getInstance()->mCurrentMap)
49 { 49 {
50 llwarns << "Invalid or out of date map image type returned!" << llendl; 50 llwarns << "Invalid or out of date map image type returned!" << llendl;
51 return; 51 return;
@@ -54,7 +54,7 @@ void LLMapLayerResponder::result(const LLSD& result)
54 LLUUID image_id; 54 LLUUID image_id;
55 //U32 left, right, top, bottom; 55 //U32 left, right, top, bottom;
56 56
57 gWorldMap->mMapLayers[agent_flags].clear(); 57 LLWorldMap::getInstance()->mMapLayers[agent_flags].clear();
58 58
59 LLSD::array_const_iterator iter; 59 LLSD::array_const_iterator iter;
60 BOOL adjust = FALSE; 60 BOOL adjust = FALSE;
@@ -76,14 +76,14 @@ void LLMapLayerResponder::result(const LLSD& result)
76 76
77 F32 x_meters = F32(new_layer.LayerExtents.mLeft*REGION_WIDTH_UNITS); 77 F32 x_meters = F32(new_layer.LayerExtents.mLeft*REGION_WIDTH_UNITS);
78 F32 y_meters = F32(new_layer.LayerExtents.mBottom*REGION_WIDTH_UNITS); 78 F32 y_meters = F32(new_layer.LayerExtents.mBottom*REGION_WIDTH_UNITS);
79 adjust = gWorldMap->extendAABB(U32(x_meters), U32(y_meters), 79 adjust = LLWorldMap::getInstance()->extendAABB(U32(x_meters), U32(y_meters),
80 U32(x_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getWidth()), 80 U32(x_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getWidth()),
81 U32(y_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getHeight())) || adjust; 81 U32(y_meters+REGION_WIDTH_UNITS*new_layer.LayerExtents.getHeight())) || adjust;
82 82
83 gWorldMap->mMapLayers[agent_flags].push_back(new_layer); 83 LLWorldMap::getInstance()->mMapLayers[agent_flags].push_back(new_layer);
84 } 84 }
85 85
86 gWorldMap->mMapLoaded[agent_flags] = TRUE; 86 LLWorldMap::getInstance()->mMapLoaded[agent_flags] = TRUE;
87 if(adjust) gFloaterWorldMap->adjustZoomSliderBounds(); 87 if(adjust) gFloaterWorldMap->adjustZoomSliderBounds();
88 88
89 /* 89 /*
@@ -121,21 +121,21 @@ void LLMapLayerResponder::result(const LLSD& result)
121 if (access == 255) 121 if (access == 255)
122 { 122 {
123 // This region doesn't exist 123 // This region doesn't exist
124 if (gWorldMap->mIsTrackingUnknownLocation && 124 if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation &&
125 gWorldMap->mUnknownLocation.mdV[0] >= x_meters && 125 LLWorldMap::getInstance()->mUnknownLocation.mdV[0] >= x_meters &&
126 gWorldMap->mUnknownLocation.mdV[0] < x_meters + 256 && 126 LLWorldMap::getInstance()->mUnknownLocation.mdV[0] < x_meters + 256 &&
127 gWorldMap->mUnknownLocation.mdV[1] >= y_meters && 127 LLWorldMap::getInstance()->mUnknownLocation.mdV[1] >= y_meters &&
128 gWorldMap->mUnknownLocation.mdV[1] < y_meters + 256) 128 LLWorldMap::getInstance()->mUnknownLocation.mdV[1] < y_meters + 256)
129 { 129 {
130 // We were tracking this location, but it doesn't exist 130 // We were tracking this location, but it doesn't exist
131 gWorldMap->mInvalidLocation = TRUE; 131 LLWorldMap::getInstance()->mInvalidLocation = TRUE;
132 } 132 }
133 133
134 found_null_sim = true; 134 found_null_sim = true;
135 } 135 }
136 else 136 else
137 { 137 {
138 adjust = gWorldMap->extendAABB(x_meters, 138 adjust = LLWorldMap::getInstance()->extendAABB(x_meters,
139 y_meters, 139 y_meters,
140 x_meters+REGION_WIDTH_UNITS, 140 x_meters+REGION_WIDTH_UNITS,
141 y_meters+REGION_WIDTH_UNITS) || adjust; 141 y_meters+REGION_WIDTH_UNITS) || adjust;
@@ -144,8 +144,8 @@ void LLMapLayerResponder::result(const LLSD& result)
144 // llinfos << "Map sim " << name << " image layer " << agent_flags << " ID " << image_id.getString() << llendl; 144 // llinfos << "Map sim " << name << " image layer " << agent_flags << " ID " << image_id.getString() << llendl;
145 145
146 LLSimInfo* siminfo = new LLSimInfo(); 146 LLSimInfo* siminfo = new LLSimInfo();
147 LLWorldMap::sim_info_map_t::iterator iter = gWorldMap->mSimInfoMap.find(handle); 147 LLWorldMap::sim_info_map_t::iterator iter = LLWorldMap::getInstance()->mSimInfoMap.find(handle);
148 if (iter != gWorldMap->mSimInfoMap.end()) 148 if (iter != LLWorldMap::getInstance()->mSimInfoMap.end())
149 { 149 {
150 LLSimInfo* oldinfo = iter->second; 150 LLSimInfo* oldinfo = iter->second;
151 for (S32 image=0; image<MAP_SIM_IMAGE_TYPES; ++image) 151 for (S32 image=0; image<MAP_SIM_IMAGE_TYPES; ++image)
@@ -154,7 +154,7 @@ void LLMapLayerResponder::result(const LLSD& result)
154 } 154 }
155 delete oldinfo; 155 delete oldinfo;
156 } 156 }
157 gWorldMap->mSimInfoMap[handle] = siminfo; 157 LLWorldMap::getInstance()->mSimInfoMap[handle] = siminfo;
158 158
159 siminfo->mHandle = handle; 159 siminfo->mHandle = handle;
160 siminfo->mName.assign( name ); 160 siminfo->mName.assign( name );
@@ -162,7 +162,7 @@ void LLMapLayerResponder::result(const LLSD& result)
162 siminfo->mRegionFlags = region_flags; 162 siminfo->mRegionFlags = region_flags;
163 siminfo->mWaterHeight = (F32) water_height; 163 siminfo->mWaterHeight = (F32) water_height;
164 siminfo->mMapImageID[agent_flags] = image_id; 164 siminfo->mMapImageID[agent_flags] = image_id;
165 siminfo->mCurrentImage = gImageList.getImage(siminfo->mMapImageID[gWorldMap->mCurrentMap], MIPMAP_TRUE, FALSE); 165 siminfo->mCurrentImage = gImageList.getImage(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
166 siminfo->mCurrentImage->bindTexture(0); 166 siminfo->mCurrentImage->bindTexture(0);
167 siminfo->mCurrentImage->setClamp(TRUE, TRUE); 167 siminfo->mCurrentImage->setClamp(TRUE, TRUE);
168 168
@@ -175,22 +175,22 @@ void LLMapLayerResponder::result(const LLSD& result)
175 siminfo->mOverlayImage = NULL; 175 siminfo->mOverlayImage = NULL;
176 } 176 }
177 177
178 if (gWorldMap->mIsTrackingUnknownLocation && 178 if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation &&
179 gWorldMap->mUnknownLocation.mdV[0] >= x_meters && 179 LLWorldMap::getInstance()->mUnknownLocation.mdV[0] >= x_meters &&
180 gWorldMap->mUnknownLocation.mdV[0] < x_meters + 256 && 180 LLWorldMap::getInstance()->mUnknownLocation.mdV[0] < x_meters + 256 &&
181 gWorldMap->mUnknownLocation.mdV[1] >= y_meters && 181 LLWorldMap::getInstance()->mUnknownLocation.mdV[1] >= y_meters &&
182 gWorldMap->mUnknownLocation.mdV[1] < y_meters + 256) 182 LLWorldMap::getInstance()->mUnknownLocation.mdV[1] < y_meters + 256)
183 { 183 {
184 if (siminfo->mAccess == SIM_ACCESS_DOWN) 184 if (siminfo->mAccess == SIM_ACCESS_DOWN)
185 { 185 {
186 // We were tracking this location, but it doesn't exist 186 // We were tracking this location, but it doesn't exist
187 gWorldMap->mInvalidLocation = true; 187 LLWorldMap::getInstance()->mInvalidLocation = true;
188 } 188 }
189 else 189 else
190 { 190 {
191 // We were tracking this location, and it does exist 191 // We were tracking this location, and it does exist
192 bool is_tracking_dbl = gWorldMap->mIsTrackingDoubleClick == TRUE; 192 bool is_tracking_dbl = LLWorldMap::getInstance()->mIsTrackingDoubleClick == TRUE;
193 gFloaterWorldMap->trackLocation(gWorldMap->mUnknownLocation); 193 gFloaterWorldMap->trackLocation(LLWorldMap::getInstance()->mUnknownLocation);
194 if (is_tracking_dbl) 194 if (is_tracking_dbl)
195 { 195 {
196 LLVector3d pos_global = LLTracker::getTrackedPositionGlobal(); 196 LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();