aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2012-05-03 01:18:51 +0200
committerMelanie2012-05-03 01:18:51 +0200
commit9f9693dab825c7753af49c6838a484653047d4ae (patch)
tree7b0f05bdba5aa666a4aa1e0993d99e625c91bd94 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parent Improved sitted avatars crossings ( plus tests on vehicles) (diff)
downloadopensim-SC-9f9693dab825c7753af49c6838a484653047d4ae.zip
opensim-SC-9f9693dab825c7753af49c6838a484653047d4ae.tar.gz
opensim-SC-9f9693dab825c7753af49c6838a484653047d4ae.tar.bz2
opensim-SC-9f9693dab825c7753af49c6838a484653047d4ae.tar.xz
Clear permissions given to the object we stand up from
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 80f21ce..b0147f2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -62,6 +62,7 @@ namespace OpenSim.Region.Framework.Scenes
62 62
63 struct ScriptControllers 63 struct ScriptControllers
64 { 64 {
65 public UUID objectID;
65 public UUID itemID; 66 public UUID itemID;
66 public ScriptControlled ignoreControls; 67 public ScriptControlled ignoreControls;
67 public ScriptControlled eventControls; 68 public ScriptControlled eventControls;
@@ -1890,6 +1891,8 @@ namespace OpenSim.Region.Framework.Scenes
1890 if (ParentID != 0) 1891 if (ParentID != 0)
1891 { 1892 {
1892 SceneObjectPart part = ParentPart; 1893 SceneObjectPart part = ParentPart;
1894 UnRegisterSeatControls(part.ParentGroup.UUID);
1895
1893 TaskInventoryDictionary taskIDict = part.TaskInventory; 1896 TaskInventoryDictionary taskIDict = part.TaskInventory;
1894 if (taskIDict != null) 1897 if (taskIDict != null)
1895 { 1898 {
@@ -3217,7 +3220,7 @@ namespace OpenSim.Region.Framework.Scenes
3217 3220
3218 foreach (ScriptControllers c in scriptedcontrols.Values) 3221 foreach (ScriptControllers c in scriptedcontrols.Values)
3219 { 3222 {
3220 controls[i++] = new ControllerData(c.itemID, (uint)c.ignoreControls, (uint)c.eventControls); 3223 controls[i++] = new ControllerData(c.objectID, c.itemID, (uint)c.ignoreControls, (uint)c.eventControls);
3221 } 3224 }
3222 cAgent.Controllers = controls; 3225 cAgent.Controllers = controls;
3223 } 3226 }
@@ -3307,6 +3310,7 @@ namespace OpenSim.Region.Framework.Scenes
3307 foreach (ControllerData c in cAgent.Controllers) 3310 foreach (ControllerData c in cAgent.Controllers)
3308 { 3311 {
3309 ScriptControllers sc = new ScriptControllers(); 3312 ScriptControllers sc = new ScriptControllers();
3313 sc.objectID = c.ObjectID;
3310 sc.itemID = c.ItemID; 3314 sc.itemID = c.ItemID;
3311 sc.ignoreControls = (ScriptControlled)c.IgnoreControls; 3315 sc.ignoreControls = (ScriptControlled)c.IgnoreControls;
3312 sc.eventControls = (ScriptControlled)c.EventControls; 3316 sc.eventControls = (ScriptControlled)c.EventControls;
@@ -3702,10 +3706,15 @@ namespace OpenSim.Region.Framework.Scenes
3702 3706
3703 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID) 3707 public void RegisterControlEventsToScript(int controls, int accept, int pass_on, uint Obj_localID, UUID Script_item_UUID)
3704 { 3708 {
3709 SceneObjectPart p = m_scene.GetSceneObjectPart(Obj_localID);
3710 if (p == null)
3711 return;
3712
3705 ScriptControllers obj = new ScriptControllers(); 3713 ScriptControllers obj = new ScriptControllers();
3706 obj.ignoreControls = ScriptControlled.CONTROL_ZERO; 3714 obj.ignoreControls = ScriptControlled.CONTROL_ZERO;
3707 obj.eventControls = ScriptControlled.CONTROL_ZERO; 3715 obj.eventControls = ScriptControlled.CONTROL_ZERO;
3708 3716
3717 obj.objectID = p.ParentGroup.UUID;
3709 obj.itemID = Script_item_UUID; 3718 obj.itemID = Script_item_UUID;
3710 if (pass_on == 0 && accept == 0) 3719 if (pass_on == 0 && accept == 0)
3711 { 3720 {
@@ -3754,6 +3763,21 @@ namespace OpenSim.Region.Framework.Scenes
3754 ControllingClient.SendTakeControls(int.MaxValue, false, false); 3763 ControllingClient.SendTakeControls(int.MaxValue, false, false);
3755 } 3764 }
3756 3765
3766 private void UnRegisterSeatControls(UUID obj)
3767 {
3768 List<UUID> takers = new List<UUID>();
3769
3770 foreach (ScriptControllers c in scriptedcontrols.Values)
3771 {
3772 if (c.objectID == obj)
3773 takers.Add(c.itemID);
3774 }
3775 foreach (UUID t in takers)
3776 {
3777 UnRegisterControlEventsToScript(0, t);
3778 }
3779 }
3780
3757 public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID) 3781 public void UnRegisterControlEventsToScript(uint Obj_localID, UUID Script_item_UUID)
3758 { 3782 {
3759 ScriptControllers takecontrols; 3783 ScriptControllers takecontrols;