diff options
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 12 |
2 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 5256c9e..6dccf77 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -1082,6 +1082,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1082 | } | 1082 | } |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | /// <summary> | ||
1086 | /// Update the position of the given part | ||
1087 | /// </summary> | ||
1088 | /// <param name="localID"></param> | ||
1089 | /// <param name="pos"></param> | ||
1090 | /// <param name="remoteClient"></param> | ||
1085 | protected internal void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) | 1091 | protected internal void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) |
1086 | { | 1092 | { |
1087 | SceneObjectGroup group = GetGroupByPrim(localID); | 1093 | SceneObjectGroup group = GetGroupByPrim(localID); |
@@ -1093,6 +1099,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1093 | group.SendGroupTerseUpdate(); | 1099 | group.SendGroupTerseUpdate(); |
1094 | return; | 1100 | return; |
1095 | } | 1101 | } |
1102 | |||
1096 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment) | 1103 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment) |
1097 | { | 1104 | { |
1098 | group.UpdateSinglePosition(pos, localID); | 1105 | group.UpdateSinglePosition(pos, localID); |
@@ -1101,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1101 | } | 1108 | } |
1102 | 1109 | ||
1103 | /// <summary> | 1110 | /// <summary> |
1104 | /// | 1111 | /// Update the position of the given part |
1105 | /// </summary> | 1112 | /// </summary> |
1106 | /// <param name="localID"></param> | 1113 | /// <param name="localID"></param> |
1107 | /// <param name="pos"></param> | 1114 | /// <param name="pos"></param> |
@@ -1122,6 +1129,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1122 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment) | 1129 | if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment) |
1123 | { | 1130 | { |
1124 | group.SendGroupTerseUpdate(); | 1131 | group.SendGroupTerseUpdate(); |
1132 | |||
1125 | return; | 1133 | return; |
1126 | } | 1134 | } |
1127 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment) | 1135 | if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment) |
@@ -1168,6 +1176,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1168 | } | 1176 | } |
1169 | } | 1177 | } |
1170 | 1178 | ||
1179 | /// <summary> | ||
1180 | /// Move the given object | ||
1181 | /// </summary> | ||
1182 | /// <param name="objectID"></param> | ||
1183 | /// <param name="offset"></param> | ||
1184 | /// <param name="pos"></param> | ||
1185 | /// <param name="remoteClient"></param> | ||
1171 | protected internal void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) | 1186 | protected internal void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) |
1172 | { | 1187 | { |
1173 | SceneObjectGroup group = GetGroupByPrim(objectID); | 1188 | SceneObjectGroup group = GetGroupByPrim(objectID); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index dd9c706..a7c54b3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1588,8 +1588,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1588 | /// </summary> | 1588 | /// </summary> |
1589 | public void SendGroupTerseUpdate() | 1589 | public void SendGroupTerseUpdate() |
1590 | { | 1590 | { |
1591 | HasGroupChanged = true; | ||
1592 | |||
1593 | lock (m_parts) | 1591 | lock (m_parts) |
1594 | { | 1592 | { |
1595 | foreach (SceneObjectPart part in m_parts.Values) | 1593 | foreach (SceneObjectPart part in m_parts.Values) |
@@ -2179,7 +2177,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2179 | #region Position | 2177 | #region Position |
2180 | 2178 | ||
2181 | /// <summary> | 2179 | /// <summary> |
2182 | /// | 2180 | /// Move this scene object |
2183 | /// </summary> | 2181 | /// </summary> |
2184 | /// <param name="pos"></param> | 2182 | /// <param name="pos"></param> |
2185 | public void UpdateGroupPosition(LLVector3 pos) | 2183 | public void UpdateGroupPosition(LLVector3 pos) |
@@ -2192,20 +2190,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
2192 | } | 2190 | } |
2193 | 2191 | ||
2194 | AbsolutePosition = pos; | 2192 | AbsolutePosition = pos; |
2193 | |||
2194 | HasGroupChanged = true; | ||
2195 | } | 2195 | } |
2196 | |||
2196 | //we need to do a terse update even if the move wasn't allowed | 2197 | //we need to do a terse update even if the move wasn't allowed |
2197 | // so that the position is reset in the client (the object snaps back) | 2198 | // so that the position is reset in the client (the object snaps back) |
2198 | ScheduleGroupForTerseUpdate(); | 2199 | ScheduleGroupForTerseUpdate(); |
2199 | } | 2200 | } |
2200 | 2201 | ||
2201 | /// <summary> | 2202 | /// <summary> |
2202 | /// | 2203 | /// Update the position of a single part of this scene object |
2203 | /// </summary> | 2204 | /// </summary> |
2204 | /// <param name="pos"></param> | 2205 | /// <param name="pos"></param> |
2205 | /// <param name="localID"></param> | 2206 | /// <param name="localID"></param> |
2206 | public void UpdateSinglePosition(LLVector3 pos, uint localID) | 2207 | public void UpdateSinglePosition(LLVector3 pos, uint localID) |
2207 | { | 2208 | { |
2208 | SceneObjectPart part = GetChildPart(localID); | 2209 | SceneObjectPart part = GetChildPart(localID); |
2210 | |||
2209 | if (part != null) | 2211 | if (part != null) |
2210 | { | 2212 | { |
2211 | if (part.UUID == m_rootPart.UUID) | 2213 | if (part.UUID == m_rootPart.UUID) |
@@ -2216,6 +2218,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
2216 | { | 2218 | { |
2217 | part.UpdateOffSet(pos); | 2219 | part.UpdateOffSet(pos); |
2218 | } | 2220 | } |
2221 | |||
2222 | HasGroupChanged = true; | ||
2219 | } | 2223 | } |
2220 | } | 2224 | } |
2221 | 2225 | ||