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

Some silly thing I did for varregions

parent a36f11cf
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "llviewerregion.h" #include "llviewerregion.h"
#include "llviewerparcelmgr.h" #include "llviewerparcelmgr.h"
#include "llvoavatarself.h" #include "llvoavatarself.h"
#include "llworldmap.h"
#include "llslurl.h" #include "llslurl.h"
//static //static
...@@ -55,9 +54,8 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/) ...@@ -55,9 +54,8 @@ void LLAgentUI::buildSLURL(LLSLURL& slurl, const bool escaped /*= true*/)
if (regionp) if (regionp)
{ {
LLVector3d pos_global = gAgent.getPositionGlobal(); LLVector3d pos_global = gAgent.getPositionGlobal();
const LLSimInfo* sim = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global); pos_global[0] = fmod(pos_global[0], regionp->getWidth());
pos_global[0] = fmod(pos_global[0], sim ? sim->getSizeX() : 256); pos_global[1] = fmod(pos_global[1], regionp->getWidth());
pos_global[1] = fmod(pos_global[1], sim ? sim->getSizeY() : 256);
return_slurl = LLSLURL(regionp->getHGGrid(), regionp->getName(), pos_global); return_slurl = LLSLURL(regionp->getHGGrid(), regionp->getName(), pos_global);
} }
slurl = return_slurl; slurl = return_slurl;
......
...@@ -230,7 +230,7 @@ public: ...@@ -230,7 +230,7 @@ public:
void setCacheID(const LLUUID& id); void setCacheID(const LLUUID& id);
F32 getWidth() const { return mWidth; } F32 getWidth() const { return mWidth; }
void idleUpdate(F32 max_update_time); void idleUpdate(F32 max_update_time);
void lightIdleUpdate(); void lightIdleUpdate();
......
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