diff options
author | Justin Clarke Casey | 2008-09-12 20:42:04 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-12 20:42:04 +0000 |
commit | 62d1eba3b2cf1ff9e43e64a22d27b1ee73e6c2c6 (patch) | |
tree | d2c900cdedcbe7be61f0aa82388314abf8e50df3 | |
parent | * Add userstore sql upgrade I carelessly forgot to check in a couple of revis... (diff) | |
download | opensim-SC-62d1eba3b2cf1ff9e43e64a22d27b1ee73e6c2c6.zip opensim-SC-62d1eba3b2cf1ff9e43e64a22d27b1ee73e6c2c6.tar.gz opensim-SC-62d1eba3b2cf1ff9e43e64a22d27b1ee73e6c2c6.tar.bz2 opensim-SC-62d1eba3b2cf1ff9e43e64a22d27b1ee73e6c2c6.tar.xz |
* Patch http://opensimulator.org/mantis/view.php?id=2167
* Force ClickAction persistence even if other object properties are not edited
* Thanks nlin!
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 1 |
6 files changed, 30 insertions, 7 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ac97375..1678185 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -422,6 +422,7 @@ namespace OpenSim.Framework | |||
422 | event ObjectDeselect OnObjectDeselect; | 422 | event ObjectDeselect OnObjectDeselect; |
423 | event GenericCall7 OnObjectDescription; | 423 | event GenericCall7 OnObjectDescription; |
424 | event GenericCall7 OnObjectName; | 424 | event GenericCall7 OnObjectName; |
425 | event GenericCall7 OnObjectClickAction; | ||
425 | event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 426 | event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
426 | event UpdatePrimFlags OnUpdatePrimFlags; | 427 | event UpdatePrimFlags OnUpdatePrimFlags; |
427 | event UpdatePrimTexture OnUpdatePrimTexture; | 428 | event UpdatePrimTexture OnUpdatePrimTexture; |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6235381..57a995c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -170,6 +170,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
170 | private ObjectSelect handlerDeGrabObject = null; //OnDeGrabObject; | 170 | private ObjectSelect handlerDeGrabObject = null; //OnDeGrabObject; |
171 | private GenericCall7 handlerObjectDescription = null; | 171 | private GenericCall7 handlerObjectDescription = null; |
172 | private GenericCall7 handlerObjectName = null; | 172 | private GenericCall7 handlerObjectName = null; |
173 | private GenericCall7 handlerObjectClickAction = null; | ||
173 | private ObjectPermissions handlerObjectPermissions = null; | 174 | private ObjectPermissions handlerObjectPermissions = null; |
174 | private RequestObjectPropertiesFamily handlerRequestObjectPropertiesFamily = null; //OnRequestObjectPropertiesFamily; | 175 | private RequestObjectPropertiesFamily handlerRequestObjectPropertiesFamily = null; //OnRequestObjectPropertiesFamily; |
175 | private TextureRequest handlerTextureRequest = null; | 176 | private TextureRequest handlerTextureRequest = null; |
@@ -864,6 +865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
864 | public event ObjectDeselect OnObjectDeselect; | 865 | public event ObjectDeselect OnObjectDeselect; |
865 | public event GenericCall7 OnObjectDescription; | 866 | public event GenericCall7 OnObjectDescription; |
866 | public event GenericCall7 OnObjectName; | 867 | public event GenericCall7 OnObjectName; |
868 | public event GenericCall7 OnObjectClickAction; | ||
867 | public event ObjectIncludeInSearch OnObjectIncludeInSearch; | 869 | public event ObjectIncludeInSearch OnObjectIncludeInSearch; |
868 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 870 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
869 | public event UpdatePrimFlags OnUpdatePrimFlags; | 871 | public event UpdatePrimFlags OnUpdatePrimFlags; |
@@ -4774,16 +4776,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4774 | 4776 | ||
4775 | case PacketType.ObjectClickAction: | 4777 | case PacketType.ObjectClickAction: |
4776 | ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; | 4778 | ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; |
4777 | Scene tScene = (Scene)m_scene; | ||
4778 | 4779 | ||
4779 | foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData) | 4780 | handlerObjectClickAction = OnObjectClickAction; |
4781 | if(handlerObjectClickAction != null) | ||
4780 | { | 4782 | { |
4781 | byte action = odata.ClickAction; | 4783 | foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData) |
4782 | uint localId = odata.ObjectLocalID; | 4784 | { |
4783 | SceneObjectPart part = tScene.GetSceneObjectPart(localId); | 4785 | byte action = odata.ClickAction; |
4784 | part.ClickAction = action; | 4786 | uint localID = odata.ObjectLocalID; |
4787 | handlerObjectClickAction(this, localID, action.ToString()); | ||
4788 | } | ||
4785 | } | 4789 | } |
4786 | |||
4787 | break; | 4790 | break; |
4788 | 4791 | ||
4789 | #endregion | 4792 | #endregion |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index a4491f6..a1d72be 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -211,6 +211,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
211 | public event ObjectSelect OnObjectSelect; | 211 | public event ObjectSelect OnObjectSelect; |
212 | public event GenericCall7 OnObjectDescription; | 212 | public event GenericCall7 OnObjectDescription; |
213 | public event GenericCall7 OnObjectName; | 213 | public event GenericCall7 OnObjectName; |
214 | public event GenericCall7 OnObjectClickAction; | ||
214 | public event UpdatePrimFlags OnUpdatePrimFlags; | 215 | public event UpdatePrimFlags OnUpdatePrimFlags; |
215 | public event UpdatePrimTexture OnUpdatePrimTexture; | 216 | public event UpdatePrimTexture OnUpdatePrimTexture; |
216 | public event UpdateVector OnUpdatePrimGroupPosition; | 217 | public event UpdateVector OnUpdatePrimGroupPosition; |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index bfe6832..20442aa 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1218,6 +1218,22 @@ namespace OpenSim.Region.Environment.Scenes | |||
1218 | } | 1218 | } |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | protected internal void PrimClickAction(IClientAPI remoteClient, uint primLocalID, string clickAction) | ||
1222 | { | ||
1223 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | ||
1224 | if (group != null) | ||
1225 | { | ||
1226 | if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID, remoteClient.AgentId)) | ||
1227 | { | ||
1228 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID); | ||
1229 | part.ClickAction = Convert.ToByte(clickAction); | ||
1230 | group.HasGroupChanged = true; | ||
1231 | } | ||
1232 | } | ||
1233 | } | ||
1234 | |||
1235 | |||
1236 | |||
1221 | protected internal void UpdateExtraParam(UUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) | 1237 | protected internal void UpdateExtraParam(UUID agentID, uint primLocalID, ushort type, bool inUse, byte[] data) |
1222 | { | 1238 | { |
1223 | SceneObjectGroup group = GetGroupByPrim(primLocalID); | 1239 | SceneObjectGroup group = GetGroupByPrim(primLocalID); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 9c2dd06..5b58804 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2144,6 +2144,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2144 | client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; | 2144 | client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; |
2145 | client.OnObjectDescription += m_innerScene.PrimDescription; | 2145 | client.OnObjectDescription += m_innerScene.PrimDescription; |
2146 | client.OnObjectName += m_innerScene.PrimName; | 2146 | client.OnObjectName += m_innerScene.PrimName; |
2147 | client.OnObjectClickAction += m_innerScene.PrimClickAction; | ||
2147 | client.OnLinkObjects += m_innerScene.LinkObjects; | 2148 | client.OnLinkObjects += m_innerScene.LinkObjects; |
2148 | client.OnDelinkObjects += m_innerScene.DelinkObjects; | 2149 | client.OnDelinkObjects += m_innerScene.DelinkObjects; |
2149 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; | 2150 | client.OnObjectDuplicate += m_innerScene.DuplicateObject; |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index c42eaeb..623325e 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -106,6 +106,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
106 | public event ObjectSelect OnObjectSelect; | 106 | public event ObjectSelect OnObjectSelect; |
107 | public event GenericCall7 OnObjectDescription; | 107 | public event GenericCall7 OnObjectDescription; |
108 | public event GenericCall7 OnObjectName; | 108 | public event GenericCall7 OnObjectName; |
109 | public event GenericCall7 OnObjectClickAction; | ||
109 | public event UpdatePrimFlags OnUpdatePrimFlags; | 110 | public event UpdatePrimFlags OnUpdatePrimFlags; |
110 | public event UpdatePrimTexture OnUpdatePrimTexture; | 111 | public event UpdatePrimTexture OnUpdatePrimTexture; |
111 | public event UpdateVector OnUpdatePrimGroupPosition; | 112 | public event UpdateVector OnUpdatePrimGroupPosition; |