Merge branch 'future' of git://github.com/siana/SingularityViewer.git into BatchIndexing

Conflicts:
	indra/newview/hippopanelgrids.cpp
	indra/newview/llstartup.cpp
	indra/newview/llsurface.cpp
	indra/newview/llviewermessage.cpp
	indra/newview/llviewerparceloverlay.cpp
	indra/newview/llviewertexturelist.cpp
	indra/newview/llworld.cpp
This commit is contained in:
Shyotl
2011-09-09 16:53:12 -05:00
84 changed files with 2142 additions and 808 deletions

View File

@@ -79,12 +79,12 @@ const S32 WORLD_PATCH_SIZE = 16;
extern LLColor4U MAX_WATER_COLOR;
const U32 LLWorld::mWidth = 256;
U32 LLWorld::mWidth = 256;
// meters/point, therefore mWidth * mScale = meters per edge
const F32 LLWorld::mScale = 1.f;
const F32 LLWorld::mWidthInMeters = mWidth * mScale;
F32 LLWorld::mWidthInMeters = mWidth * mScale;
//
// Functions
@@ -139,7 +139,7 @@ void LLWorld::destroyClass()
}
LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host, const U32 &region_size_x, const U32 &region_size_y)
{
LLMemType mt(LLMemType::MTYPE_REGIONS);
llinfos << "Add region with handle: " << region_handle << " on host " << host << llendl;
@@ -172,9 +172,11 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
U32 iindex = 0;
U32 jindex = 0;
mWidth = region_size_x;
mWidthInMeters = mWidth * mScale;
from_region_handle(region_handle, &iindex, &jindex);
S32 x = (S32)(iindex/mWidth);
S32 y = (S32)(jindex/mWidth);
S32 x = (S32)(iindex/256);
S32 y = (S32)(jindex/256);
llinfos << "Adding new region (" << x << ":" << y << ")" << llendl;
llinfos << "Host: " << host << llendl;
@@ -824,7 +826,7 @@ F32 LLWorld::getLandFarClip() const
void LLWorld::setLandFarClip(const F32 far_clip)
{
static S32 const rwidth = (S32)REGION_WIDTH_U32;
static S32 const rwidth = (S32)getRegionWidthInMeters();
S32 const n1 = (llceil(mLandFarClip) - 1) / rwidth;
S32 const n2 = (llceil(far_clip) - 1) / rwidth;
bool need_water_objects_update = n1 != n2;
@@ -1254,9 +1256,21 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
// which simulator should we modify?
LLHost sim(ip_u32, port);
U32 region_size_x = 256;
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x);
U32 region_size_y = 256;
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y);
if (region_size_y == 0 || region_size_x == 0)
{
region_size_x = 256;
region_size_y = 256;
}
// Viewer trusts the simulator.
msg->enableCircuit(sim, TRUE);
LLWorld::getInstance()->addRegion(handle, sim);
LLWorld::getInstance()->addRegion(handle, sim, region_size_x, region_size_y);
// give the simulator a message it can use to get ip and port
llinfos << "simulator_enable() Enabling " << sim << " with code " << msg->getOurCircuitCode() << llendl;