aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2014-11-06 19:03:25 +0000
committerUbitUmarov2014-11-06 19:03:25 +0000
commitead78764abfe3d91f79b55ec200bd0d5e8ca2151 (patch)
tree5f1cb7c178e908b74a3e0e661e67184e54d93f15 /OpenSim/Region/CoreModules
parentBUG fix : fix a very silly bug uint in place of ulong :( (diff)
downloadopensim-SC-ead78764abfe3d91f79b55ec200bd0d5e8ca2151.zip
opensim-SC-ead78764abfe3d91f79b55ec200bd0d5e8ca2151.tar.gz
opensim-SC-ead78764abfe3d91f79b55ec200bd0d5e8ca2151.tar.bz2
opensim-SC-ead78764abfe3d91f79b55ec200bd0d5e8ca2151.tar.xz
allow drawdistance to change between 32 and MaxDrawDistance, configurable
value default to 256, so should have no effect. Next steps needed: reduce client udp Throttles with distance, update childreen connections with significat movement and view range changes, Make disconnect be delayed in time, make disconnects be receiving region action not sender on region changes. Allow distance less than 256 to only connect to visible regions, even none. Make this be relative to camera and not agent position or region centers as it is now.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 274eb7f..b32a169 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -2352,11 +2352,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2352 { 2352 {
2353 int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance; 2353 int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance;
2354 2354
2355 int startX = (int)pRegionLocX * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2); 2355 dd--;
2356 int startY = (int)pRegionLocY * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2);
2357 2356
2358 int endX = (int)pRegionLocX * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2); 2357 // region center
2359 int endY = (int)pRegionLocY * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2); 2358 int endX = (int)pRegionLocX * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2);
2359 int endY = (int)pRegionLocY * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2);
2360
2361 int startX = endX - dd;
2362 int startY = endY - dd;
2363
2364 endX += dd;
2365 endY += dd;
2360 2366
2361 if (startX < 0) startX = 0; 2367 if (startX < 0) startX = 0;
2362 if (startY < 0) startY = 0; 2368 if (startY < 0) startY = 0;