From 601db92bc7ec88fcfb0e77c585b19e591e1a96bd Mon Sep 17 00:00:00 2001 From: Cinders <cinder@cinderblocks.biz> Date: Tue, 18 Aug 2015 06:51:07 -0600 Subject: [PATCH] Some silly thing I did for varregions --- indra/newview/llagentui.cpp | 6 ++---- indra/newview/llviewerregion.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 97f7a107e7..10df3db8a5 100755 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -37,7 +37,6 @@ #include "llviewerregion.h" #include "llviewerparcelmgr.h" #include "llvoavatarself.h" -#include "llworldmap.h" #include "llslurl.h" //static @@ -55,9 +54,8 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) if (regionp) { LLVector3d pos_global = gAgent.getPositionGlobal(); - const LLSimInfo* sim = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); - pos_global[0] = fmod(pos_global[0], sim ? sim->getSizeX() : 256); - pos_global[1] = fmod(pos_global[1], sim ? sim->getSizeY() : 256); + pos_global[0] = fmod(pos_global[0], regionp->getWidth()); + pos_global[1] = fmod(pos_global[1], regionp->getWidth()); return_slurl = LLSLURL(regionp->getHGGrid(), regionp->getName(), pos_global); } slurl = return_slurl; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 70f3a3fbd7..a4344c3da4 100755 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -230,7 +230,7 @@ public: void setCacheID(const LLUUID& id); - F32 getWidth() const { return mWidth; } + F32 getWidth() const { return mWidth; } void idleUpdate(F32 max_update_time); void lightIdleUpdate(); -- GitLab