aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs41
3 files changed, 29 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 8b9b888..aadcff6 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Scenes
53 53
54 #region Fields 54 #region Fields
55 55
56 public Dictionary<LLUUID, ScenePresence> ScenePresences; 56 internal Dictionary<LLUUID, ScenePresence> ScenePresences;
57 // SceneObjects is not currently populated or used. 57 // SceneObjects is not currently populated or used.
58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects; 58 //public Dictionary<LLUUID, SceneObjectGroup> SceneObjects;
59 public Dictionary<LLUUID, EntityBase> Entities; 59 public Dictionary<LLUUID, EntityBase> Entities;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index faa595f..d017c50 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -207,6 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
207 get { return m_innerScene.Entities; } 207 get { return m_innerScene.Entities; }
208 set { m_innerScene.Entities = value; } 208 set { m_innerScene.Entities = value; }
209 } 209 }
210
210 public Dictionary<LLUUID, ScenePresence> m_restorePresences 211 public Dictionary<LLUUID, ScenePresence> m_restorePresences
211 { 212 {
212 get { return m_innerScene.RestorePresences; } 213 get { return m_innerScene.RestorePresences; }
@@ -3095,7 +3096,7 @@ namespace OpenSim.Region.Environment.Scenes
3095 } 3096 }
3096 3097
3097 /// <summary> 3098 /// <summary>
3098 /// Request a List of all m_scenePresences in this World 3099 /// Request a List of all ScenePresences in this region
3099 /// </summary> 3100 /// </summary>
3100 /// <returns></returns> 3101 /// <returns></returns>
3101 public List<ScenePresence> GetScenePresences() 3102 public List<ScenePresence> GetScenePresences()
@@ -3104,7 +3105,7 @@ namespace OpenSim.Region.Environment.Scenes
3104 } 3105 }
3105 3106
3106 /// <summary> 3107 /// <summary>
3107 /// Request a filtered list of m_scenePresences in this World 3108 /// Request a filtered list of ScenePresences in this region
3108 /// </summary> 3109 /// </summary>
3109 /// <param name="filter"></param> 3110 /// <param name="filter"></param>
3110 /// <returns></returns> 3111 /// <returns></returns>
@@ -3114,7 +3115,7 @@ namespace OpenSim.Region.Environment.Scenes
3114 } 3115 }
3115 3116
3116 /// <summary> 3117 /// <summary>
3117 /// Request a Avatar by UUID 3118 /// Request a scene presence by UUID
3118 /// </summary> 3119 /// </summary>
3119 /// <param name="avatarID"></param> 3120 /// <param name="avatarID"></param>
3120 /// <returns></returns> 3121 /// <returns></returns>
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 96c919c..a2c16b6 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -1923,8 +1923,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1923 1923
1924 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 1924 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero)
1925 { 1925 {
1926 1926 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
1927 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[InventorySelf()].PermsGranter]; 1927
1928 if (presence != null) 1928 if (presence != null)
1929 { 1929 {
1930 if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) 1930 if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0)
@@ -1950,8 +1950,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1950 1950
1951 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 1951 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero)
1952 { 1952 {
1953 1953 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
1954 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[InventorySelf()].PermsGranter]; 1954
1955 if (presence != null) 1955 if (presence != null)
1956 { 1956 {
1957 if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0) 1957 if ((m_host.TaskInventory[InventorySelf()].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) != 0)
@@ -2129,9 +2129,10 @@ namespace OpenSim.Region.ScriptEngine.Common
2129 2129
2130 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2130 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2131 { 2131 {
2132 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) 2132 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2133
2134 if (presence != null)
2133 { 2135 {
2134 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
2135 // Do NOT try to parse LLUUID, animations cannot be triggered by ID 2136 // Do NOT try to parse LLUUID, animations cannot be triggered by ID
2136 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); 2137 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation);
2137 if (animID == LLUUID.Zero) 2138 if (animID == LLUUID.Zero)
@@ -2165,9 +2166,10 @@ namespace OpenSim.Region.ScriptEngine.Common
2165 if (animID == LLUUID.Zero) 2166 if (animID == LLUUID.Zero)
2166 return; 2167 return;
2167 2168
2168 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) 2169 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2170
2171 if (presence != null)
2169 { 2172 {
2170 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
2171 if (animID == LLUUID.Zero) 2173 if (animID == LLUUID.Zero)
2172 presence.RemoveAnimation(anim); 2174 presence.RemoveAnimation(anim);
2173 else 2175 else
@@ -2271,13 +2273,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2271 } 2273 }
2272 } 2274 }
2273 2275
2274 if (World.m_innerScene.ScenePresences.ContainsKey(agentID)) 2276 ScenePresence presence = World.GetScenePresence(agentID);
2277
2278 if (presence != null)
2275 { 2279 {
2276 string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID); 2280 string ownerName=resolveName(m_host.ParentGroup.RootPart.OwnerID);
2277 if (ownerName == String.Empty) 2281 if (ownerName == String.Empty)
2278 ownerName="(hippos)"; 2282 ownerName="(hippos)";
2279 2283
2280 ScenePresence presence = World.m_innerScene.ScenePresences[agentID];
2281 if (!m_waitingForScriptAnswer) 2284 if (!m_waitingForScriptAnswer)
2282 { 2285 {
2283 m_host.TaskInventory[invItemID].PermsGranter=agentID; 2286 m_host.TaskInventory[invItemID].PermsGranter=agentID;
@@ -3711,10 +3714,13 @@ namespace OpenSim.Region.ScriptEngine.Common
3711 LLUUID key = new LLUUID(); 3714 LLUUID key = new LLUUID();
3712 if (LLUUID.TryParse(id,out key)) 3715 if (LLUUID.TryParse(id,out key))
3713 { 3716 {
3714 if (World.m_innerScene.ScenePresences.ContainsKey(key)) 3717 ScenePresence presence = World.GetScenePresence(key);
3718
3719 if (presence != null)
3715 { 3720 {
3716 return World.m_innerScene.ScenePresences[key].Firstname + " " + World.m_innerScene.ScenePresences[key].Lastname; 3721 return presence.Name;
3717 } 3722 }
3723
3718 if (World.GetSceneObjectPart(key) != null) 3724 if (World.GetSceneObjectPart(key) != null)
3719 { 3725 {
3720 return World.GetSceneObjectPart(key).Name; 3726 return World.GetSceneObjectPart(key).Name;
@@ -3867,9 +3873,9 @@ namespace OpenSim.Region.ScriptEngine.Common
3867 3873
3868 LLUUID key = new LLUUID(); 3874 LLUUID key = new LLUUID();
3869 if (LLUUID.TryParse(id, out key)) 3875 if (LLUUID.TryParse(id, out key))
3870 { 3876 {
3871
3872 ScenePresence av = World.GetScenePresence(key); 3877 ScenePresence av = World.GetScenePresence(key);
3878
3873 if (av != null) 3879 if (av != null)
3874 { 3880 {
3875 if (llAvatarOnSitTarget() == id) 3881 if (llAvatarOnSitTarget() == id)
@@ -6162,10 +6168,11 @@ namespace OpenSim.Region.ScriptEngine.Common
6162 LLUUID key = new LLUUID(); 6168 LLUUID key = new LLUUID();
6163 if (LLUUID.TryParse(id, out key)) 6169 if (LLUUID.TryParse(id, out key))
6164 { 6170 {
6165 if (World.m_innerScene.ScenePresences.ContainsKey(key)) 6171 ScenePresence av = World.GetScenePresence(key);
6172
6173 if (av != null);
6166 { 6174 {
6167 ScenePresence av = World.m_innerScene.ScenePresences[key]; 6175 foreach (object o in args.Data)
6168 foreach(object o in args.Data)
6169 { 6176 {
6170 switch(o.ToString()) 6177 switch(o.ToString())
6171 { 6178 {