diff options
19 files changed, 161 insertions, 108 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index f90e766..109d027 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -31,6 +31,7 @@ using libsecondlife.Packets; | |||
31 | using OpenSim.Framework.Data; | 31 | using OpenSim.Framework.Data; |
32 | using OpenSim.Framework.Interfaces; | 32 | using OpenSim.Framework.Interfaces; |
33 | using OpenSim.Framework.Types; | 33 | using OpenSim.Framework.Types; |
34 | using OpenSim.Framework.Servers; | ||
34 | 35 | ||
35 | namespace OpenSim.Framework.Communications | 36 | namespace OpenSim.Framework.Communications |
36 | { | 37 | { |
@@ -42,7 +43,7 @@ namespace OpenSim.Framework.Communications | |||
42 | public IInterRegionCommunications InterRegion; | 43 | public IInterRegionCommunications InterRegion; |
43 | 44 | ||
44 | public NetworkServersInfo ServersInfo; | 45 | public NetworkServersInfo ServersInfo; |
45 | public CommunicationsManager(NetworkServersInfo serversInfo) | 46 | public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer) |
46 | { | 47 | { |
47 | ServersInfo = serversInfo; | 48 | ServersInfo = serversInfo; |
48 | } | 49 | } |
diff --git a/OpenSim/Framework/Data/SimProfileData.cs b/OpenSim/Framework/Data/SimProfileData.cs index 9db8574..b920cab 100644 --- a/OpenSim/Framework/Data/SimProfileData.cs +++ b/OpenSim/Framework/Data/SimProfileData.cs | |||
@@ -80,6 +80,10 @@ namespace OpenSim.Framework.Data | |||
80 | public uint serverPort; | 80 | public uint serverPort; |
81 | public string serverURI = ""; | 81 | public string serverURI = ""; |
82 | 82 | ||
83 | public uint httpPort; | ||
84 | public uint remotingPort; | ||
85 | public string httpServerURI = ""; | ||
86 | |||
83 | /// <summary> | 87 | /// <summary> |
84 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. | 88 | /// Set of optional overrides. Can be used to create non-eulicidean spaces. |
85 | /// </summary> | 89 | /// </summary> |
@@ -143,7 +147,10 @@ namespace OpenSim.Framework.Data | |||
143 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | 147 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); |
144 | simData.serverIP = (string)responseData["sim_ip"]; | 148 | simData.serverIP = (string)responseData["sim_ip"]; |
145 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | 149 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); |
150 | simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); | ||
151 | simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | ||
146 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | 152 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; |
153 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | ||
147 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | 154 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); |
148 | simData.regionName = (string)responseData["region_name"]; | 155 | simData.regionName = (string)responseData["region_name"]; |
149 | 156 | ||
@@ -172,6 +179,9 @@ namespace OpenSim.Framework.Data | |||
172 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); | 179 | simData.regionHandle = Helpers.UIntsToLong((simData.regionLocX * 256), (simData.regionLocY * 256)); |
173 | simData.serverIP = (string)responseData["sim_ip"]; | 180 | simData.serverIP = (string)responseData["sim_ip"]; |
174 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); | 181 | simData.serverPort = Convert.ToUInt32((string)responseData["sim_port"]); |
182 | simData.httpPort = Convert.ToUInt32((string)responseData["http_port"]); | ||
183 | simData.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | ||
184 | simData.httpServerURI = "http://" + simData.serverIP + ":" + simData.httpPort.ToString() + "/"; | ||
175 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; | 185 | simData.serverURI = "http://" + simData.serverIP + ":" + simData.serverPort.ToString() + "/"; |
176 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); | 186 | simData.UUID = new LLUUID((string)responseData["region_UUID"]); |
177 | simData.regionName = (string)responseData["region_name"]; | 187 | simData.regionName = (string)responseData["region_name"]; |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index 06e83f8..6ddb921 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -261,12 +261,16 @@ namespace OpenSim.Grid.GridServer | |||
261 | 261 | ||
262 | TheSim.serverIP = (string)requestData["sim_ip"]; | 262 | TheSim.serverIP = (string)requestData["sim_ip"]; |
263 | TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); | 263 | TheSim.serverPort = Convert.ToUInt32((string)requestData["sim_port"]); |
264 | TheSim.httpPort = Convert.ToUInt32((string)requestData["http_port"]); | ||
265 | TheSim.remotingPort = Convert.ToUInt32((string)requestData["remoting_port"]); | ||
264 | TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]); | 266 | TheSim.regionLocX = Convert.ToUInt32((string)requestData["region_locx"]); |
265 | TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); | 267 | TheSim.regionLocY = Convert.ToUInt32((string)requestData["region_locy"]); |
266 | TheSim.regionLocZ = 0; | 268 | TheSim.regionLocZ = 0; |
267 | 269 | ||
268 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); | 270 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); |
271 | System.Console.WriteLine("adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + TheSim.regionHandle); | ||
269 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; | 272 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; |
273 | TheSim.httpServerURI = "http://" + TheSim.serverIP + ":" + TheSim.httpPort + "/"; | ||
270 | 274 | ||
271 | Console.WriteLine("NEW SIM: " + TheSim.serverURI); | 275 | Console.WriteLine("NEW SIM: " + TheSim.serverURI); |
272 | TheSim.regionName = (string)requestData["sim_name"]; | 276 | TheSim.regionName = (string)requestData["sim_name"]; |
@@ -400,6 +404,8 @@ namespace OpenSim.Grid.GridServer | |||
400 | { | 404 | { |
401 | responseData["sim_ip"] = simData.serverIP; | 405 | responseData["sim_ip"] = simData.serverIP; |
402 | responseData["sim_port"] = simData.serverPort.ToString(); | 406 | responseData["sim_port"] = simData.serverPort.ToString(); |
407 | responseData["http_port"] = simData.httpPort.ToString(); | ||
408 | responseData["remoting_port"] = simData.remotingPort.ToString(); | ||
403 | responseData["region_locx"] = simData.regionLocX.ToString() ; | 409 | responseData["region_locx"] = simData.regionLocX.ToString() ; |
404 | responseData["region_locy"] = simData.regionLocY.ToString(); | 410 | responseData["region_locy"] = simData.regionLocY.ToString(); |
405 | responseData["region_UUID"] = simData.UUID.UUID.ToString(); | 411 | responseData["region_UUID"] = simData.UUID.UUID.ToString(); |
@@ -438,7 +444,7 @@ namespace OpenSim.Grid.GridServer | |||
438 | response.Value = responseData; | 444 | response.Value = responseData; |
439 | IList simProfileList = new ArrayList(); | 445 | IList simProfileList = new ArrayList(); |
440 | 446 | ||
441 | bool fastMode = true; // MySQL Only | 447 | bool fastMode = false; // MySQL Only |
442 | 448 | ||
443 | if (fastMode) | 449 | if (fastMode) |
444 | { | 450 | { |
@@ -449,6 +455,7 @@ namespace OpenSim.Grid.GridServer | |||
449 | Hashtable simProfileBlock = new Hashtable(); | 455 | Hashtable simProfileBlock = new Hashtable(); |
450 | simProfileBlock["x"] = aSim.Value.regionLocX.ToString(); | 456 | simProfileBlock["x"] = aSim.Value.regionLocX.ToString(); |
451 | simProfileBlock["y"] = aSim.Value.regionLocY.ToString(); | 457 | simProfileBlock["y"] = aSim.Value.regionLocY.ToString(); |
458 | System.Console.WriteLine("send neighbour info for " + aSim.Value.regionLocX.ToString() + " , " + aSim.Value.regionLocY.ToString()); | ||
452 | simProfileBlock["name"] = aSim.Value.regionName; | 459 | simProfileBlock["name"] = aSim.Value.regionName; |
453 | simProfileBlock["access"] = 21; | 460 | simProfileBlock["access"] = 21; |
454 | simProfileBlock["region-flags"] = 512; | 461 | simProfileBlock["region-flags"] = 512; |
@@ -470,11 +477,12 @@ namespace OpenSim.Grid.GridServer | |||
470 | else | 477 | else |
471 | { | 478 | { |
472 | SimProfileData simProfile; | 479 | SimProfileData simProfile; |
473 | for (int x = xmin; x < xmax; x++) | 480 | for (int x = xmin; x < xmax+1; x++) |
474 | { | 481 | { |
475 | for (int y = ymin; y < ymax; y++) | 482 | for (int y = ymin; y < ymax+1; y++) |
476 | { | 483 | { |
477 | simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256))); | 484 | ulong regHandle = Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)); |
485 | simProfile = getRegion(regHandle); | ||
478 | if (simProfile != null) | 486 | if (simProfile != null) |
479 | { | 487 | { |
480 | Hashtable simProfileBlock = new Hashtable(); | 488 | Hashtable simProfileBlock = new Hashtable(); |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 7ae7853..04bf64a 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -85,9 +85,10 @@ namespace OpenSim.Grid.UserServer | |||
85 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 85 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
86 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 86 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; |
87 | 87 | ||
88 | System.Console.WriteLine("sending reply"); | ||
88 | // Send | 89 | // Send |
89 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 90 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
90 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.serverURI, 3000); | 91 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 3000); |
91 | } | 92 | } |
92 | } | 93 | } |
93 | } | 94 | } |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 949c369..728329e 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -93,17 +93,17 @@ namespace OpenSim | |||
93 | 93 | ||
94 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 94 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
95 | 95 | ||
96 | this.SetupHttpListener(); | ||
97 | |||
96 | if (m_sandbox) | 98 | if (m_sandbox) |
97 | { | 99 | { |
98 | this.SetupLocalGridServers(); | 100 | this.SetupLocalGridServers(); |
99 | // this.checkServer = new CheckSumServer(12036); | 101 | // this.checkServer = new CheckSumServer(12036); |
100 | // this.checkServer.ServerListener(); | 102 | // this.checkServer.ServerListener(); |
101 | this.commsManager = new CommunicationsLocal(this.serversData); | ||
102 | } | 103 | } |
103 | else | 104 | else |
104 | { | 105 | { |
105 | this.SetupRemoteGridServers(); | 106 | this.SetupRemoteGridServers(); |
106 | this.commsManager = new CommunicationsOGS1(this.serversData); | ||
107 | } | 107 | } |
108 | 108 | ||
109 | startuptime = DateTime.Now; | 109 | startuptime = DateTime.Now; |
@@ -111,14 +111,10 @@ namespace OpenSim | |||
111 | this.physManager = new PhysicsManager(); | 111 | this.physManager = new PhysicsManager(); |
112 | this.physManager.LoadPlugins(); | 112 | this.physManager.LoadPlugins(); |
113 | 113 | ||
114 | this.SetupHttpListener(); | ||
115 | |||
116 | this.SetupWorld(); | 114 | this.SetupWorld(); |
117 | 115 | ||
118 | m_log.Verbose("Main.cs:Startup() - Initialising HTTP server"); | 116 | m_log.Verbose("Main.cs:Startup() - Initialising HTTP server"); |
119 | 117 | ||
120 | |||
121 | |||
122 | if (m_sandbox) | 118 | if (m_sandbox) |
123 | { | 119 | { |
124 | httpServer.AddXmlRPCHandler("login_to_simulator", ((CommunicationsLocal)this.commsManager).UserServices.XmlRpcLoginMethod); | 120 | httpServer.AddXmlRPCHandler("login_to_simulator", ((CommunicationsLocal)this.commsManager).UserServices.XmlRpcLoginMethod); |
@@ -143,6 +139,7 @@ namespace OpenSim | |||
143 | { | 139 | { |
144 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); | 140 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); |
145 | InventoryCache = new InventoryCache(); | 141 | InventoryCache = new InventoryCache(); |
142 | this.commsManager = new CommunicationsLocal(this.serversData, httpServer); | ||
146 | } | 143 | } |
147 | catch (Exception e) | 144 | catch (Exception e) |
148 | { | 145 | { |
@@ -156,8 +153,9 @@ namespace OpenSim | |||
156 | { | 153 | { |
157 | try | 154 | try |
158 | { | 155 | { |
159 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Remote.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); | 156 | AssetCache = new AssetCache("OpenSim.Region.GridInterfaces.Local.dll", this.serversData.AssetURL, this.serversData.AssetSendKey); |
160 | InventoryCache = new InventoryCache(); | 157 | InventoryCache = new InventoryCache(); |
158 | this.commsManager = new CommunicationsOGS1(this.serversData, httpServer); | ||
161 | } | 159 | } |
162 | catch (Exception e) | 160 | catch (Exception e) |
163 | { | 161 | { |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 982ae50..7d924d0 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -41,7 +41,6 @@ namespace OpenSim.Region.ClientStack | |||
41 | protected override void ProcessInPacket(Packet Pack) | 41 | protected override void ProcessInPacket(Packet Pack) |
42 | { | 42 | { |
43 | ack_pack(Pack); | 43 | ack_pack(Pack); |
44 | debug = true; | ||
45 | if (debug) | 44 | if (debug) |
46 | { | 45 | { |
47 | if (Pack.Type != PacketType.AgentUpdate) | 46 | if (Pack.Type != PacketType.AgentUpdate) |
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs index 24c6911..ec7b039 100644 --- a/OpenSim/Region/ClientStack/ClientViewBase.cs +++ b/OpenSim/Region/ClientStack/ClientViewBase.cs | |||
@@ -71,7 +71,8 @@ namespace OpenSim.Region.ClientStack | |||
71 | // Keep track of when this packet was sent out | 71 | // Keep track of when this packet was sent out |
72 | Pack.TickCount = Environment.TickCount; | 72 | Pack.TickCount = Environment.TickCount; |
73 | 73 | ||
74 | Console.WriteLine("OUT: " + Pack.Type.ToString()); | 74 | |
75 | // Console.WriteLine("OUT: " + Pack.Type.ToString()); | ||
75 | 76 | ||
76 | if (!Pack.Header.Resent) | 77 | if (!Pack.Header.Resent) |
77 | { | 78 | { |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 5d6ede8..a047843 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | using OpenSim.Framework.Communications; | 28 | using OpenSim.Framework.Communications; |
29 | using OpenSim.Framework.Types; | 29 | using OpenSim.Framework.Types; |
30 | using OpenSim.Framework.Servers; | ||
30 | 31 | ||
31 | namespace OpenSim.Region.Communications.Local | 32 | namespace OpenSim.Region.Communications.Local |
32 | { | 33 | { |
@@ -35,8 +36,8 @@ namespace OpenSim.Region.Communications.Local | |||
35 | public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); | 36 | public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); |
36 | public LocalUserServices UserServices; | 37 | public LocalUserServices UserServices; |
37 | 38 | ||
38 | public CommunicationsLocal(NetworkServersInfo serversInfo) | 39 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) |
39 | : base(serversInfo) | 40 | : base(serversInfo, httpServer) |
40 | { | 41 | { |
41 | UserServices = new LocalUserServices(this, serversInfo); | 42 | UserServices = new LocalUserServices(this, serversInfo); |
42 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); | 43 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 1118726..cc05845 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -1,14 +1,15 @@ | |||
1 | using OpenSim.Framework.Communications; | 1 | using OpenSim.Framework.Communications; |
2 | using OpenSim.Framework.Types; | 2 | using OpenSim.Framework.Types; |
3 | using OpenSim.Framework.Servers; | ||
3 | 4 | ||
4 | namespace OpenSim.Region.Communications.OGS1 | 5 | namespace OpenSim.Region.Communications.OGS1 |
5 | { | 6 | { |
6 | public class CommunicationsOGS1 : CommunicationsManager | 7 | public class CommunicationsOGS1 : CommunicationsManager |
7 | { | 8 | { |
8 | 9 | ||
9 | public CommunicationsOGS1(NetworkServersInfo serversInfo) :base(serversInfo) | 10 | public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer) |
10 | { | 11 | { |
11 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo); | 12 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); |
12 | GridServer = gridInterComms; | 13 | GridServer = gridInterComms; |
13 | InterRegion = gridInterComms; | 14 | InterRegion = gridInterComms; |
14 | UserServer = new OGS1UserServices(this); | 15 | UserServer = new OGS1UserServices(this); |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index b7d62ed..50a31c6 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -18,40 +18,50 @@ namespace OpenSim.Region.Communications.OGS1 | |||
18 | public class OGS1GridServices : IGridServices, IInterRegionCommunications | 18 | public class OGS1GridServices : IGridServices, IInterRegionCommunications |
19 | { | 19 | { |
20 | public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); | 20 | public Dictionary<ulong, RegionCommsListener> listeners = new Dictionary<ulong, RegionCommsListener>(); |
21 | protected Dictionary<ulong, RegionInfo> regions = new Dictionary<ulong, RegionInfo>(); | ||
22 | |||
21 | public BaseHttpServer httpListener; | 23 | public BaseHttpServer httpListener; |
22 | public NetworkServersInfo serversInfo; | 24 | public NetworkServersInfo serversInfo; |
25 | public BaseHttpServer httpServer; | ||
23 | 26 | ||
24 | public OGS1GridServices(NetworkServersInfo servers_info) | 27 | public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) |
25 | { | 28 | { |
26 | serversInfo = servers_info; | 29 | serversInfo = servers_info; |
30 | httpServer = httpServe; | ||
31 | httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser); | ||
27 | } | 32 | } |
28 | 33 | ||
29 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) | 34 | public RegionCommsListener RegisterRegion(RegionInfo regionInfo) |
30 | { | 35 | { |
36 | if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) | ||
37 | { | ||
38 | this.regions.Add(regionInfo.RegionHandle, regionInfo); | ||
39 | } | ||
40 | |||
31 | Hashtable GridParams = new Hashtable(); | 41 | Hashtable GridParams = new Hashtable(); |
32 | 42 | ||
33 | 43 | ||
34 | // Login / Authentication | 44 | // Login / Authentication |
35 | 45 | ||
36 | GridParams["authkey"] = serversInfo.GridSendKey; | 46 | GridParams["authkey"] = serversInfo.GridSendKey; |
37 | GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); | 47 | GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); |
38 | GridParams["sim_ip"] = regionInfo.ExternalHostName; | 48 | GridParams["sim_ip"] = regionInfo.ExternalHostName; |
39 | GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); | 49 | GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); |
40 | GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); | 50 | GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); |
41 | GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); | 51 | GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); |
42 | GridParams["sim_name"] = regionInfo.RegionName; | 52 | GridParams["sim_name"] = regionInfo.RegionName; |
53 | GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); | ||
54 | GridParams["remoting_port"] = serversInfo.RemotingListenerPort.ToString(); | ||
43 | 55 | ||
44 | // Package into an XMLRPC Request | 56 | // Package into an XMLRPC Request |
45 | ArrayList SendParams = new ArrayList(); | 57 | ArrayList SendParams = new ArrayList(); |
46 | SendParams.Add(GridParams); | 58 | SendParams.Add(GridParams); |
47 | 59 | ||
48 | |||
49 | |||
50 | // Send Request | 60 | // Send Request |
51 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); | 61 | XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); |
52 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); | 62 | XmlRpcResponse GridResp = GridReq.Send(serversInfo.GridURL, 3000); |
53 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 63 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
54 | 64 | ||
55 | Hashtable griddatahash = GridRespData; | 65 | Hashtable griddatahash = GridRespData; |
56 | 66 | ||
57 | // Process Response | 67 | // Process Response |
@@ -60,25 +70,34 @@ namespace OpenSim.Region.Communications.OGS1 | |||
60 | string errorstring = (string)GridRespData["error"]; | 70 | string errorstring = (string)GridRespData["error"]; |
61 | MainLog.Instance.Error("Unable to connect to grid: " + errorstring); | 71 | MainLog.Instance.Error("Unable to connect to grid: " + errorstring); |
62 | return null; | 72 | return null; |
63 | } | ||
64 | |||
65 | if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) | ||
66 | { | ||
67 | MainLog.Instance.Verbose("OGS1 - Registering new HTTP listener on port " + regionInfo.InternalEndPoint.Port.ToString()); | ||
68 | // initialised = true; | ||
69 | httpListener = new BaseHttpServer( regionInfo.InternalEndPoint.Port ); | ||
70 | httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser); | ||
71 | httpListener.Start(); | ||
72 | } | 73 | } |
73 | 74 | ||
75 | /* if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) | ||
76 | { | ||
77 | MainLog.Instance.Verbose("OGS1 - Registering new HTTP listener on port " + regionInfo.InternalEndPoint.Port.ToString()); | ||
78 | // initialised = true; | ||
79 | httpListener = new BaseHttpServer( regionInfo.InternalEndPoint.Port ); | ||
80 | httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser); | ||
81 | httpListener.Start(); | ||
82 | }*/ | ||
83 | |||
74 | // Initialise the background listeners | 84 | // Initialise the background listeners |
75 | listeners[regionInfo.RegionHandle] = new RegionCommsListener(); | 85 | RegionCommsListener regListener = new RegionCommsListener(); |
86 | if (this.listeners.ContainsKey(regionInfo.RegionHandle)) | ||
87 | { | ||
88 | this.listeners.Add(regionInfo.RegionHandle, regListener); | ||
89 | } | ||
90 | else | ||
91 | { | ||
92 | listeners[regionInfo.RegionHandle] = regListener; | ||
93 | } | ||
76 | 94 | ||
77 | return listeners[regionInfo.RegionHandle]; | 95 | return regListener; |
78 | } | 96 | } |
79 | 97 | ||
80 | public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) | 98 | public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) |
81 | { | 99 | { |
100 | |||
82 | Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); | 101 | Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); |
83 | 102 | ||
84 | List<RegionInfo> neighbours = new List<RegionInfo>(); | 103 | List<RegionInfo> neighbours = new List<RegionInfo>(); |
@@ -87,24 +106,28 @@ namespace OpenSim.Region.Communications.OGS1 | |||
87 | { | 106 | { |
88 | foreach (Hashtable n in a) | 107 | foreach (Hashtable n in a) |
89 | { | 108 | { |
90 | string internalIpStr = (string)n["sim_ip"]; | 109 | uint regX = Convert.ToUInt32(n["x"]); |
91 | int port = (int)n["sim_port"]; | 110 | uint regY = Convert.ToUInt32(n["y"]); |
92 | string externalUri = (string)n["sim_uri"]; | 111 | if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) |
93 | 112 | { | |
94 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), port); | 113 | string internalIpStr = (string)n["sim_ip"]; |
95 | string neighbourExternalUri = externalUri; | 114 | uint port = Convert.ToUInt32(n["sim_port"]); |
115 | string externalUri = (string)n["sim_uri"]; | ||
96 | 116 | ||
97 | RegionInfo neighbour = new RegionInfo((uint)n["x"], (uint)n["y"], neighbourInternalEndPoint, neighbourExternalUri); | 117 | IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); |
118 | string neighbourExternalUri = externalUri; | ||
119 | RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); | ||
98 | 120 | ||
99 | //OGS1 | 121 | //OGS1 |
100 | //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally | 122 | //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally |
101 | 123 | ||
102 | neighbour.RegionName = (string)n["name"]; | 124 | neighbour.RegionName = (string)n["name"]; |
103 | 125 | ||
104 | //OGS1+ | 126 | //OGS1+ |
105 | neighbour.SimUUID = (string)n["uuid"]; | 127 | neighbour.SimUUID = (string)n["uuid"]; |
106 | 128 | ||
107 | neighbours.Add(neighbour); | 129 | neighbours.Add(neighbour); |
130 | } | ||
108 | } | 131 | } |
109 | } | 132 | } |
110 | 133 | ||
@@ -113,6 +136,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
113 | 136 | ||
114 | public RegionInfo RequestNeighbourInfo(ulong regionHandle) | 137 | public RegionInfo RequestNeighbourInfo(ulong regionHandle) |
115 | { | 138 | { |
139 | if (this.regions.ContainsKey(regionHandle)) | ||
140 | { | ||
141 | return this.regions[regionHandle]; | ||
142 | } | ||
143 | //TODO not a region in this instance so ask remote grid server | ||
116 | MainLog.Instance.Warn("Unimplemented - RequestNeighbourInfo()"); | 144 | MainLog.Instance.Warn("Unimplemented - RequestNeighbourInfo()"); |
117 | return null; | 145 | return null; |
118 | } | 146 | } |
@@ -209,7 +237,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
209 | TcpChannel ch = new TcpChannel(8895); | 237 | TcpChannel ch = new TcpChannel(8895); |
210 | ChannelServices.RegisterChannel(ch, true); | 238 | ChannelServices.RegisterChannel(ch, true); |
211 | 239 | ||
212 | WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry( Type.GetType("OGS1InterRegionRemoting"), "InterRegions", WellKnownObjectMode.Singleton); | 240 | WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(Type.GetType("OGS1InterRegionRemoting"), "InterRegions", WellKnownObjectMode.Singleton); |
213 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); | 241 | RemotingConfiguration.RegisterWellKnownServiceType(wellType); |
214 | InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; | 242 | InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; |
215 | InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; | 243 | InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; |
@@ -225,6 +253,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
225 | } | 253 | } |
226 | //TODO need to see if we know about where this region is and use .net remoting | 254 | //TODO need to see if we know about where this region is and use .net remoting |
227 | // to inform it. | 255 | // to inform it. |
256 | Console.WriteLine("Inform remote region of child agent not implemented yet"); | ||
228 | return false; | 257 | return false; |
229 | } | 258 | } |
230 | 259 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 3a3bccb..2bbaf9d 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -47,7 +47,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
47 | } | 47 | } |
48 | public UserProfileData GetUserProfile(string name) | 48 | public UserProfileData GetUserProfile(string name) |
49 | { | 49 | { |
50 | |||
51 | //try | 50 | //try |
52 | //{ | 51 | //{ |
53 | Hashtable param = new Hashtable(); | 52 | Hashtable param = new Hashtable(); |
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 6360ae1..65a0395 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
57 | 57 | ||
58 | protected Quaternion m_rotation = new Quaternion(0,0,1,0); | 58 | protected Quaternion m_rotation = new Quaternion(0,0,1,0); |
59 | 59 | ||
60 | public virtual Quaternion rotation | 60 | public virtual Quaternion Rotation |
61 | { | 61 | { |
62 | get | 62 | get |
63 | { | 63 | { |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
86 | 86 | ||
87 | m_pos = new LLVector3(); | 87 | m_pos = new LLVector3(); |
88 | m_velocity = new LLVector3(); | 88 | m_velocity = new LLVector3(); |
89 | rotation = new Quaternion(); | 89 | Rotation = new Quaternion(); |
90 | m_name = "(basic entity)"; | 90 | m_name = "(basic entity)"; |
91 | children = new List<EntityBase>(); | 91 | children = new List<EntityBase>(); |
92 | } | 92 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive.cs index 05bb1f9..d23a569 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
83 | { | 83 | { |
84 | Primitive parentPrim = (Primitive)this.m_Parent; | 84 | Primitive parentPrim = (Primitive)this.m_Parent; |
85 | Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); | 85 | Axiom.Math.Vector3 offsetPos = new Vector3(this.m_pos.X, this.m_pos.Y, this.m_pos.Z); |
86 | offsetPos = parentPrim.rotation * offsetPos; | 86 | offsetPos = parentPrim.Rotation * offsetPos; |
87 | return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z); | 87 | return parentPrim.WorldPos + new LLVector3(offsetPos.x, offsetPos.y, offsetPos.z); |
88 | } | 88 | } |
89 | else | 89 | else |
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
139 | this.m_isRootPrim = isRoot; | 139 | this.m_isRootPrim = isRoot; |
140 | this.m_RootParent = rootObject; | 140 | this.m_RootParent = rootObject; |
141 | this.CreateFromPacket(addPacket, ownerID, localID); | 141 | this.CreateFromPacket(addPacket, ownerID, localID); |
142 | this.rotation = Axiom.Math.Quaternion.Identity; | 142 | this.Rotation = Axiom.Math.Quaternion.Identity; |
143 | } | 143 | } |
144 | 144 | ||
145 | /// <summary> | 145 | /// <summary> |
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
169 | dupe.LocalId = newLocalID; | 169 | dupe.LocalId = newLocalID; |
170 | 170 | ||
171 | dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); | 171 | dupe.Scale = new LLVector3(this.Scale.X, this.Scale.Y, this.Scale.Z); |
172 | dupe.rotation = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); | 172 | dupe.Rotation = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); |
173 | dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); | 173 | dupe.Pos = new LLVector3(this.Pos.X, this.Pos.Y, this.Pos.Z); |
174 | 174 | ||
175 | return dupe; | 175 | return dupe; |
@@ -278,10 +278,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
278 | this.m_RootParent.AddChildToList(this); | 278 | this.m_RootParent.AddChildToList(this); |
279 | this.Pos = oldPos; | 279 | this.Pos = oldPos; |
280 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); | 280 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); |
281 | axPos = this.m_Parent.rotation.Inverse() * axPos; | 281 | axPos = this.m_Parent.Rotation.Inverse() * axPos; |
282 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | 282 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); |
283 | Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); | 283 | Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); |
284 | this.rotation = this.m_Parent.rotation.Inverse() * this.rotation; | 284 | this.Rotation = this.m_Parent.Rotation.Inverse() * this.Rotation; |
285 | this.updateFlag = 1; | 285 | this.updateFlag = 1; |
286 | 286 | ||
287 | foreach (Primitive child in children) | 287 | foreach (Primitive child in children) |
@@ -304,7 +304,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
304 | axOldPos = oldParentRotation * axOldPos; | 304 | axOldPos = oldParentRotation * axOldPos; |
305 | oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); | 305 | oldPos = new LLVector3(axOldPos.x, axOldPos.y, axOldPos.z); |
306 | oldPos += oldParentPosition; | 306 | oldPos += oldParentPosition; |
307 | Axiom.Math.Quaternion oldRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); | 307 | Axiom.Math.Quaternion oldRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); |
308 | this.m_isRootPrim = false; | 308 | this.m_isRootPrim = false; |
309 | this.m_Parent = newParent; | 309 | this.m_Parent = newParent; |
310 | this.ParentID = newParent.LocalId; | 310 | this.ParentID = newParent.LocalId; |
@@ -313,10 +313,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
313 | this.m_RootParent.AddChildToList(this); | 313 | this.m_RootParent.AddChildToList(this); |
314 | this.Pos = oldPos; | 314 | this.Pos = oldPos; |
315 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); | 315 | Axiom.Math.Vector3 axPos = new Axiom.Math.Vector3(this.m_pos.X, m_pos.Y, m_pos.Z); |
316 | axPos = this.m_Parent.rotation.Inverse() * axPos; | 316 | axPos = this.m_Parent.Rotation.Inverse() * axPos; |
317 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | 317 | this.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); |
318 | this.rotation = oldParentRotation * this.rotation; | 318 | this.Rotation = oldParentRotation * this.Rotation; |
319 | this.rotation = this.m_Parent.rotation.Inverse()* this.rotation ; | 319 | this.Rotation = this.m_Parent.Rotation.Inverse()* this.Rotation ; |
320 | this.updateFlag = 1; | 320 | this.updateFlag = 1; |
321 | foreach (Primitive child in children) | 321 | foreach (Primitive child in children) |
322 | { | 322 | { |
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
401 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | 401 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); |
402 | LLVector3 diff = oldPos - newPos; | 402 | LLVector3 diff = oldPos - newPos; |
403 | Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); | 403 | Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z); |
404 | axDiff = this.rotation.Inverse() * axDiff; | 404 | axDiff = this.Rotation.Inverse() * axDiff; |
405 | diff.X = axDiff.x; | 405 | diff.X = axDiff.x; |
406 | diff.Y = axDiff.y; | 406 | diff.Y = axDiff.y; |
407 | diff.Z = axDiff.z; | 407 | diff.Z = axDiff.z; |
@@ -431,7 +431,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | /// <param name="rot"></param> | 431 | /// <param name="rot"></param> |
432 | public void UpdateGroupRotation(LLQuaternion rot) | 432 | public void UpdateGroupRotation(LLQuaternion rot) |
433 | { | 433 | { |
434 | this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 434 | this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
435 | this.updateFlag = 2; | 435 | this.updateFlag = 2; |
436 | 436 | ||
437 | } | 437 | } |
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
443 | /// <param name="rot"></param> | 443 | /// <param name="rot"></param> |
444 | public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) | 444 | public void UpdateGroupMouseRotation(LLVector3 pos, LLQuaternion rot) |
445 | { | 445 | { |
446 | this.rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 446 | this.Rotation = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
447 | this.Pos = pos; | 447 | this.Pos = pos; |
448 | this.updateFlag = 2; | 448 | this.updateFlag = 2; |
449 | } | 449 | } |
@@ -456,16 +456,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
456 | { | 456 | { |
457 | //Console.WriteLine("updating single prim rotation"); | 457 | //Console.WriteLine("updating single prim rotation"); |
458 | Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 458 | Axiom.Math.Quaternion axRot = new Axiom.Math.Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
459 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.rotation.w, this.rotation.x, this.rotation.y, this.rotation.z); | 459 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.Rotation.w, this.Rotation.x, this.Rotation.y, this.Rotation.z); |
460 | this.rotation = axRot; | 460 | this.Rotation = axRot; |
461 | foreach (Primitive prim in this.children) | 461 | foreach (Primitive prim in this.children) |
462 | { | 462 | { |
463 | Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); | 463 | Axiom.Math.Vector3 axPos = new Vector3(prim.m_pos.X, prim.m_pos.Y, prim.m_pos.Z); |
464 | axPos = oldParentRot * axPos; | 464 | axPos = oldParentRot * axPos; |
465 | axPos = axRot.Inverse() * axPos; | 465 | axPos = axRot.Inverse() * axPos; |
466 | prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); | 466 | prim.m_pos = new LLVector3(axPos.x, axPos.y, axPos.z); |
467 | prim.rotation = oldParentRot * prim.rotation ; | 467 | prim.Rotation = oldParentRot * prim.Rotation ; |
468 | prim.rotation = axRot.Inverse()* prim.rotation; | 468 | prim.Rotation = axRot.Inverse()* prim.Rotation; |
469 | prim.updateFlag = 2; | 469 | prim.updateFlag = 2; |
470 | } | 470 | } |
471 | this.updateFlag = 2; | 471 | this.updateFlag = 2; |
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
528 | LLVector3 lPos; | 528 | LLVector3 lPos; |
529 | lPos = this.Pos; | 529 | lPos = this.Pos; |
530 | LLQuaternion lRot; | 530 | LLQuaternion lRot; |
531 | lRot = new LLQuaternion(this.rotation.x, this.rotation.y, this.rotation.z, this.rotation.w); | 531 | lRot = new LLQuaternion(this.Rotation.x, this.Rotation.y, this.Rotation.z, this.Rotation.w); |
532 | 532 | ||
533 | remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID); | 533 | remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.m_Shape, lPos, lRot, new LLUUID("00000000-0000-0000-9999-000000000005"), this.m_flags, this.uuid, this.OwnerID, this.Text, this.ParentID); |
534 | } | 534 | } |
@@ -571,7 +571,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
571 | Quaternion lRot; | 571 | Quaternion lRot; |
572 | 572 | ||
573 | lPos = this.Pos; | 573 | lPos = this.Pos; |
574 | lRot = this.rotation; | 574 | lRot = this.Rotation; |
575 | 575 | ||
576 | LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); | 576 | LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); |
577 | RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); | 577 | RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); |
diff --git a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs index 4933b01..91a4162 100644 --- a/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs +++ b/OpenSim/Region/Environment/Scenes/PrimitiveOld.cs | |||
@@ -445,7 +445,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
445 | else | 445 | else |
446 | { | 446 | { |
447 | lPos = this.Pos; | 447 | lPos = this.Pos; |
448 | lRot = this.rotation; | 448 | lRot = this.Rotation; |
449 | } | 449 | } |
450 | LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); | 450 | LLQuaternion mRot = new LLQuaternion(lRot.x, lRot.y, lRot.z, lRot.w); |
451 | RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); | 451 | RemoteClient.SendPrimTerseUpdate(this.m_regionHandle, 64096, this.LocalId, lPos, mRot); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index e64e147..69eaa75 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
164 | case 1: // Say | 164 | case 1: // Say |
165 | if ((dis < 30) && (dis > -30)) | 165 | if ((dis < 30) && (dis > -30)) |
166 | { | 166 | { |
167 | Console.WriteLine("sending chat"); | 167 | //Console.WriteLine("sending chat"); |
168 | client.SendChatMessage(message, type, fromPos, fromName, | 168 | client.SendChatMessage(message, type, fromPos, fromName, |
169 | fromAgentID); | 169 | fromAgentID); |
170 | } | 170 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 81c56c4..cd81384 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -685,15 +685,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
685 | /// </summary> | 685 | /// </summary> |
686 | public void InformClientOfNeighbours(IClientAPI remoteClient) | 686 | public void InformClientOfNeighbours(IClientAPI remoteClient) |
687 | { | 687 | { |
688 | // Console.WriteLine("informing client of neighbouring regions"); | ||
689 | List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo); | 688 | List<RegionInfo> neighbours = this.commsManager.GridServer.RequestNeighbours(this.m_regInfo); |
690 | 689 | ||
691 | //Console.WriteLine("we have " + neighbours.Count + " neighbouring regions"); | ||
692 | if (neighbours != null) | 690 | if (neighbours != null) |
693 | { | 691 | { |
694 | for (int i = 0; i < neighbours.Count; i++) | 692 | for (int i = 0; i < neighbours.Count; i++) |
695 | { | 693 | { |
696 | // Console.WriteLine("sending neighbours data"); | ||
697 | AgentCircuitData agent = remoteClient.RequestClientInfo(); | 694 | AgentCircuitData agent = remoteClient.RequestClientInfo(); |
698 | agent.BaseFolder = LLUUID.Zero; | 695 | agent.BaseFolder = LLUUID.Zero; |
699 | agent.InventoryFolder = LLUUID.Zero; | 696 | agent.InventoryFolder = LLUUID.Zero; |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index b0e7710..7330bc5 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
124 | Wearables = AvatarWearable.DefaultWearables; | 124 | Wearables = AvatarWearable.DefaultWearables; |
125 | Animations = new ScenePresence.AvatarAnimations(); | 125 | Animations = new ScenePresence.AvatarAnimations(); |
126 | Animations.LoadAnims(); | 126 | Animations.LoadAnims(); |
127 | 127 | ||
128 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); | 128 | this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); |
129 | 129 | ||
130 | //register for events | 130 | //register for events |
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
160 | { | 160 | { |
161 | this.Velocity = new LLVector3(0, 0, 0); | 161 | this.Velocity = new LLVector3(0, 0, 0); |
162 | this.Pos = new LLVector3(128, 128, 70); | 162 | this.Pos = new LLVector3(128, 128, 70); |
163 | 163 | ||
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
@@ -276,25 +276,31 @@ namespace OpenSim.Region.Environment.Scenes | |||
276 | { | 276 | { |
277 | this.AddNewMovement(agent_control_v3, q); | 277 | this.AddNewMovement(agent_control_v3, q); |
278 | } | 278 | } |
279 | UpdateMovementAnimations(update_movementflag); | 279 | UpdateMovementAnimations(update_movementflag); |
280 | } | 280 | } |
281 | 281 | ||
282 | protected void UpdateMovementAnimations(bool update_movementflag) | 282 | protected void UpdateMovementAnimations(bool update_movementflag) |
283 | { | 283 | { |
284 | if (update_movementflag) | 284 | if (update_movementflag) |
285 | { | 285 | { |
286 | if (movementflag != 0) { | 286 | if (movementflag != 0) |
287 | if (this._physActor.Flying) { | 287 | { |
288 | this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1); | 288 | if (this._physActor.Flying) |
289 | } else { | 289 | { |
290 | this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | 290 | this.SendAnimPack(Animations.AnimsLLUUID["FLY"], 1); |
291 | } | 291 | } |
292 | } else { | 292 | else |
293 | this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1); | 293 | { |
294 | } | 294 | this.SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); |
295 | } | 295 | } |
296 | 296 | } | |
297 | } | 297 | else |
298 | { | ||
299 | this.SendAnimPack(Animations.AnimsLLUUID["STAND"], 1); | ||
300 | } | ||
301 | } | ||
302 | |||
303 | } | ||
298 | 304 | ||
299 | 305 | ||
300 | protected void AddNewMovement(Vector3 vec, Quaternion rotation) | 306 | protected void AddNewMovement(Vector3 vec, Quaternion rotation) |
@@ -423,13 +429,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
423 | /// <param name="seq"></param> | 429 | /// <param name="seq"></param> |
424 | public void SendAnimPack(LLUUID animID, int seq) | 430 | public void SendAnimPack(LLUUID animID, int seq) |
425 | { | 431 | { |
426 | this.current_anim = animID; | 432 | this.current_anim = animID; |
427 | this.anim_seq = anim_seq; | 433 | this.anim_seq = anim_seq; |
428 | List<ScenePresence> avatars = this.m_world.RequestAvatarList(); | 434 | List<ScenePresence> avatars = this.m_world.RequestAvatarList(); |
429 | for (int i = 0; i < avatars.Count; i++) | 435 | for (int i = 0; i < avatars.Count; i++) |
430 | { | 436 | { |
431 | avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); | 437 | avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); |
432 | } | 438 | } |
433 | } | 439 | } |
434 | 440 | ||
435 | /// <summary> | 441 | /// <summary> |
@@ -437,7 +443,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
437 | /// </summary> | 443 | /// </summary> |
438 | public void SendAnimPack() | 444 | public void SendAnimPack() |
439 | { | 445 | { |
440 | this.SendAnimPack(this.current_anim, this.anim_seq); | 446 | this.SendAnimPack(this.current_anim, this.anim_seq); |
441 | } | 447 | } |
442 | #endregion | 448 | #endregion |
443 | 449 | ||
@@ -506,7 +512,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
506 | if (res) | 512 | if (res) |
507 | { | 513 | { |
508 | this.MakeChildAgent(); | 514 | this.MakeChildAgent(); |
509 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.InternalEndPoint ); | 515 | this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.InternalEndPoint); |
510 | } | 516 | } |
511 | } | 517 | } |
512 | } | 518 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 5cfc769..87e877c 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -47,13 +47,13 @@ namespace SimpleApp | |||
47 | udpServer.ServerListener(); | 47 | udpServer.ServerListener(); |
48 | 48 | ||
49 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); | 49 | ClientView.TerrainManager = new TerrainManager(new SecondLife()); |
50 | BaseHttpServer httpServer = new BaseHttpServer(internalEndPoint.Port); | ||
50 | 51 | ||
51 | NetworkServersInfo serverInfo = new NetworkServersInfo(); | 52 | NetworkServersInfo serverInfo = new NetworkServersInfo(); |
52 | CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo); | 53 | CommunicationsLocal communicationsManager = new CommunicationsLocal(serverInfo, httpServer); |
53 | 54 | ||
54 | RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" ); | 55 | RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" ); |
55 | 56 | ||
56 | BaseHttpServer httpServer = new BaseHttpServer( internalEndPoint.Port ); | ||
57 | MyWorld world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); | 57 | MyWorld world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); |
58 | world.PhysScene = PhysicsScene.Null; | 58 | world.PhysScene = PhysicsScene.Null; |
59 | udpServer.LocalWorld = world; | 59 | udpServer.LocalWorld = world; |
diff --git a/prebuild.xml b/prebuild.xml index 1dcd58a..688437a 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -512,6 +512,7 @@ | |||
512 | <Reference name="System.Xml"/> | 512 | <Reference name="System.Xml"/> |
513 | <Reference name="OpenSim.Framework"/> | 513 | <Reference name="OpenSim.Framework"/> |
514 | <Reference name="OpenSim.Framework.Data" /> | 514 | <Reference name="OpenSim.Framework.Data" /> |
515 | <Reference name="OpenSim.Framework.Servers"/> | ||
515 | <Reference name="libsecondlife.dll"/> | 516 | <Reference name="libsecondlife.dll"/> |
516 | 517 | ||
517 | <Files> | 518 | <Files> |
@@ -567,6 +568,7 @@ | |||
567 | <Reference name="OpenSim.Framework.Communications"/> | 568 | <Reference name="OpenSim.Framework.Communications"/> |
568 | <Reference name="OpenSim.Framework.UserManagement" /> | 569 | <Reference name="OpenSim.Framework.UserManagement" /> |
569 | <Reference name="OpenSim.Framework.Data" /> | 570 | <Reference name="OpenSim.Framework.Data" /> |
571 | <Reference name="OpenSim.Framework.Servers"/> | ||
570 | <Reference name="libsecondlife.dll"/> | 572 | <Reference name="libsecondlife.dll"/> |
571 | <Reference name="OpenSim.Framework"/> | 573 | <Reference name="OpenSim.Framework"/> |
572 | 574 | ||