diff options
Diffstat (limited to 'OpenSim.RegionServer/world/World.cs')
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 983e66d..c90e3f6 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.world | |||
57 | /// <param name="clientThreads">Dictionary to contain client threads</param> | 57 | /// <param name="clientThreads">Dictionary to contain client threads</param> |
58 | /// <param name="regionHandle">Region Handle for this region</param> | 58 | /// <param name="regionHandle">Region Handle for this region</param> |
59 | /// <param name="regionName">Region Name for this region</param> | 59 | /// <param name="regionName">Region Name for this region</param> |
60 | public World(Dictionary<uint, SimClient> clientThreads, RegionInfo regInfo, ulong regionHandle, string regionName) | 60 | public World(Dictionary<uint, ClientView> clientThreads, RegionInfo regInfo, ulong regionHandle, string regionName) |
61 | { | 61 | { |
62 | try | 62 | try |
63 | { | 63 | { |
@@ -324,7 +324,7 @@ namespace OpenSim.world | |||
324 | } | 324 | } |
325 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); | 325 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
326 | 326 | ||
327 | foreach (SimClient client in m_clientThreads.Values) | 327 | foreach (ClientView client in m_clientThreads.Values) |
328 | { | 328 | { |
329 | this.SendLayerData(client); | 329 | this.SendLayerData(client); |
330 | } | 330 | } |
@@ -355,7 +355,7 @@ namespace OpenSim.world | |||
355 | } | 355 | } |
356 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); | 356 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
357 | 357 | ||
358 | foreach (SimClient client in m_clientThreads.Values) | 358 | foreach (ClientView client in m_clientThreads.Values) |
359 | { | 359 | { |
360 | this.SendLayerData(client); | 360 | this.SendLayerData(client); |
361 | } | 361 | } |
@@ -389,7 +389,7 @@ namespace OpenSim.world | |||
389 | } | 389 | } |
390 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); | 390 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
391 | 391 | ||
392 | foreach (SimClient client in m_clientThreads.Values) | 392 | foreach (ClientView client in m_clientThreads.Values) |
393 | { | 393 | { |
394 | this.SendLayerData(pointx, pointy, client); | 394 | this.SendLayerData(pointx, pointy, client); |
395 | } | 395 | } |
@@ -437,7 +437,7 @@ namespace OpenSim.world | |||
437 | /// Sends prims to a client | 437 | /// Sends prims to a client |
438 | /// </summary> | 438 | /// </summary> |
439 | /// <param name="RemoteClient">Client to send to</param> | 439 | /// <param name="RemoteClient">Client to send to</param> |
440 | public void GetInitialPrims(SimClient RemoteClient) | 440 | public void GetInitialPrims(ClientView RemoteClient) |
441 | { | 441 | { |
442 | try | 442 | try |
443 | { | 443 | { |
@@ -495,7 +495,7 @@ namespace OpenSim.world | |||
495 | } | 495 | } |
496 | } | 496 | } |
497 | 497 | ||
498 | public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient) | 498 | public void AddNewPrim(ObjectAddPacket addPacket, ClientView AgentClient) |
499 | { | 499 | { |
500 | AddNewPrim(addPacket, AgentClient.AgentID); | 500 | AddNewPrim(addPacket, AgentClient.AgentID); |
501 | } | 501 | } |
@@ -530,8 +530,9 @@ namespace OpenSim.world | |||
530 | 530 | ||
531 | #region Add/Remove Avatar Methods | 531 | #region Add/Remove Avatar Methods |
532 | 532 | ||
533 | public override void AddViewerAgent(SimClient agentClient) | 533 | public override void AddViewerAgent(ClientView agentClient) |
534 | { | 534 | { |
535 | agentClient.OnChatFromViewer += new ClientView.ChatFromViewer(this.SimChat); | ||
535 | try | 536 | try |
536 | { | 537 | { |
537 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); | 538 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); |
@@ -576,7 +577,7 @@ namespace OpenSim.world | |||
576 | } | 577 | } |
577 | } | 578 | } |
578 | 579 | ||
579 | public override void RemoveViewerAgent(SimClient agentClient) | 580 | public override void RemoveViewerAgent(ClientView agentClient) |
580 | { | 581 | { |
581 | try | 582 | try |
582 | { | 583 | { |
@@ -600,6 +601,23 @@ namespace OpenSim.world | |||
600 | } | 601 | } |
601 | #endregion | 602 | #endregion |
602 | 603 | ||
604 | #region Request Avatars List Methods | ||
605 | //The idea is to have a group of method that return a list of avatars meeting some requirement | ||
606 | // ie it could be all Avatars within a certain range of the calling prim/avatar. | ||
607 | |||
608 | public List<Avatar> RequestAvatarList() | ||
609 | { | ||
610 | List<Avatar> result = new List<Avatar>(); | ||
611 | |||
612 | foreach (Avatar avatar in Avatars.Values) | ||
613 | { | ||
614 | result.Add(avatar); | ||
615 | } | ||
616 | |||
617 | return result; | ||
618 | } | ||
619 | #endregion | ||
620 | |||
603 | #region ShutDown | 621 | #region ShutDown |
604 | /// <summary> | 622 | /// <summary> |
605 | /// Tidy before shutdown | 623 | /// Tidy before shutdown |