From b5ccb0abf1566e162654d935df402ae105c1ace7 Mon Sep 17 00:00:00 2001 From: Cinders <cinder@cinderblocks.biz> Date: Fri, 14 Aug 2015 08:31:24 -0600 Subject: [PATCH] Fix varregions for world map lol forgot to update the message template --- indra/newview/llworldmapview.cpp | 12 ++++++++---- scripts/messages/message_template.msg | 5 +++++ scripts/messages/message_template.msg.sha1 | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index c2a39f21fc..0f4bfc9e19 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -357,8 +357,8 @@ void LLWorldMapView::draw() // When the view isn't panned, 0,0 = center of rectangle F32 bottom = sPanY + half_height + relative_y; F32 left = sPanX + half_width + relative_x; - F32 top = bottom + sMapScale ; - F32 right = left + sMapScale ; + F32 top = bottom+ (sMapScale * (info->getSizeY() / REGION_WIDTH_METERS)); + F32 right = left + (sMapScale * (info->getSizeX() / REGION_WIDTH_METERS)); // Discard if region is outside the screen rectangle (not visible on screen) if ((top < 0.f) || (bottom > height) || @@ -419,8 +419,12 @@ void LLWorldMapView::draw() if (overlayimage) { // Inform the fetch mechanism of the size we need - S32 draw_size = ll_round(sMapScale); - overlayimage->setKnownDrawSize(ll_round(draw_size * LLUI::getScaleFactor().mV[VX]), ll_round(draw_size * LLUI::getScaleFactor().mV[VY])); + S32 x_draw_size = ll_round(sMapScale); + 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 if (overlayimage->hasGLTexture()) { diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index fbbc385e5b..4b46143ef7 100755 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -8715,6 +8715,11 @@ version 2.0 { Agents U8 } { MapImageID LLUUID } } + { + Size Variable + { SizeX U16 } + { SizeY U16 } + } } // viewer -> sim diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index 2c6489906c..c533cf89a8 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -845459c1bb7fe8174fb493528fe2a214015f996d \ No newline at end of file +326aaa0f3f77faaa62aac6675f2c9c17f5d14116 \ No newline at end of file -- GitLab