Added support so that during the loading of a xml link list, it checks if a linked hypergrid region's real location is within 4096,4096 map spaces of its "local" location. If it is outside of that range ( so it wouldn't be possible to teleport to it) then it ignores it and doesn't create a link.
See the hypergrid wiki page for more details.0.6.2-post-fixes
parent
eb5a022981
commit
e21b3bf390
|
@ -267,11 +267,14 @@ namespace OpenSim
|
||||||
uint xloc, yloc;
|
uint xloc, yloc;
|
||||||
uint externalPort;
|
uint externalPort;
|
||||||
string externalHostName;
|
string externalHostName;
|
||||||
|
uint realXLoc, realYLoc;
|
||||||
|
|
||||||
xloc = Convert.ToUInt32(config.GetString("xloc", "0"));
|
xloc = Convert.ToUInt32(config.GetString("xloc", "0"));
|
||||||
yloc = Convert.ToUInt32(config.GetString("yloc", "0"));
|
yloc = Convert.ToUInt32(config.GetString("yloc", "0"));
|
||||||
externalPort = Convert.ToUInt32(config.GetString("externalPort", "0"));
|
externalPort = Convert.ToUInt32(config.GetString("externalPort", "0"));
|
||||||
externalHostName = config.GetString("externalHostName", "");
|
externalHostName = config.GetString("externalHostName", "");
|
||||||
|
realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0"));
|
||||||
|
realYLoc = Convert.ToUInt32(config.GetString("real-yloc", "0"));
|
||||||
|
|
||||||
if (m_enableAutoMapping)
|
if (m_enableAutoMapping)
|
||||||
{
|
{
|
||||||
|
@ -279,9 +282,12 @@ namespace OpenSim
|
||||||
yloc = (uint)((yloc % 100) + m_autoMappingY);
|
yloc = (uint)((yloc % 100) + m_autoMappingY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo))
|
if (((realXLoc == 0) && (realYLoc == 0)) || (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896))))
|
||||||
{
|
{
|
||||||
regInfo.RegionName = config.GetString("localName", "");
|
if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo))
|
||||||
|
{
|
||||||
|
regInfo.RegionName = config.GetString("localName", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue