aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs53
1 files changed, 8 insertions, 45 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 7a4c385..72748b6 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1778,7 +1778,7 @@ namespace OpenSim.Region.Environment.Scenes
1778 return sceneObject; 1778 return sceneObject;
1779 } 1779 }
1780 1780
1781 void AdaptTree(ref PrimitiveBaseShape tree) 1781 protected void AdaptTree(ref PrimitiveBaseShape tree)
1782 { 1782 {
1783 // Tree size has to be adapted depending on its type 1783 // Tree size has to be adapted depending on its type
1784 switch ((Tree)tree.State) 1784 switch ((Tree)tree.State)
@@ -2450,9 +2450,13 @@ namespace OpenSim.Region.Environment.Scenes
2450 client.OnRegionHandleRequest += RegionHandleRequest; 2450 client.OnRegionHandleRequest += RegionHandleRequest;
2451 client.OnUnackedTerrain += TerrainUnAcked; 2451 client.OnUnackedTerrain += TerrainUnAcked;
2452 2452
2453 //Gesture 2453 IGesturesModule gesturesModule = RequestModuleInterface<IGesturesModule>();
2454 client.OnActivateGesture += ActivateGesture; 2454 if (gesturesModule != null)
2455 client.OnDeactivateGesture += DeactivateGesture; 2455 {
2456 client.OnActivateGesture += gesturesModule.ActivateGesture;
2457 client.OnDeactivateGesture += gesturesModule.DeactivateGesture;
2458 }
2459
2456 //sound 2460 //sound
2457 client.OnSoundTrigger += SoundTrigger; 2461 client.OnSoundTrigger += SoundTrigger;
2458 2462
@@ -2478,47 +2482,6 @@ namespace OpenSim.Region.Environment.Scenes
2478 2482
2479 } 2483 }
2480 2484
2481 // Gesture
2482 public virtual void ActivateGesture(IClientAPI client, UUID assetId, UUID gestureId)
2483 {
2484 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID);
2485 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId);
2486
2487 if (userInfo != null)
2488 {
2489 InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
2490 if (item != null)
2491 {
2492 item.Flags = 1;
2493 userInfo.UpdateItem(item);
2494 }
2495 else m_log.Error("Unable to find gesture");
2496 }
2497 else m_log.Error("Gesture : Unable to find user ");
2498
2499 m_log.DebugFormat("Asset : {0} gesture :{1}", gestureId.ToString(), assetId.ToString());
2500 }
2501
2502 public virtual void DeactivateGesture(IClientAPI client, UUID gestureId)
2503 {
2504 // UserProfileCacheService User = CommsManager.SecureInventoryService.UpdateItem(gestureid, agentID);
2505 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(client.AgentId);
2506
2507 if (userInfo != null)
2508 {
2509 InventoryItemBase item = userInfo.RootFolder.FindItem(gestureId);
2510 if (item != null)
2511 {
2512 item.Flags = 0;
2513 userInfo.UpdateItem(item);
2514 }
2515 else m_log.Error("Unable to find gesture");
2516 }
2517 else m_log.Error("Gesture : Unable to find user ");
2518
2519 m_log.DebugFormat("gesture : {0} ", gestureId.ToString());
2520 }
2521
2522 /// <summary> 2485 /// <summary>
2523 /// Teleport an avatar to their home region 2486 /// Teleport an avatar to their home region
2524 /// </summary> 2487 /// </summary>