diff options
author | Justin Clarke Casey | 2008-12-15 20:32:49 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-15 20:32:49 +0000 |
commit | 41ad030a5aacaf0b0d43d08df2ff331368f88936 (patch) | |
tree | 0a03960e8bb6596e168a01d3d82727248cabbd1d /OpenSim/Region | |
parent | * Apply http://opensimulator.org/mantis/view.php?id=2775 with small tweaks (diff) | |
download | opensim-SC-41ad030a5aacaf0b0d43d08df2ff331368f88936.zip opensim-SC-41ad030a5aacaf0b0d43d08df2ff331368f88936.tar.gz opensim-SC-41ad030a5aacaf0b0d43d08df2ff331368f88936.tar.bz2 opensim-SC-41ad030a5aacaf0b0d43d08df2ff331368f88936.tar.xz |
* minor: method documentation and miscellaneous tidy
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 44 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 15 |
3 files changed, 45 insertions, 35 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8b20946..9fb3c55 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1021,14 +1021,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1021 | public void ActivateGesture(UUID assetId, UUID gestureId) | 1021 | public void ActivateGesture(UUID assetId, UUID gestureId) |
1022 | { | 1022 | { |
1023 | } | 1023 | } |
1024 | |||
1024 | public void DeactivateGesture(UUID assetId, UUID gestureId) | 1025 | public void DeactivateGesture(UUID assetId, UUID gestureId) |
1025 | { | 1026 | { |
1026 | } | 1027 | } |
1027 | 1028 | ||
1028 | // Sound | 1029 | // Sound |
1029 | public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid,UUID ParentId,float Gain, Vector3 Position,UInt64 Handle) | 1030 | public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid,UUID ParentId,float Gain, Vector3 Position,UInt64 Handle) |
1030 | { | 1031 | { |
1031 | |||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | #region Scene/Avatar to Client | 1034 | #region Scene/Avatar to Client |
@@ -2801,11 +2801,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2801 | OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); | 2801 | OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); |
2802 | } | 2802 | } |
2803 | 2803 | ||
2804 | public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, | 2804 | public void SendObjectPropertiesReply( |
2805 | UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, | 2805 | UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, |
2806 | UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, | 2806 | UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, |
2807 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, | 2807 | UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, |
2808 | uint BaseMask, byte saleType, int salePrice) | 2808 | string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, |
2809 | uint BaseMask, byte saleType, int salePrice) | ||
2809 | { | 2810 | { |
2810 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 2811 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |
2811 | // TODO: don't create new blocks if recycling an old packet | 2812 | // TODO: don't create new blocks if recycling an old packet |
@@ -4139,6 +4140,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4139 | //there is a handler registered that handled this packet type | 4140 | //there is a handler registered that handled this packet type |
4140 | return; | 4141 | return; |
4141 | } | 4142 | } |
4143 | |||
4142 | // Main packet processing conditional | 4144 | // Main packet processing conditional |
4143 | switch (Pack.Type) | 4145 | switch (Pack.Type) |
4144 | { | 4146 | { |
@@ -4160,6 +4162,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4160 | } | 4162 | } |
4161 | 4163 | ||
4162 | break; | 4164 | break; |
4165 | |||
4163 | case PacketType.ChatFromViewer: | 4166 | case PacketType.ChatFromViewer: |
4164 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; | 4167 | ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; |
4165 | 4168 | ||
@@ -4188,6 +4191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4188 | handlerChatFromClient(this, args); | 4191 | handlerChatFromClient(this, args); |
4189 | } | 4192 | } |
4190 | break; | 4193 | break; |
4194 | |||
4191 | case PacketType.AvatarPropertiesUpdate: | 4195 | case PacketType.AvatarPropertiesUpdate: |
4192 | AvatarPropertiesUpdatePacket Packet = (AvatarPropertiesUpdatePacket)Pack; | 4196 | AvatarPropertiesUpdatePacket Packet = (AvatarPropertiesUpdatePacket)Pack; |
4193 | 4197 | ||
@@ -4226,6 +4230,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4226 | } | 4230 | } |
4227 | 4231 | ||
4228 | break; | 4232 | break; |
4233 | |||
4229 | case PacketType.ImprovedInstantMessage: | 4234 | case PacketType.ImprovedInstantMessage: |
4230 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; | 4235 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; |
4231 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); | 4236 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); |
@@ -4309,7 +4314,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4309 | } | 4314 | } |
4310 | break; | 4315 | break; |
4311 | 4316 | ||
4312 | case PacketType.DeRezObject: | 4317 | case PacketType.DeRezObject: |
4313 | DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack; | 4318 | DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack; |
4314 | handlerDeRezObject = OnDeRezObject; | 4319 | handlerDeRezObject = OnDeRezObject; |
4315 | if (handlerDeRezObject != null) | 4320 | if (handlerDeRezObject != null) |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5e16082..c98c4f3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -284,6 +284,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
284 | { | 284 | { |
285 | part.Inventory.RemoveScriptInstance(item.ItemID); | 285 | part.Inventory.RemoveScriptInstance(item.ItemID); |
286 | } | 286 | } |
287 | |||
287 | // Update item with new asset | 288 | // Update item with new asset |
288 | item.AssetID = asset.FullID; | 289 | item.AssetID = asset.FullID; |
289 | group.UpdateInventoryItem(item); | 290 | group.UpdateInventoryItem(item); |
@@ -2050,21 +2051,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
2050 | RezSelected, RemoveItem, fromTaskID, false); | 2051 | RezSelected, RemoveItem, fromTaskID, false); |
2051 | } | 2052 | } |
2052 | 2053 | ||
2053 | /// <summary> | 2054 | /// <summary> |
2054 | /// Returns SceneObjectGroup or null from asset request. | 2055 | /// Rez an object into the scene from the user's inventory |
2055 | /// </summary> | 2056 | /// </summary> |
2056 | /// <param name="remoteClient"></param> | 2057 | /// <param name="remoteClient"></param> |
2057 | /// <param name="itemID"></param> | 2058 | /// <param name="itemID"></param> |
2058 | /// <param name="RayEnd"></param> | 2059 | /// <param name="RayEnd"></param> |
2059 | /// <param name="RayStart"></param> | 2060 | /// <param name="RayStart"></param> |
2060 | /// <param name="RayTargetID"></param> | 2061 | /// <param name="RayTargetID"></param> |
2061 | /// <param name="BypassRayCast"></param> | 2062 | /// <param name="BypassRayCast"></param> |
2062 | /// <param name="RayEndIsIntersection"></param> | 2063 | /// <param name="RayEndIsIntersection"></param> |
2063 | /// <param name="RezSelected"></param> | 2064 | /// <param name="RezSelected"></param> |
2064 | /// <param name="RemoveItem"></param> | 2065 | /// <param name="RemoveItem"></param> |
2065 | /// <param name="fromTaskID"></param> | 2066 | /// <param name="fromTaskID"></param> |
2066 | /// <param name="difference"></param> | 2067 | /// <param name="attachment"></param> |
2067 | /// <returns></returns> | 2068 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful.</returns> |
2068 | public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, | 2069 | public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, |
2069 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | 2070 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, |
2070 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) | 2071 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) |
@@ -2141,7 +2142,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2141 | if (attachment) | 2142 | if (attachment) |
2142 | isAttachment = " Object was an attachment"; | 2143 | isAttachment = " Object was an attachment"; |
2143 | 2144 | ||
2144 | m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); | 2145 | m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); |
2145 | } | 2146 | } |
2146 | 2147 | ||
2147 | // Since renaming the item in the inventory does not affect the name stored | 2148 | // Since renaming the item in the inventory does not affect the name stored |
@@ -2200,11 +2201,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2200 | group.ClearPartAttachmentData(); | 2201 | group.ClearPartAttachmentData(); |
2201 | } | 2202 | } |
2202 | } | 2203 | } |
2203 | 2204 | ||
2204 | // Fire on_rez | ||
2205 | if (!attachment) | 2205 | if (!attachment) |
2206 | { | 2206 | { |
2207 | // Fire on_rez | ||
2207 | group.CreateScriptInstances(0, true, DefaultScriptEngine, 0); | 2208 | group.CreateScriptInstances(0, true, DefaultScriptEngine, 0); |
2209 | |||
2208 | rootPart.ScheduleFullUpdate(); | 2210 | rootPart.ScheduleFullUpdate(); |
2209 | } | 2211 | } |
2210 | 2212 | ||
@@ -2230,14 +2232,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
2230 | } | 2232 | } |
2231 | 2233 | ||
2232 | /// <summary> | 2234 | /// <summary> |
2233 | /// Rez an object in the scene | 2235 | /// Rez an object into the scene from a prim's inventory. |
2234 | /// </summary> | 2236 | /// </summary> |
2237 | /// <param name="sourcePart"></param> | ||
2235 | /// <param name="item"></param> | 2238 | /// <param name="item"></param> |
2236 | /// <param name="pos"></param> | 2239 | /// <param name="pos"></param> |
2237 | /// <param name="rot"></param> | 2240 | /// <param name="rot"></param> |
2238 | /// <param name="vel"></param> | 2241 | /// <param name="vel"></param> |
2239 | /// <param name="param"></param> | 2242 | /// <param name="param"></param> |
2240 | /// <returns></returns> | 2243 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful</returns> |
2241 | public virtual SceneObjectGroup RezObject( | 2244 | public virtual SceneObjectGroup RezObject( |
2242 | SceneObjectPart sourcePart, TaskInventoryItem item, | 2245 | SceneObjectPart sourcePart, TaskInventoryItem item, |
2243 | Vector3 pos, Quaternion rot, Vector3 vel, int param) | 2246 | Vector3 pos, Quaternion rot, Vector3 vel, int param) |
@@ -2338,6 +2341,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2338 | DeRezObject(null, grp.RootPart.LocalId, | 2341 | DeRezObject(null, grp.RootPart.LocalId, |
2339 | grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); | 2342 | grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); |
2340 | } | 2343 | } |
2344 | |||
2341 | return true; | 2345 | return true; |
2342 | } | 2346 | } |
2343 | 2347 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5a43df6..10a37ee 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1602,13 +1602,14 @@ if (m_shape != null) { | |||
1602 | 1602 | ||
1603 | public void GetProperties(IClientAPI client) | 1603 | public void GetProperties(IClientAPI client) |
1604 | { | 1604 | { |
1605 | client.SendObjectPropertiesReply(UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, | 1605 | client.SendObjectPropertiesReply( |
1606 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, | 1606 | UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, |
1607 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, | 1607 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, |
1608 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, | 1608 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, |
1609 | ParentGroup.RootPart._baseMask, | 1609 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, |
1610 | ParentGroup.RootPart.ObjectSaleType, | 1610 | ParentGroup.RootPart._baseMask, |
1611 | ParentGroup.RootPart.SalePrice); | 1611 | ParentGroup.RootPart.ObjectSaleType, |
1612 | ParentGroup.RootPart.SalePrice); | ||
1612 | } | 1613 | } |
1613 | 1614 | ||
1614 | public UUID GetRootPartUUID() | 1615 | public UUID GetRootPartUUID() |