diff options
Diffstat (limited to 'OpenSim/OpenSim.World/World.cs')
-rw-r--r-- | OpenSim/OpenSim.World/World.cs | 32 |
1 files changed, 26 insertions, 6 deletions
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 | { |