Variable Size Regions! Support for prehash RegionSizeX and large patches. (WIP)
Mostly from Ukando, tweaked a bit to be cleaner, and a little less dramatic. decode_patch_header now takes a bool optionally, as third argument. _PREHASH_RegionSizeX is the only used of the two _PREHASH_RegionSize*. llsurface.cpp: Copy the connectNeighbor for variable size regions almost directly from Ukando llsurfacepatch.cpp: Patch code from ukando and voodoo. Changed hardcoded 256 constants and such to width functions in: llglsandbox.cpp, llsurface.cpp, llviewerregion.cpp, llviewerparcelmanager, llviewerparcelmgr.cpp, llvowater.cpp, llworld.cpp Use region specific width in: llagent.cpp, llglsandbox.cpp, llmanip.cpp, llmanipscale.cpp, llpanelobject.cpp, llviewerbject.cpp, llwind.cpp Use 256 in llnetmap.cpp in places... llfloaterregioninfo.cpp: Aurora grid has wacky textures. Add LLViewerParcelMgr::widthUpdate() for updating mParcelsPerEdge given a region's width. Used in llstartup now. Add LLWorld::setWidth() for getting a region's size from LLMessageSystem pointers and setting mWidth and mWidthInMeters, accordingly. Called in llviewermessage.cpp as well.
This commit is contained in:
@@ -375,10 +375,25 @@ LLSimInfo* LLWorldMap::simInfoFromPosGlobal(const LLVector3d& pos_global)
|
||||
|
||||
LLSimInfo* LLWorldMap::simInfoFromHandle(const U64 handle)
|
||||
{
|
||||
sim_info_map_t::iterator it = mSimInfoMap.find(handle);
|
||||
if (it != mSimInfoMap.end())
|
||||
std::map<U64, LLSimInfo*>::const_iterator it;
|
||||
for (it = mSimInfoMap.begin(); it != mSimInfoMap.end(); ++it)
|
||||
{
|
||||
return it->second;
|
||||
const U64 hndl = (*it).first;
|
||||
LLSimInfo* info = (*it).second;
|
||||
if (hndl == handle)
|
||||
{
|
||||
return info;
|
||||
}
|
||||
U32 x = 0, y = 0;
|
||||
from_region_handle(handle, &x, &y);
|
||||
U32 checkRegionX, checkRegionY;
|
||||
from_region_handle(hndl, &checkRegionX, &checkRegionY);
|
||||
|
||||
if (x >= checkRegionX && x < (checkRegionX + info->getSizeX()) &&
|
||||
y >= checkRegionY && y < (checkRegionY + info->getSizeY()))
|
||||
{
|
||||
return info;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user