well then also no need to remove them :)
parent
9e07c55746
commit
721d5ed145
|
@ -292,8 +292,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
public class RegionInfoForScope
|
public class RegionInfoForScope
|
||||||
{
|
{
|
||||||
public const ulong HANDLEMASH = 0xffffff00ffffff00ul;
|
public const ulong HANDLEMASK = 0xffffff00ffffff00ul;
|
||||||
public const ulong HANDLECOORDMASH = 0xffffff00ul;
|
public const ulong HANDLECOORDMASK = 0xffffff00ul;
|
||||||
|
|
||||||
private Dictionary<ulong, GridRegion> storage;
|
private Dictionary<ulong, GridRegion> storage;
|
||||||
private Dictionary<ulong, DateTime> expires;
|
private Dictionary<ulong, DateTime> expires;
|
||||||
|
@ -317,7 +317,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
byname = new Dictionary<string, ulong>();
|
byname = new Dictionary<string, ulong>();
|
||||||
byuuid = new Dictionary<UUID, ulong>();
|
byuuid = new Dictionary<UUID, ulong>();
|
||||||
|
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
storage[handle] = region;
|
storage[handle] = region;
|
||||||
expires[handle] = expire;
|
expires[handle] = expire;
|
||||||
byname[region.RegionName] = handle;
|
byname[region.RegionName] = handle;
|
||||||
|
@ -327,7 +327,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
public void Add(GridRegion region, DateTime expire)
|
public void Add(GridRegion region, DateTime expire)
|
||||||
{
|
{
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
|
|
||||||
if(storage != null && storage.ContainsKey(handle))
|
if(storage != null && storage.ContainsKey(handle))
|
||||||
return;
|
return;
|
||||||
|
@ -360,7 +360,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if(byuuid == null)
|
if(byuuid == null)
|
||||||
byuuid = new Dictionary<UUID, ulong>();
|
byuuid = new Dictionary<UUID, ulong>();
|
||||||
|
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
|
|
||||||
if(expires.ContainsKey(handle))
|
if(expires.ContainsKey(handle))
|
||||||
{
|
{
|
||||||
|
@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if(byuuid != null)
|
if(byuuid != null)
|
||||||
byuuid.Remove(region.RegionID);
|
byuuid.Remove(region.RegionID);
|
||||||
|
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
if(storage != null)
|
if(storage != null)
|
||||||
storage.Remove(handle);
|
storage.Remove(handle);
|
||||||
if(expires != null)
|
if(expires != null)
|
||||||
|
@ -411,7 +411,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
public void Remove(ulong handle)
|
public void Remove(ulong handle)
|
||||||
{
|
{
|
||||||
handle &= HANDLEMASH;
|
handle &= HANDLEMASK;
|
||||||
|
|
||||||
if(storage != null)
|
if(storage != null)
|
||||||
{
|
{
|
||||||
|
@ -458,7 +458,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if(region == null)
|
if(region == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
return storage.ContainsKey(handle);
|
return storage.ContainsKey(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,7 +467,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if(storage == null)
|
if(storage == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
handle &= HANDLEMASH;
|
handle &= HANDLEMASK;
|
||||||
return storage.ContainsKey(handle);
|
return storage.ContainsKey(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +476,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
if(storage == null)
|
if(storage == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
handle &= HANDLEMASH;
|
handle &= HANDLEMASK;
|
||||||
if(storage.ContainsKey(handle))
|
if(storage.ContainsKey(handle))
|
||||||
return storage[handle];
|
return storage[handle];
|
||||||
|
|
||||||
|
@ -511,9 +511,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// look for a handle first this should find normal size regions
|
// look for a handle first this should find normal size regions
|
||||||
ulong handle = (ulong)x & HANDLECOORDMASH;
|
ulong handle = (ulong)x & HANDLECOORDMASK;
|
||||||
handle <<= 32;
|
handle <<= 32;
|
||||||
handle |= ((ulong)y & HANDLECOORDMASH);
|
handle |= ((ulong)y & HANDLECOORDMASK);
|
||||||
|
|
||||||
if(storage.ContainsKey(handle))
|
if(storage.ContainsKey(handle))
|
||||||
return storage[handle];
|
return storage[handle];
|
||||||
|
@ -640,7 +640,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
rsx >>= 8;
|
rsx >>= 8;
|
||||||
rsy >>= 8;
|
rsy >>= 8;
|
||||||
|
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
fastRegionHandle fh = new fastRegionHandle(handle);
|
fastRegionHandle fh = new fastRegionHandle(handle);
|
||||||
uint startY = fh.y;
|
uint startY = fh.y;
|
||||||
for(int i = 0; i < rsx; i++)
|
for(int i = 0; i < rsx; i++)
|
||||||
|
@ -658,9 +658,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
|
||||||
|
|
||||||
private void removeFromInner(GridRegion region)
|
private void removeFromInner(GridRegion region)
|
||||||
{
|
{
|
||||||
int rsx = region.RegionSizeX >> 8;
|
int rsx = region.RegionSizeX;
|
||||||
int rsy = region.RegionSizeY >> 8;
|
int rsy = region.RegionSizeY;
|
||||||
ulong handle = region.RegionHandle & HANDLEMASH;
|
|
||||||
|
if(rsx < 512 && rsy < 512)
|
||||||
|
return;
|
||||||
|
|
||||||
|
rsx >>= 8;
|
||||||
|
rsy >>= 8;
|
||||||
|
ulong handle = region.RegionHandle & HANDLEMASK;
|
||||||
fastRegionHandle fh = new fastRegionHandle(handle);
|
fastRegionHandle fh = new fastRegionHandle(handle);
|
||||||
uint startY = fh.y;
|
uint startY = fh.y;
|
||||||
for(int i = 0; i < rsx; i++)
|
for(int i = 0; i < rsx; i++)
|
||||||
|
|
Loading…
Reference in New Issue