aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs2
-rw-r--r--Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs2
-rw-r--r--Common/OpenSim.Framework/Interfaces/IClientAPI.cs1
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs29
-rw-r--r--OpenSim/OpenSim.World/World.cs32
5 files changed, 58 insertions, 8 deletions
diff --git a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
index 2b8c5ca..0b2b72e 100644
--- a/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
+++ b/Common/OpenGrid.Framework.Communications/RegionServerCommsManager.cs
@@ -50,7 +50,7 @@ namespace OpenGrid.Framework.Communications
50 /// 50 ///
51 /// </summary> 51 /// </summary>
52 /// <returns></returns> 52 /// <returns></returns>
53 public virtual bool InformNeighbourOfChildAgent( uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData 53 public virtual bool InformNeighbourOfChildAgent( ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
54 { 54 {
55 return false; 55 return false;
56 } 56 }
diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
index b4fe696..54ca966 100644
--- a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
+++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs
@@ -53,7 +53,7 @@ namespace OpenGrid.Framework.Communications
53 /// 53 ///
54 /// </summary> 54 /// </summary>
55 /// <returns></returns> 55 /// <returns></returns>
56 public override bool InformNeighbourOfChildAgent(uint regionHandle, AgentCircuitData agentData) //should change from agentCircuitData 56 public override bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData
57 { 57 {
58 return false; 58 return false;
59 } 59 }
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index 5c5cda4..78be30a 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -84,5 +84,6 @@ namespace OpenSim.Framework.Interfaces
84 void SendRegionHandshake(RegionInfo regionInfo); 84 void SendRegionHandshake(RegionInfo regionInfo);
85 void MoveAgentIntoRegion(RegionInfo regInfo); 85 void MoveAgentIntoRegion(RegionInfo regInfo);
86 void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos); 86 void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos);
87 AgentCircuitData RequestClientInfo();
87 } 88 }
88} 89}
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index b7d87ed..e14b7b7 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -373,6 +373,35 @@ namespace OpenSim
373 373
374 return objdata; 374 return objdata;
375 } 375 }
376
377 protected void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort)
378 {
379 EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
380 enablesimpacket.SimulatorInfo = new EnableSimulatorPacket.SimulatorInfoBlock();
381 enablesimpacket.SimulatorInfo.Handle = neighbourHandle;
382
383 byte[] byteIP = neighbourIP.GetAddressBytes();
384 enablesimpacket.SimulatorInfo.IP = (uint)byteIP[3] << 24;
385 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[2] << 16;
386 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[1] << 8;
387 enablesimpacket.SimulatorInfo.IP += (uint)byteIP[0];
388 enablesimpacket.SimulatorInfo.Port = neighbourPort;
389 OutPacket(enablesimpacket);
390 }
391
392 public AgentCircuitData RequestClientInfo()
393 {
394 AgentCircuitData agentData = new AgentCircuitData();
395 agentData.AgentID = this.AgentId;
396 agentData.SessionID = this.SessionID;
397 agentData.SecureSessionID = this.SecureSessionID;
398 agentData.circuitcode = this.CircuitCode;
399 agentData.child = false;
400 agentData.firstname = this.firstName;
401 agentData.lastname = this.lastName;
402
403 return agentData;
404 }
376 #endregion 405 #endregion
377 406
378 } 407 }
diff --git a/OpenSim/OpenSim.World/World.cs b/OpenSim/OpenSim.World/World.cs
index 69d4646..2c5971d 100644
--- a/OpenSim/OpenSim.World/World.cs
+++ b/OpenSim/OpenSim.World/World.cs
@@ -92,7 +92,7 @@ namespace OpenSim.world
92 Avatar.SetupTemplate("avatar-texture.dat"); 92 Avatar.SetupTemplate("avatar-texture.dat");
93 93
94 Avatar.LoadAnims(); 94 Avatar.LoadAnims();
95 95
96 //this.SetDefaultScripts(); 96 //this.SetDefaultScripts();
97 //this.LoadScriptEngines(); 97 //this.LoadScriptEngines();
98 98
@@ -115,7 +115,7 @@ namespace OpenSim.world
115 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat); 115 m_heartbeatTimer.Elapsed += new ElapsedEventHandler(this.Heartbeat);
116 } 116 }
117 117
118 118
119 #region Update Methods 119 #region Update Methods
120 120
121 121
@@ -268,6 +268,7 @@ namespace OpenSim.world
268 268
269 #endregion 269 #endregion
270 270
271
271 #region Regenerate Terrain 272 #region Regenerate Terrain
272 273
273 /// <summary> 274 /// <summary>
@@ -451,6 +452,7 @@ namespace OpenSim.world
451 remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData); 452 remoteClient.OnRegionHandShakeReply += new GenericCall(this.SendLayerData);
452 //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); 453 //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
453 remoteClient.OnChatFromViewer += new ChatFromViewer(this.SimChat); 454 remoteClient.OnChatFromViewer += new ChatFromViewer(this.SimChat);
455 remoteClient.OnRequestWearables += new GenericCall(this.InformClientOfNeighbours);
454 456
455 Avatar newAvatar = null; 457 Avatar newAvatar = null;
456 try 458 try
@@ -460,13 +462,13 @@ namespace OpenSim.world
460 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 462 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
461 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 463 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
462 newAvatar.SendRegionHandshake(); 464 newAvatar.SendRegionHandshake();
463 465
464 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z); 466 PhysicsVector pVec = new PhysicsVector(newAvatar.Pos.X, newAvatar.Pos.Y, newAvatar.Pos.Z);
465 lock (this.LockPhysicsEngine) 467 lock (this.LockPhysicsEngine)
466 { 468 {
467 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec); 469 newAvatar.PhysActor = this.phyScene.AddAvatar(pVec);
468 } 470 }
469 471
470 lock (Entities) 472 lock (Entities)
471 { 473 {
472 if (!Entities.ContainsKey(agentID)) 474 if (!Entities.ContainsKey(agentID))
@@ -500,6 +502,24 @@ namespace OpenSim.world
500 /// <summary> 502 /// <summary>
501 /// 503 ///
502 /// </summary> 504 /// </summary>
505 protected void InformClientOfNeighbours(IClientAPI remoteClient)
506 {
507 List<RegionInfo> neighbours = this.commsManager.RequestNeighbours(this.m_regInfo);
508
509
510 for (int i = 0; i < neighbours.Count; i++)
511 {
512 AgentCircuitData agent = remoteClient.RequestClientInfo();
513 agent.BaseFolder = LLUUID.Zero;
514 agent.InventoryFolder = LLUUID.Zero;
515 agent.startpos = new LLVector3(128, 128, 70);
516 this.commsManager.InformNeighbourOfChildAgent(neighbours[i].RegionHandle, agent);
517 }
518 }
519
520 /// <summary>
521 ///
522 /// </summary>
503 /// <param name="agentID"></param> 523 /// <param name="agentID"></param>
504 public override void RemoveAvatar(LLUUID agentID) 524 public override void RemoveAvatar(LLUUID agentID)
505 { 525 {
@@ -556,9 +576,9 @@ namespace OpenSim.world
556 } 576 }
557 } 577 }
558 578
559 public void NewUserConnection(ulong regionHandle,AgentCircuitData agent) 579 public void NewUserConnection(ulong regionHandle, AgentCircuitData agent)
560 { 580 {
561 Console.WriteLine("World.cs - add new user connection"); 581 Console.WriteLine("World.cs - add new user connection");
562 //should just check that its meant for this region 582 //should just check that its meant for this region
563 if (regionHandle == this.m_regInfo.RegionHandle) 583 if (regionHandle == this.m_regInfo.RegionHandle)
564 { 584 {