aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.GridServer/SimProfiles.cs
diff options
context:
space:
mode:
authorgareth2007-03-28 22:22:12 +0000
committergareth2007-03-28 22:22:12 +0000
commitd6cdbf76251959be71ed618491971d05888702c5 (patch)
tree3fb8e5936bf4531d75b81ba7836020acf18be37d /OpenGridServices.GridServer/SimProfiles.cs
parentAdded more infrastructure for OGS (diff)
downloadopensim-SC_OLD-d6cdbf76251959be71ed618491971d05888702c5.zip
opensim-SC_OLD-d6cdbf76251959be71ed618491971d05888702c5.tar.gz
opensim-SC_OLD-d6cdbf76251959be71ed618491971d05888702c5.tar.bz2
opensim-SC_OLD-d6cdbf76251959be71ed618491971d05888702c5.tar.xz
Added neighbours code
Diffstat (limited to '')
-rw-r--r--OpenGridServices.GridServer/SimProfiles.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenGridServices.GridServer/SimProfiles.cs b/OpenGridServices.GridServer/SimProfiles.cs
index 535f5a9..ce617af 100644
--- a/OpenGridServices.GridServer/SimProfiles.cs
+++ b/OpenGridServices.GridServer/SimProfiles.cs
@@ -73,6 +73,22 @@ namespace OpenGridServices.GridServer
73 } 73 }
74 74
75 public string GetXMLNeighbours(ulong reqhandle) { 75 public string GetXMLNeighbours(ulong reqhandle) {
76 string response="";
77 SimProfileBase central_region = GetProfileByHandle(reqhandle);
78 SimProfileBase neighbour;
79 for(int x=-1; x<2; x++) for(int y=-1; y<2; y++) {
80 if(GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX+x)*256), (uint)(central_region.RegionLocY+y)*256))!=null) {
81 neighbour=GetProfileByHandle(Util.UIntsToLong((uint)((central_region.RegionLocX+x)*256), (uint)(central_region.RegionLocY+y)*256));
82 response+="<neighbour>";
83 response+="<sim_ip>" + neighbour.sim_ip + "</sim_ip>";
84 response+="<sim_port>" + neighbour.sim_port.ToString() + "</sim_port>";
85 response+="<locx>" + neighbour.RegionLocX.ToString() + "</locx>";
86 response+="<locy>" + neighbour.RegionLocY.ToString() + "</locy>";
87 response+="<regionhandle>" + neighbour.regionhandle.ToString() + "</regionhandle>";
88 response+="</neighbour>";
89
90 }
91 }
76 return ""; 92 return "";
77 } 93 }
78 94