diff options
author | Melanie Thielker | 2008-08-20 01:48:51 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-20 01:48:51 +0000 |
commit | f206ffd5a8cd0ef362e972abf7375eb739f82e5b (patch) | |
tree | e05c17a865f02beecddbe2c9c04705bc08c03db1 /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Remove trailing whitespace in prebuild.xml. (diff) | |
download | opensim-SC_OLD-f206ffd5a8cd0ef362e972abf7375eb739f82e5b.zip opensim-SC_OLD-f206ffd5a8cd0ef362e972abf7375eb739f82e5b.tar.gz opensim-SC_OLD-f206ffd5a8cd0ef362e972abf7375eb739f82e5b.tar.bz2 opensim-SC_OLD-f206ffd5a8cd0ef362e972abf7375eb739f82e5b.tar.xz |
Mantis #2003 - thank you, SachaMagne, for a patch that implements
the first part of gesture persistence.
----------------------------------------------------------
Attachments no longer vanish on walking crossing. Teleport is still
problematic, but will now be blocked with message "Inconsistent
attachment state" rather than losing the attachment. Detach to be
able to TP in that case.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 363d0f8..fb2cbb6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2020,7 +2020,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2020 | // with the deeded object, it goes back to them | 2020 | // with the deeded object, it goes back to them |
2021 | 2021 | ||
2022 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2022 | grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2023 | m_innerScene.AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition); | 2023 | AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition); |
2024 | } | 2024 | } |
2025 | } | 2025 | } |
2026 | } | 2026 | } |
@@ -2161,9 +2161,56 @@ namespace OpenSim.Region.Environment.Scenes | |||
2161 | 2161 | ||
2162 | client.OnUnackedTerrain += TerrainUnAcked; | 2162 | client.OnUnackedTerrain += TerrainUnAcked; |
2163 | 2163 | ||
2164 | //Gesture | ||
2165 | client.OnActivateGesture += ActivateGesture; | ||
2166 | client.OnDeactivateGesture += DeactivateGesture; | ||
2167 | |||
2164 | // EventManager.TriggerOnNewClient(client); | 2168 | // EventManager.TriggerOnNewClient(client); |
2165 | } | 2169 | } |
2166 | 2170 | ||
2171 | // Gesture | ||
2172 | public virtual void ActivateGesture(IClientAPI client, LLUUID assetId, LLUUID gestureId) | ||
2173 | { | ||
2174 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); | ||
2175 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); | ||
2176 | |||
2177 | if (userInfo != null) | ||
2178 | { | ||
2179 | |||
2180 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); | ||
2181 | if (item != null) | ||
2182 | { | ||
2183 | item.Flags = 1; | ||
2184 | userInfo.UpdateItem(item); | ||
2185 | } | ||
2186 | else m_log.Error("Unable to find gesture"); | ||
2187 | } | ||
2188 | else m_log.Error("Gesture : Unable to find user "); | ||
2189 | |||
2190 | m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString()); | ||
2191 | } | ||
2192 | |||
2193 | public virtual void DeactivateGesture(IClientAPI client, LLUUID gestureId) | ||
2194 | { | ||
2195 | // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID); | ||
2196 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId); | ||
2197 | |||
2198 | if (userInfo != null) | ||
2199 | { | ||
2200 | |||
2201 | InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId); | ||
2202 | if (item != null) | ||
2203 | { | ||
2204 | item.Flags = 0; | ||
2205 | userInfo.UpdateItem(item); | ||
2206 | } | ||
2207 | else m_log.Error("Unable to find gesture"); | ||
2208 | } | ||
2209 | else m_log.Error("Gesture : Unable to find user "); | ||
2210 | |||
2211 | m_log.DebugFormat("gesture : {0} ", gestureId.ToString()); | ||
2212 | } | ||
2213 | |||
2167 | public virtual void TeleportClientHome(LLUUID agentId, IClientAPI client) | 2214 | public virtual void TeleportClientHome(LLUUID agentId, IClientAPI client) |
2168 | { | 2215 | { |
2169 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); | 2216 | UserProfileData UserProfile = CommsManager.UserService.GetUserProfile(agentId); |