diff options
author | MW | 2007-04-10 10:45:46 +0000 |
---|---|---|
committer | MW | 2007-04-10 10:45:46 +0000 |
commit | 03f5ff9dc21767d1757c9b9ccd3c7ef40b49880f (patch) | |
tree | e1f250436e82f9911f2dfa740a967328891e18de | |
parent | And now clothes update and show for all users (diff) | |
download | opensim-SC-03f5ff9dc21767d1757c9b9ccd3c7ef40b49880f.zip opensim-SC-03f5ff9dc21767d1757c9b9ccd3c7ef40b49880f.tar.gz opensim-SC-03f5ff9dc21767d1757c9b9ccd3c7ef40b49880f.tar.bz2 opensim-SC-03f5ff9dc21767d1757c9b9ccd3c7ef40b49880f.tar.xz |
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 36 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/AvatarUpdate.cs | 19 |
2 files changed, 30 insertions, 25 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 40076d1..6d174c8 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim | |||
85 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients | 85 | protected static Dictionary<PacketType, PacketMethod> PacketHandlers = new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients |
86 | 86 | ||
87 | protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance | 87 | protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>(); //local handlers for this instance |
88 | 88 | ||
89 | public IUserServer UserServer | 89 | public IUserServer UserServer |
90 | { | 90 | { |
91 | set | 91 | set |
@@ -224,7 +224,7 @@ namespace OpenSim | |||
224 | else | 224 | else |
225 | { | 225 | { |
226 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; | 226 | System.Text.Encoding _enc = System.Text.Encoding.ASCII; |
227 | 227 | ||
228 | switch (Pack.Type) | 228 | switch (Pack.Type) |
229 | { | 229 | { |
230 | case PacketType.CompleteAgentMovement: | 230 | case PacketType.CompleteAgentMovement: |
@@ -272,7 +272,7 @@ namespace OpenSim | |||
272 | if (ent.localid == parentprimid) | 272 | if (ent.localid == parentprimid) |
273 | { | 273 | { |
274 | parentprim = (OpenSim.world.Primitive)ent; | 274 | parentprim = (OpenSim.world.Primitive)ent; |
275 | 275 | ||
276 | } | 276 | } |
277 | } | 277 | } |
278 | for (int i = 1; i < link.ObjectData.Length; i++) | 278 | for (int i = 1; i < link.ObjectData.Length; i++) |
@@ -365,7 +365,7 @@ namespace OpenSim | |||
365 | } | 365 | } |
366 | else | 366 | else |
367 | { | 367 | { |
368 | // Console.Write(Pack.ToString()); | 368 | // Console.Write(Pack.ToString()); |
369 | this.CreateInventoryItem(createItem); | 369 | this.CreateInventoryItem(createItem); |
370 | } | 370 | } |
371 | break; | 371 | break; |
@@ -388,7 +388,7 @@ namespace OpenSim | |||
388 | AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); | 388 | AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID)); |
389 | if (asset != null) | 389 | if (asset != null) |
390 | { | 390 | { |
391 | // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); | 391 | // Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache"); |
392 | m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); | 392 | m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset); |
393 | } | 393 | } |
394 | else | 394 | else |
@@ -444,7 +444,7 @@ namespace OpenSim | |||
444 | } | 444 | } |
445 | break; | 445 | break; |
446 | case PacketType.UpdateTaskInventory: | 446 | case PacketType.UpdateTaskInventory: |
447 | // Console.WriteLine(Pack.ToString()); | 447 | // Console.WriteLine(Pack.ToString()); |
448 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; | 448 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; |
449 | AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID); | 449 | AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID); |
450 | if (myinventory != null) | 450 | if (myinventory != null) |
@@ -476,16 +476,16 @@ namespace OpenSim | |||
476 | } | 476 | } |
477 | break; | 477 | break; |
478 | case PacketType.AgentAnimation: | 478 | case PacketType.AgentAnimation: |
479 | AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; | 479 | AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack; |
480 | for (int i = 0; i < AgentAni.AnimationList.Length; i++) | 480 | for (int i = 0; i < AgentAni.AnimationList.Length; i++) |
481 | { | 481 | { |
482 | if (AgentAni.AnimationList[i].StartAnim) | 482 | if (AgentAni.AnimationList[i].StartAnim) |
483 | { | 483 | { |
484 | ClientAvatar.current_anim = AgentAni.AnimationList[i].AnimID; | 484 | ClientAvatar.current_anim = AgentAni.AnimationList[i].AnimID; |
485 | ClientAvatar.anim_seq = 1; | 485 | ClientAvatar.anim_seq = 1; |
486 | ClientAvatar.SendAnimPack(); | 486 | ClientAvatar.SendAnimPack(); |
487 | } | 487 | } |
488 | } | 488 | } |
489 | break; | 489 | break; |
490 | case PacketType.ObjectSelect: | 490 | case PacketType.ObjectSelect: |
491 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 491 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
@@ -828,7 +828,7 @@ namespace OpenSim | |||
828 | }*/ | 828 | }*/ |
829 | m_world.RemoveViewerAgent(this); | 829 | m_world.RemoveViewerAgent(this); |
830 | //need to do other cleaning up here too | 830 | //need to do other cleaning up here too |
831 | m_clientThreads.Remove(this.CircuitCode); | 831 | m_clientThreads.Remove(this.CircuitCode); |
832 | m_application.RemoveClientCircuit(this.CircuitCode); | 832 | m_application.RemoveClientCircuit(this.CircuitCode); |
833 | this.ClientThread.Abort(); | 833 | this.ClientThread.Abort(); |
834 | return true; | 834 | return true; |
@@ -836,7 +836,7 @@ namespace OpenSim | |||
836 | 836 | ||
837 | protected bool AgentTextureCached(SimClient simclient, Packet packet) | 837 | protected bool AgentTextureCached(SimClient simclient, Packet packet) |
838 | { | 838 | { |
839 | // Console.WriteLine(packet.ToString()); | 839 | // Console.WriteLine(packet.ToString()); |
840 | AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet; | 840 | AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet; |
841 | AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); | 841 | AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); |
842 | cachedresp.AgentData.AgentID = this.AgentID; | 842 | cachedresp.AgentData.AgentID = this.AgentID; |
diff --git a/OpenSim.RegionServer/world/AvatarUpdate.cs b/OpenSim.RegionServer/world/AvatarUpdate.cs index cfb138a..d315de7 100644 --- a/OpenSim.RegionServer/world/AvatarUpdate.cs +++ b/OpenSim.RegionServer/world/AvatarUpdate.cs | |||
@@ -109,8 +109,11 @@ namespace OpenSim.world | |||
109 | client.OutPacket(objupdate); | 109 | client.OutPacket(objupdate); |
110 | if (client.AgentID != ControllingClient.AgentID) | 110 | if (client.AgentID != ControllingClient.AgentID) |
111 | { | 111 | { |
112 | client.ClientAvatar.SendAppearanceToOtherAgent(this.ControllingClient); | 112 | //the below line is already in Simclient.cs at line number 245 , directly below the call to this method |
113 | SendAppearanceToOtherAgent(client); | 113 | //if there is a problem/bug with that , then lets fix it there rather than duplicating it here |
114 | //client.ClientAvatar.SendAppearanceToOtherAgent(this.ControllingClient); | ||
115 | |||
116 | SendAppearanceToOtherAgent(client); | ||
114 | } | 117 | } |
115 | } | 118 | } |
116 | } | 119 | } |
@@ -142,10 +145,12 @@ namespace OpenSim.world | |||
142 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; | 145 | avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; |
143 | avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes(); | 146 | avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes(); |
144 | 147 | ||
145 | AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); | 148 | //a wearable update packets should only be sent about the viewers/agents own avatar not for other avatars |
149 | //but it seems that the following code only created the packets and never actually sent them anyway | ||
150 | /*AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); | ||
146 | aw.AgentData.AgentID = this.ControllingClient.AgentID; | 151 | aw.AgentData.AgentID = this.ControllingClient.AgentID; |
147 | aw.AgentData.SessionID = userInfo.SessionID; | 152 | aw.AgentData.SessionID = userInfo.SessionID; |
148 | aw.AgentData.SerialNum = (uint)(new Random()).Next(); | 153 | aw.AgentData.SerialNum = 0; //removed the use of a random number as a random number could be less than the last number, should have a counter variable for this |
149 | 154 | ||
150 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | 155 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; |
151 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 156 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
@@ -156,8 +161,8 @@ namespace OpenSim.world | |||
156 | awb.AssetID = this.Wearables[i].AssetID; | 161 | awb.AssetID = this.Wearables[i].AssetID; |
157 | awb.ItemID = this.Wearables[i].ItemID; | 162 | awb.ItemID = this.Wearables[i].ItemID; |
158 | aw.WearableData[i] = awb; | 163 | aw.WearableData[i] = awb; |
159 | } | 164 | }*/ |
160 | 165 | ||
161 | AvatarAppearancePacket.VisualParamBlock avblock = null; | 166 | AvatarAppearancePacket.VisualParamBlock avblock = null; |
162 | for (int i = 0; i < 218; i++) | 167 | for (int i = 0; i < 218; i++) |
163 | { | 168 | { |