diff options
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.
Diffstat (limited to 'OpenSim/Region/Application/HGOpenSimNode.cs')
-rw-r--r-- | OpenSim/Region/Application/HGOpenSimNode.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs index 6a525be..358370b 100644 --- a/OpenSim/Region/Application/HGOpenSimNode.cs +++ b/OpenSim/Region/Application/HGOpenSimNode.cs | |||
@@ -267,11 +267,14 @@ namespace OpenSim | |||
267 | uint xloc, yloc; | 267 | uint xloc, yloc; |
268 | uint externalPort; | 268 | uint externalPort; |
269 | string externalHostName; | 269 | string externalHostName; |
270 | uint realXLoc, realYLoc; | ||
270 | 271 | ||
271 | xloc = Convert.ToUInt32(config.GetString("xloc", "0")); | 272 | xloc = Convert.ToUInt32(config.GetString("xloc", "0")); |
272 | yloc = Convert.ToUInt32(config.GetString("yloc", "0")); | 273 | yloc = Convert.ToUInt32(config.GetString("yloc", "0")); |
273 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); | 274 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); |
274 | externalHostName = config.GetString("externalHostName", ""); | 275 | externalHostName = config.GetString("externalHostName", ""); |
276 | realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); | ||
277 | realYLoc = Convert.ToUInt32(config.GetString("real-yloc", "0")); | ||
275 | 278 | ||
276 | if (m_enableAutoMapping) | 279 | if (m_enableAutoMapping) |
277 | { | 280 | { |
@@ -279,9 +282,12 @@ namespace OpenSim | |||
279 | yloc = (uint)((yloc % 100) + m_autoMappingY); | 282 | yloc = (uint)((yloc % 100) + m_autoMappingY); |
280 | } | 283 | } |
281 | 284 | ||
282 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) | 285 | if (((realXLoc == 0) && (realYLoc == 0)) || (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896)))) |
283 | { | 286 | { |
284 | regInfo.RegionName = config.GetString("localName", ""); | 287 | if (TryCreateLink(xloc, yloc, externalPort, externalHostName, out regInfo)) |
288 | { | ||
289 | regInfo.RegionName = config.GetString("localName", ""); | ||
290 | } | ||
285 | } | 291 | } |
286 | } | 292 | } |
287 | 293 | ||