aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim.RegionServer/ClientView.ProcessPackets.cs12
-rw-r--r--OpenSim.RegionServer/ClientView.cs10
-rw-r--r--OpenSim.RegionServer/world/Avatar.Update.cs5
-rw-r--r--OpenSim.RegionServer/world/World.PacketHandlers.cs14
-rw-r--r--OpenSim.RegionServer/world/World.cs2
5 files changed, 27 insertions, 16 deletions
diff --git a/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index 16f418d..708c143 100644
--- a/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -38,6 +38,7 @@ namespace OpenSim
38 public event GenericCall2 OnCompleteMovementToRegion; 38 public event GenericCall2 OnCompleteMovementToRegion;
39 public event GenericCall3 OnAgentUpdate; 39 public event GenericCall3 OnAgentUpdate;
40 public event StartAnim OnStartAnim; 40 public event StartAnim OnStartAnim;
41 public event GenericCall OnRequestAvatarsData;
41 42
42 protected override void ProcessInPacket(Packet Pack) 43 protected override void ProcessInPacket(Packet Pack)
43 { 44 {
@@ -106,16 +107,7 @@ namespace OpenSim
106 break; 107 break;
107 case PacketType.AgentWearablesRequest: 108 case PacketType.AgentWearablesRequest:
108 OnRequestWearables(this); 109 OnRequestWearables(this);
109 //need to move the follow to a event system 110 OnRequestAvatarsData(this);
110 foreach (ClientView client in m_clientThreads.Values)
111 {
112 if (client.AgentID != this.AgentID)
113 {
114 ObjectUpdatePacket objupdate = client.ClientAvatar.CreateUpdatePacket();
115 this.OutPacket(objupdate);
116 client.ClientAvatar.SendAppearanceToOtherAgent(this.ClientAvatar);
117 }
118 }
119 break; 111 break;
120 case PacketType.AgentSetAppearance: 112 case PacketType.AgentSetAppearance:
121 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; 113 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
diff --git a/OpenSim.RegionServer/ClientView.cs b/OpenSim.RegionServer/ClientView.cs
index 63bbfab..ccea2f3 100644
--- a/OpenSim.RegionServer/ClientView.cs
+++ b/OpenSim.RegionServer/ClientView.cs
@@ -52,6 +52,9 @@ namespace OpenSim
52 /// </summary> 52 /// </summary>
53 public partial class ClientView : ClientViewBase 53 public partial class ClientView : ClientViewBase
54 { 54 {
55 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
56 protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
57
55 public LLUUID AgentID; 58 public LLUUID AgentID;
56 public LLUUID SessionID; 59 public LLUUID SessionID;
57 public LLUUID SecureSessionID = LLUUID.Zero; 60 public LLUUID SecureSessionID = LLUUID.Zero;
@@ -75,10 +78,6 @@ namespace OpenSim
75 private RegionInfo m_regionData; 78 private RegionInfo m_regionData;
76 protected AuthenticateSessionsBase m_authenticateSessionsHandler; 79 protected AuthenticateSessionsBase m_authenticateSessionsHandler;
77 80
78 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
79
80 protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance
81
82 public IUserServer UserServer 81 public IUserServer UserServer
83 { 82 {
84 set 83 set
@@ -233,8 +232,6 @@ namespace OpenSim
233 return result; 232 return result;
234 } 233 }
235 234
236 # endregion
237
238 protected virtual void ClientLoop() 235 protected virtual void ClientLoop()
239 { 236 {
240 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ClientLoop() - Entered loop"); 237 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "OpenSimClient.cs:ClientLoop() - Entered loop");
@@ -253,6 +250,7 @@ namespace OpenSim
253 } 250 }
254 } 251 }
255 } 252 }
253 # endregion
256 254
257 # region Setup 255 # region Setup
258 256
diff --git a/OpenSim.RegionServer/world/Avatar.Update.cs b/OpenSim.RegionServer/world/Avatar.Update.cs
index ee72ba3..266fc38 100644
--- a/OpenSim.RegionServer/world/Avatar.Update.cs
+++ b/OpenSim.RegionServer/world/Avatar.Update.cs
@@ -93,6 +93,11 @@ namespace OpenSim.world
93 } 93 }
94 94
95 } 95 }
96 public void SendUpdateToOtherClient(Avatar RemoteAvatar)
97 {
98 ObjectUpdatePacket objupdate = CreateUpdatePacket();
99 RemoteAvatar.SendPacketToViewer(objupdate);
100 }
96 101
97 public ObjectUpdatePacket CreateUpdatePacket() 102 public ObjectUpdatePacket CreateUpdatePacket()
98 { 103 {
diff --git a/OpenSim.RegionServer/world/World.PacketHandlers.cs b/OpenSim.RegionServer/world/World.PacketHandlers.cs
index d12013a..119bb19 100644
--- a/OpenSim.RegionServer/world/World.PacketHandlers.cs
+++ b/OpenSim.RegionServer/world/World.PacketHandlers.cs
@@ -168,6 +168,20 @@ namespace OpenSim.world
168 return true; 168 return true;
169 } 169 }
170 170
171 public void SendAvatarsToClient(ClientView RemoteClient)
172 {
173 foreach (ClientView client in m_clientThreads.Values)
174 {
175 if (client.AgentID != RemoteClient.AgentID)
176 {
177 // ObjectUpdatePacket objupdate = client.ClientAvatar.CreateUpdatePacket();
178 // RemoteClient.OutPacket(objupdate);
179 client.ClientAvatar.SendUpdateToOtherClient(RemoteClient.ClientAvatar);
180 client.ClientAvatar.SendAppearanceToOtherAgent(RemoteClient.ClientAvatar);
181 }
182 }
183 }
184
171 /* 185 /*
172 public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY) 186 public void RequestMapBlock(ClientView simClient, int minX, int minY, int maxX, int maxY)
173 { 187 {
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs
index 70ca680..99fb8e0 100644
--- a/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim.RegionServer/world/World.cs
@@ -538,6 +538,8 @@ namespace OpenSim.world
538 agentClient.OnModifyTerrain += new ClientView.ModifyTerrain(this.ModifyTerrain); 538 agentClient.OnModifyTerrain += new ClientView.ModifyTerrain(this.ModifyTerrain);
539 agentClient.OnRegionHandShakeReply += new ClientView.GenericCall(this.SendLayerData); 539 agentClient.OnRegionHandShakeReply += new ClientView.GenericCall(this.SendLayerData);
540 agentClient.OnRequestWearables += new ClientView.GenericCall(this.GetInitialPrims); 540 agentClient.OnRequestWearables += new ClientView.GenericCall(this.GetInitialPrims);
541 agentClient.OnRequestAvatarsData += new ClientView.GenericCall(this.SendAvatarsToClient);
542
541 try 543 try
542 { 544 {
543 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 545 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");