From 892e8b82d84266f8bdfbd5c2cdd388f71c208035 Mon Sep 17 00:00:00 2001 From: RevolutionSmythe Date: Fri, 18 Mar 2011 17:32:12 -0500 Subject: Merge in Var Sized Regions into the Imprudence Experimental. --- linden/indra/newview/llviewermessage.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'linden/indra/newview/llviewermessage.cpp') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 9ebfd04..4de4768 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3531,6 +3531,17 @@ void process_teleport_finish(LLMessageSystem* msg, void**) U32 teleport_flags; msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); + U32 region_size_x = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); + U32 region_size_y = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; + } std::string seedCap; msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability, seedCap); @@ -3550,7 +3561,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**) // Viewer trusts the simulator. gMessageSystem->enableCircuit(sim_host, TRUE); - LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host); + LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y); /* // send camera update to new region @@ -3866,9 +3877,21 @@ void process_crossed_region(LLMessageSystem* msg, void**) std::string seedCap; msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); + U32 region_size_x = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x); + U32 region_size_y = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; + } + send_complete_agent_movement(sim_host); - LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host); + LLViewerRegion* regionp = LLWorld::getInstance()->addRegion(region_handle, sim_host, region_size_x, region_size_y); regionp->setSeedCapability(seedCap); // Tell the LightShare handler that we have changed regions. -- cgit v1.1 From e67e3f216fdb0868d05c35f105dd83c5358dd3b0 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 18 Mar 2011 21:05:23 -0500 Subject: Fixed bad line endings (CRLF) in many files. Windows users, please set "autocrlf = input" or "autocrlf = true" in your .git/config [core] section to avoid this in the future. --- linden/indra/newview/llviewermessage.cpp | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'linden/indra/newview/llviewermessage.cpp') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 4de4768..f67f0dc 100755 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -3531,16 +3531,16 @@ void process_teleport_finish(LLMessageSystem* msg, void**) U32 teleport_flags; msg->getU32Fast(_PREHASH_Info, _PREHASH_TeleportFlags, teleport_flags); - U32 region_size_x = 256; - msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); - U32 region_size_y = 256; - msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y); - - //and a little hack for Second Life compatibility - if (region_size_y == 0 || region_size_x == 0) - { - region_size_x = 256; - region_size_y = 256; + U32 region_size_x = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeX, region_size_x); + U32 region_size_y = 256; + msg->getU32Fast(_PREHASH_Info, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; } std::string seedCap; @@ -3877,16 +3877,16 @@ void process_crossed_region(LLMessageSystem* msg, void**) std::string seedCap; msg->getStringFast(_PREHASH_RegionData, _PREHASH_SeedCapability, seedCap); - U32 region_size_x = 256; - msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x); - U32 region_size_y = 256; - msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y); - - //and a little hack for Second Life compatibility - if (region_size_y == 0 || region_size_x == 0) - { - region_size_x = 256; - region_size_y = 256; + U32 region_size_x = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeX, region_size_x); + U32 region_size_y = 256; + msg->getU32(_PREHASH_RegionData, _PREHASH_RegionSizeY, region_size_y); + + //and a little hack for Second Life compatibility + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; } send_complete_agent_movement(sim_host); -- cgit v1.1