Fixed issues with ring rendering on mini and world map when ui scale was not exactly 1.0
This commit is contained in:
@@ -132,8 +132,6 @@ LLNetMap::LLNetMap(const std::string& name) :
|
|||||||
mClosestAgentToCursor(),
|
mClosestAgentToCursor(),
|
||||||
mPopupMenu(NULL)
|
mPopupMenu(NULL)
|
||||||
{
|
{
|
||||||
mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
|
|
||||||
mDotRadius = llmax(DOT_SCALE * mPixelsPerMeter, MIN_DOT_RADIUS);
|
|
||||||
setScale(gSavedSettings.getF32("MiniMapScale"));
|
setScale(gSavedSettings.getF32("MiniMapScale"));
|
||||||
|
|
||||||
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_mini_map.xml");
|
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_mini_map.xml");
|
||||||
@@ -763,9 +761,6 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
|
|||||||
LLVector3 pos_local;
|
LLVector3 pos_local;
|
||||||
pos_local.setVec(relative_pos_global); // convert to floats from doubles
|
pos_local.setVec(relative_pos_global); // convert to floats from doubles
|
||||||
|
|
||||||
// <FS:CR> Aurora Sim
|
|
||||||
mPixelsPerMeter = mScale / REGION_WIDTH_METERS;
|
|
||||||
// </FS:CR> Aurora Sim
|
|
||||||
pos_local.mV[VX] *= mPixelsPerMeter;
|
pos_local.mV[VX] *= mPixelsPerMeter;
|
||||||
pos_local.mV[VY] *= mPixelsPerMeter;
|
pos_local.mV[VY] *= mPixelsPerMeter;
|
||||||
// leave Z component in meters
|
// leave Z component in meters
|
||||||
@@ -786,17 +781,12 @@ LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
|
|||||||
|
|
||||||
void LLNetMap::drawRing(const F32 radius, const LLVector3 pos_map, const LLColor4& color)
|
void LLNetMap::drawRing(const F32 radius, const LLVector3 pos_map, const LLColor4& color)
|
||||||
{
|
{
|
||||||
// <FS:CR> Aurora Sim
|
F32 radius_pixels = radius * mPixelsPerMeter;
|
||||||
F32 meters_to_pixels = mScale / LLWorld::getInstance()->getRegionWidthInMeters();
|
|
||||||
//F32 meters_to_pixels = mScale / REGION_WIDTH_METERS;
|
|
||||||
// </FS:CR> Aurora Sim
|
|
||||||
F32 radius_pixels = radius * meters_to_pixels;
|
|
||||||
|
|
||||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
gGL.pushUIMatrix();
|
||||||
gGL.pushMatrix();
|
gGL.translateUI(pos_map.mV[VX], pos_map.mV[VY], 0.f);
|
||||||
gGL.translatef((F32)pos_map.mV[VX], (F32)pos_map.mV[VY], 0.f);
|
gl_washer_2d(radius_pixels, radius_pixels-WIDTH_PIXELS, CIRCLE_STEPS, color, color);
|
||||||
gl_ring(radius_pixels, WIDTH_PIXELS, color, color, CIRCLE_STEPS, FALSE);
|
gGL.popUIMatrix();
|
||||||
gGL.popMatrix();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
|
void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
|
||||||
|
|||||||
@@ -1688,12 +1688,10 @@ void LLWorldMapView::drawTrackingCircle( const LLRect& rect, S32 x, S32 y, const
|
|||||||
end_theta -= angle_adjust_y;
|
end_theta -= angle_adjust_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
gGL.pushUIMatrix();
|
||||||
gGL.pushMatrix();
|
gGL.translateUI(x, y, 0.f);
|
||||||
gGL.translatef((F32)x, (F32)y, 0.f);
|
|
||||||
gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color);
|
gl_washer_segment_2d(inner_radius, outer_radius, start_theta, end_theta, 40, color, color);
|
||||||
gGL.popMatrix();
|
gGL.popUIMatrix();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|||||||
Reference in New Issue
Block a user