[VarRegions] Pseudosupport for region_size_y.
This commit is contained in:
@@ -311,7 +311,7 @@ void reset_login();
|
||||
void apply_udp_blacklist(const std::string& csv);
|
||||
// <FS:CR> Aurora Sim
|
||||
//bool process_login_success_response(std::string& password);
|
||||
bool process_login_success_response(std::string& password, U32& first_sim_size_x);
|
||||
bool process_login_success_response(std::string& password, U32& first_sim_size_x, U32& first_sim_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
void transition_back_to_login_panel(const std::string& emsg);
|
||||
|
||||
@@ -484,6 +484,7 @@ bool idle_startup()
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
static U32 first_sim_size_x = 256;
|
||||
static U32 first_sim_size_y = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
static LLVector3 initial_sun_direction(1.f, 0.f, 0.f);
|
||||
static LLVector3 agent_start_position_region(10.f, 10.f, 10.f); // default for when no space server
|
||||
@@ -1550,7 +1551,7 @@ bool idle_startup()
|
||||
if (successful_login)
|
||||
{
|
||||
// unpack login data needed by the application
|
||||
if (process_login_success_response(password, first_sim_size_x))
|
||||
if (process_login_success_response(password, first_sim_size_x, first_sim_size_y))
|
||||
{
|
||||
std::string name = firstname;
|
||||
if (!gHippoGridManager->getCurrentGrid()->isSecondLife() ||
|
||||
@@ -1670,7 +1671,7 @@ bool idle_startup()
|
||||
display_startup();
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
LLWorld::getInstance()->setRegionWidth(first_sim_size_x);
|
||||
LLWorld::getInstance()->setRegionSize(first_sim_size_x, first_sim_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim);
|
||||
display_startup();
|
||||
@@ -3856,7 +3857,7 @@ void apply_udp_blacklist(const std::string& csv)
|
||||
|
||||
}
|
||||
|
||||
bool process_login_success_response(std::string& password, U32& first_sim_size_x)
|
||||
bool process_login_success_response(std::string& password, U32& first_sim_size_x, U32& first_sim_size_y)
|
||||
{
|
||||
LLSD response = LLUserAuth::getInstance()->getResponse();
|
||||
|
||||
@@ -4000,6 +4001,9 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x
|
||||
// <FS:CR> Aurora Sim
|
||||
text = response["region_size_x"].asString();
|
||||
if (!text.empty()) LLViewerParcelMgr::getInstance()->init(first_sim_size_x = atoi(text.c_str()));
|
||||
// Patrick Sapinski commented here on 2/10/2011 that y is currently unused and major refactor is required - Liru (11/6/2013)
|
||||
text = response["region_size_y"].asString();
|
||||
if (!text.empty()) first_sim_size_y = atoi(text.c_str());
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
const std::string look_at_str = response["look_at"];
|
||||
|
||||
@@ -4458,7 +4458,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x);
|
||||
LLWorld::getInstance()->setRegionWidth(region_size_x);
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y);
|
||||
LLWorld::getInstance()->setRegionSize(region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
|
||||
@@ -4788,7 +4790,9 @@ void process_crossed_region(LLMessageSystem* msg, void**)
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x);
|
||||
LLWorld::getInstance()->setRegionWidth(region_size_x);
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y);
|
||||
LLWorld::getInstance()->setRegionSize(region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host);
|
||||
regionp->setSeedCapability(seedCap);
|
||||
|
||||
@@ -84,6 +84,7 @@ extern LLColor4U MAX_WATER_COLOR;
|
||||
// <FS:CR> Aurora Sim
|
||||
//const U32 LLWorld::mWidth = 256;
|
||||
U32 LLWorld::mWidth = 256;
|
||||
U32 LLWorld::mLength = 256;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// meters/point, therefore mWidth * mScale = meters per edge
|
||||
@@ -152,9 +153,10 @@ void LLWorld::destroyClass()
|
||||
}
|
||||
}
|
||||
|
||||
void LLWorld::setRegionWidth(const U32 width)
|
||||
void LLWorld::setRegionSize(const U32& width, const U32& length)
|
||||
{
|
||||
mWidth = width ? width : 256; // Width of 0 is really 256
|
||||
mLength = length ? length : 256; // Length of 0 is really 256
|
||||
mWidthInMeters = mWidth * mScale;
|
||||
}
|
||||
|
||||
@@ -247,7 +249,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
|
||||
adj_x = region_x + width * gDirAxes[dir][0];
|
||||
adj_y = region_y + width * gDirAxes[dir][1];
|
||||
|
||||
if (mWidth == 256)
|
||||
if (mWidth == 256 && mLength == 256)
|
||||
{
|
||||
to_region_handle(adj_x, adj_y, &adj_handle);
|
||||
neighborp = getRegionFromHandle(adj_handle);
|
||||
@@ -1361,7 +1363,9 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
|
||||
// <FS:CR> Aurora Sim
|
||||
U32 region_size_x = 256;
|
||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x);
|
||||
LLWorld::getInstance()->setRegionWidth(region_size_x);
|
||||
U32 region_size_y = 256;
|
||||
msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y);
|
||||
LLWorld::getInstance()->setRegionSize(region_size_x, region_size_y);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLWorld::getInstance()->addRegion(handle, sim);
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
LLVector3 resolveLandNormalGlobal(const LLVector3d &position); // absolute frame
|
||||
|
||||
// update region size
|
||||
void setRegionWidth(const U32 width = 0);
|
||||
void setRegionSize(const U32& width = 0, const U32& length = 0);
|
||||
|
||||
U32 getRegionWidthInPoints() const { return mWidth; }
|
||||
F32 getRegionScale() const { return mScale; }
|
||||
@@ -188,6 +188,7 @@ private:
|
||||
// <FS:CR> Aurora Sim
|
||||
//static const U32 mWidth;
|
||||
static U32 mWidth;
|
||||
static U32 mLength;
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// meters/point, therefore mWidth * mScale = meters per edge
|
||||
|
||||
Reference in New Issue
Block a user