Skip to content
Snippets Groups Projects
Commit b5ccb0ab authored by ¡Cinder! ㊝'s avatar ¡Cinder! ㊝ :speech_balloon:
Browse files

Fix varregions for world map lol forgot to update the message template

parent ebe33e0f
No related branches found
No related tags found
No related merge requests found
...@@ -357,8 +357,8 @@ void LLWorldMapView::draw() ...@@ -357,8 +357,8 @@ void LLWorldMapView::draw()
// When the view isn't panned, 0,0 = center of rectangle // When the view isn't panned, 0,0 = center of rectangle
F32 bottom = sPanY + half_height + relative_y; F32 bottom = sPanY + half_height + relative_y;
F32 left = sPanX + half_width + relative_x; F32 left = sPanX + half_width + relative_x;
F32 top = bottom + sMapScale ; F32 top = bottom+ (sMapScale * (info->getSizeY() / REGION_WIDTH_METERS));
F32 right = left + sMapScale ; F32 right = left + (sMapScale * (info->getSizeX() / REGION_WIDTH_METERS));
// Discard if region is outside the screen rectangle (not visible on screen) // Discard if region is outside the screen rectangle (not visible on screen)
if ((top < 0.f) || (bottom > height) || if ((top < 0.f) || (bottom > height) ||
...@@ -419,8 +419,12 @@ void LLWorldMapView::draw() ...@@ -419,8 +419,12 @@ void LLWorldMapView::draw()
if (overlayimage) if (overlayimage)
{ {
// Inform the fetch mechanism of the size we need // Inform the fetch mechanism of the size we need
S32 draw_size = ll_round(sMapScale); S32 x_draw_size = ll_round(sMapScale);
overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY])); S32 y_draw_size = ll_round(sMapScale);
x_draw_size *= (info->getSizeX() / REGION_WIDTH_METERS);
y_draw_size *= (info->getSizeY() / REGION_WIDTH_METERS);
overlayimage->setKnownDrawSize(ll_round(x_draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(y_draw_size * LLUI::getScaleFactor().mV[VY]));
// Draw something whenever we have enough info // Draw something whenever we have enough info
if (overlayimage->hasGLTexture()) if (overlayimage->hasGLTexture())
{ {
......
...@@ -8715,6 +8715,11 @@ version 2.0 ...@@ -8715,6 +8715,11 @@ version 2.0
{ Agents U8 } { Agents U8 }
{ MapImageID LLUUID } { MapImageID LLUUID }
} }
{
Size Variable
{ SizeX U16 }
{ SizeY U16 }
}
} }
// viewer -> sim // viewer -> sim
......
845459c1bb7fe8174fb493528fe2a214015f996d 326aaa0f3f77faaa62aac6675f2c9c17f5d14116
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment