diff options
author | gareth | 2007-04-17 10:53:50 +0000 |
---|---|---|
committer | gareth | 2007-04-17 10:53:50 +0000 |
commit | 3e86870f7f1eb3d90089d41f8669fbd22d2e50d4 (patch) | |
tree | 5e04e36b7725227e95618933a2850898504a12fc /OpenSim.RegionServer/SimClient.cs | |
parent | Sim crossing now works (except for broken co-ordinates, resets to 0,0 - to be... (diff) | |
download | opensim-SC-3e86870f7f1eb3d90089d41f8669fbd22d2e50d4.zip opensim-SC-3e86870f7f1eb3d90089d41f8669fbd22d2e50d4.tar.gz opensim-SC-3e86870f7f1eb3d90089d41f8669fbd22d2e50d4.tar.bz2 opensim-SC-3e86870f7f1eb3d90089d41f8669fbd22d2e50d4.tar.xz |
Created skeleton SimComms.cs for sim<->sim UDP circuits
Fixed bug with <0,0> co-ordinates on sim crossing
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 083ca68..52074b5 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -144,19 +144,19 @@ namespace OpenSim | |||
144 | 144 | ||
145 | if(avatarpos.X<0) { | 145 | if(avatarpos.X<0) { |
146 | neighbourx-=1; | 146 | neighbourx-=1; |
147 | newpos.X=0; | 147 | newpos.X=254; |
148 | } | 148 | } |
149 | if(avatarpos.X>255) { | 149 | if(avatarpos.X>255) { |
150 | neighbourx+=1; | 150 | neighbourx+=1; |
151 | newpos.X=255; | 151 | newpos.X=1; |
152 | } | 152 | } |
153 | if(avatarpos.Y<0) { | 153 | if(avatarpos.Y<0) { |
154 | neighboury-=1; | 154 | neighboury-=1; |
155 | newpos.Y=0; | 155 | newpos.Y=254; |
156 | } | 156 | } |
157 | if(avatarpos.Y>255) { | 157 | if(avatarpos.Y>255) { |
158 | neighbourx+=1; | 158 | neighbourx+=1; |
159 | newpos.Y=255; | 159 | newpos.Y=1; |
160 | } | 160 | } |
161 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]"); | 161 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:CrossSimBorder() - Crossing border to neighbouring sim at [" + neighbourx.ToString() + "," + neighboury.ToString() + "]"); |
162 | 162 | ||
@@ -166,6 +166,19 @@ namespace OpenSim | |||
166 | XmlRpcResponse GridResp; | 166 | XmlRpcResponse GridResp; |
167 | foreach(Hashtable borderingSim in ((RemoteGridBase)m_gridServer).neighbours) { | 167 | foreach(Hashtable borderingSim in ((RemoteGridBase)m_gridServer).neighbours) { |
168 | if(((string)borderingSim["region_locx"]).Equals(neighbourx.ToString()) && ((string)borderingSim["region_locy"]).Equals(neighboury.ToString())) { | 168 | if(((string)borderingSim["region_locx"]).Equals(neighbourx.ToString()) && ((string)borderingSim["region_locy"]).Equals(neighboury.ToString())) { |
169 | SimParams = new Hashtable(); | ||
170 | SimParams["firstname"] = this.ClientAvatar.firstname; | ||
171 | SimParams["lastname"] = this.ClientAvatar.lastname; | ||
172 | SimParams["circuit_code"] = this.CircuitCode.ToString(); | ||
173 | SimParams["pos_x"] = newpos.X.ToString(); | ||
174 | SimParams["pos_y"] = newpos.Y.ToString(); | ||
175 | SimParams["pos_z"] = newpos.Z.ToString(); | ||
176 | SendParams = new ArrayList(); | ||
177 | SendParams.Add(SimParams); | ||
178 | |||
179 | GridReq = new XmlRpcRequest("agent_crossing", SendParams); | ||
180 | GridResp = GridReq.Send("http://" + borderingSim["sim_ip"] + ":" + borderingSim["sim_port"], 3000); | ||
181 | |||
169 | CrossedRegionPacket NewSimPack = new CrossedRegionPacket(); | 182 | CrossedRegionPacket NewSimPack = new CrossedRegionPacket(); |
170 | NewSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock(); | 183 | NewSimPack.AgentData = new CrossedRegionPacket.AgentDataBlock(); |
171 | NewSimPack.AgentData.AgentID=this.AgentID; | 184 | NewSimPack.AgentData.AgentID=this.AgentID; |
@@ -196,6 +209,8 @@ namespace OpenSim | |||
196 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:UpgradeClient() - upgrading child to full agent"); | 209 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("SimClient.cs:UpgradeClient() - upgrading child to full agent"); |
197 | this.m_child=false; | 210 | this.m_child=false; |
198 | this.m_world.RemoveViewerAgent(this); | 211 | this.m_world.RemoveViewerAgent(this); |
212 | this.startpos=((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].startpos; | ||
213 | ((RemoteGridBase)m_gridServer).agentcircuits[CircuitCode].child=false; | ||
199 | this.InitNewClient(); | 214 | this.InitNewClient(); |
200 | } | 215 | } |
201 | 216 | ||