aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/Assets/InventoryCache.cs
diff options
context:
space:
mode:
authorMW2007-03-23 16:05:32 +0000
committerMW2007-03-23 16:05:32 +0000
commit085c184c5c58e22aaa3f276f980b3c81e92c9cb5 (patch)
tree7a3f9611422b7ea34715c265cc27d844f8bfdca1 /OpenSim.RegionServer/Assets/InventoryCache.cs
parent* whoops - missing project... (diff)
downloadopensim-SC_OLD-085c184c5c58e22aaa3f276f980b3c81e92c9cb5.zip
opensim-SC_OLD-085c184c5c58e22aaa3f276f980b3c81e92c9cb5.tar.gz
opensim-SC_OLD-085c184c5c58e22aaa3f276f980b3c81e92c9cb5.tar.bz2
opensim-SC_OLD-085c184c5c58e22aaa3f276f980b3c81e92c9cb5.tar.xz
Fixed it so that a Avatar update shouldn't be sent every frame and none should be sent when not moving.
Fixed the problem with sometimes Avatar Animations being updated every frame. New Asset uploads should now appear in the inventory all the time. Moved Animation names/ LLUUIDs to their own class (AvatarAnimations)
Diffstat (limited to 'OpenSim.RegionServer/Assets/InventoryCache.cs')
-rw-r--r--OpenSim.RegionServer/Assets/InventoryCache.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs
index 0788db2..e4d0a90 100644
--- a/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ b/OpenSim.RegionServer/Assets/InventoryCache.cs
@@ -84,6 +84,11 @@ namespace OpenSim.Assets
84 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 84 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
85 { 85 {
86 newItem = this._agentsInventory[remoteClient.AgentID].AddToInventory(folderID, asset); 86 newItem = this._agentsInventory[remoteClient.AgentID].AddToInventory(folderID, asset);
87 if (newItem != null)
88 {
89 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[newItem];
90 this.SendItemUpdateCreate(remoteClient, Item);
91 }
87 } 92 }
88 93
89 return newItem; 94 return newItem;
@@ -185,6 +190,37 @@ namespace OpenSim.Assets
185 } 190 }
186 } 191 }
187 } 192 }
193 private void SendItemUpdateCreate(SimClient remoteClient, InventoryItem Item)
194 {
195
196 UpdateCreateInventoryItemPacket InventoryReply = new UpdateCreateInventoryItemPacket();
197 InventoryReply.AgentData.AgentID = remoteClient.AgentID;
198 InventoryReply.AgentData.SimApproved = true;
199 InventoryReply.InventoryData = new UpdateCreateInventoryItemPacket.InventoryDataBlock[1];
200 InventoryReply.InventoryData[0] = new UpdateCreateInventoryItemPacket.InventoryDataBlock();
201 InventoryReply.InventoryData[0].ItemID = Item.ItemID;
202 InventoryReply.InventoryData[0].AssetID = Item.AssetID;
203 InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
204 InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
205 InventoryReply.InventoryData[0].CreationDate = 1000;
206 InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
207 InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
208 InventoryReply.InventoryData[0].Flags = 1;
209 InventoryReply.InventoryData[0].FolderID = Item.FolderID;
210 InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
211 InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
212 InventoryReply.InventoryData[0].InvType = Item.InvType;
213 InventoryReply.InventoryData[0].Name = _enc.GetBytes(Item.Name + "\0");
214 InventoryReply.InventoryData[0].NextOwnerMask = FULL_MASK_PERMISSIONS;
215 InventoryReply.InventoryData[0].OwnerID = Item.OwnerID;
216 InventoryReply.InventoryData[0].OwnerMask = FULL_MASK_PERMISSIONS;
217 InventoryReply.InventoryData[0].SalePrice = 100;
218 InventoryReply.InventoryData[0].SaleType = 0;
219 InventoryReply.InventoryData[0].Type = Item.Type;
220 InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
221
222 remoteClient.OutPacket(InventoryReply);
223 }
188 } 224 }
189 225
190 226