aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs84
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs4
4 files changed, 45 insertions, 49 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 53681f8..d87b930 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -995,7 +995,7 @@ namespace OpenSim.Region.Environment.Scenes
995 else 995 else
996 { 996 {
997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId); 997 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
998 if(profile == null || profile.RootFolder == null) 998 if (profile == null || profile.RootFolder == null)
999 { 999 {
1000 m_log.ErrorFormat( 1000 m_log.ErrorFormat(
1001 "[PRIM INVENTORY]: " + 1001 "[PRIM INVENTORY]: " +
@@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
1040 return; 1040 return;
1041 } 1041 }
1042 1042
1043 if(part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) 1043 if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0)
1044 { 1044 {
1045 // object cannot copy items to an object owned by a different owner 1045 // object cannot copy items to an object owned by a different owner
1046 // unless llAllowInventoryDrop has been called 1046 // unless llAllowInventoryDrop has been called
@@ -1049,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes
1049 } 1049 }
1050 1050
1051 // must have both move and modify permission to put an item in an object 1051 // must have both move and modify permission to put an item in an object
1052 if((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0 ) 1052 if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
1053 { 1053 {
1054 return; 1054 return;
1055 } 1055 }
@@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Environment.Scenes
1099 1099
1100 ScenePresence avatar; 1100 ScenePresence avatar;
1101 1101
1102 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1102 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1103 { 1103 {
1104 destPart.GetProperties(avatar.ControllingClient); 1104 destPart.GetProperties(avatar.ControllingClient);
1105 } 1105 }
@@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) 1108 public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items)
1109 { 1109 {
1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); 1110 CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
1111 if(profile == null || profile.RootFolder == null) 1111 if (profile == null || profile.RootFolder == null)
1112 { 1112 {
1113 m_log.ErrorFormat( 1113 m_log.ErrorFormat(
1114 "[PRIM INVENTORY]: " + 1114 "[PRIM INVENTORY]: " +
@@ -1325,8 +1325,8 @@ namespace OpenSim.Region.Environment.Scenes
1325 /// <param name="itemID"> </param> 1325 /// <param name="itemID"> </param>
1326 /// <param name="localID"></param> 1326 /// <param name="localID"></param>
1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) 1327 public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param)
1328 { 1328 {
1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); 1329 TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
1330 1330
1331 if (srcTaskItem == null) 1331 if (srcTaskItem == null)
1332 { 1332 {
@@ -1348,29 +1348,29 @@ namespace OpenSim.Region.Environment.Scenes
1348 destId); 1348 destId);
1349 return; 1349 return;
1350 } 1350 }
1351 1351
1352 // Must own the object, and have modify rights 1352 // Must own the object, and have modify rights
1353 if(srcPart.OwnerID != destPart.OwnerID) 1353 if (srcPart.OwnerID != destPart.OwnerID)
1354 return; 1354 return;
1355 1355
1356 if((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) 1356 if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
1357 return; 1357 return;
1358 1358
1359 if (destPart.ScriptAccessPin != pin) 1359 if (destPart.ScriptAccessPin != pin)
1360 { 1360 {
1361 m_log.WarnFormat( 1361 m_log.WarnFormat(
1362 "[PRIM INVENTORY]: " + 1362 "[PRIM INVENTORY]: " +
1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", 1363 "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}",
1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); 1364 srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin);
1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - 1365 // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL -
1366 // "Object: Task Object trying to illegally load script onto task Other_Object!" 1366 // "Object: Task Object trying to illegally load script onto task Other_Object!"
1367 // How do we shout from in here? 1367 // How do we shout from in here?
1368 return; 1368 return;
1369 } 1369 }
1370 1370
1371 TaskInventoryItem destTaskItem = new TaskInventoryItem(); 1371 TaskInventoryItem destTaskItem = new TaskInventoryItem();
1372 1372
1373 destTaskItem.ItemID = LLUUID.Random(); 1373 destTaskItem.ItemID = LLUUID.Random();
1374 destTaskItem.CreatorID = srcTaskItem.CreatorID; 1374 destTaskItem.CreatorID = srcTaskItem.CreatorID;
1375 destTaskItem.AssetID = srcTaskItem.AssetID; 1375 destTaskItem.AssetID = srcTaskItem.AssetID;
1376 destTaskItem.GroupID = destPart.GroupID; 1376 destTaskItem.GroupID = destPart.GroupID;
@@ -1405,25 +1405,25 @@ namespace OpenSim.Region.Environment.Scenes
1405 destTaskItem.Name = srcTaskItem.Name; 1405 destTaskItem.Name = srcTaskItem.Name;
1406 destTaskItem.InvType = srcTaskItem.InvType; 1406 destTaskItem.InvType = srcTaskItem.InvType;
1407 destTaskItem.Type = srcTaskItem.Type; 1407 destTaskItem.Type = srcTaskItem.Type;
1408 1408
1409 destPart.AddInventoryItemExclusive(destTaskItem); 1409 destPart.AddInventoryItemExclusive(destTaskItem);
1410 1410
1411 if (running > 0) 1411 if (running > 0)
1412 { 1412 {
1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID)) 1413 if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID))
1414 { 1414 {
1415 destPart.CreateScriptInstance(destTaskItem, 0, false); 1415 destPart.CreateScriptInstance(destTaskItem, 0, false);
1416 } 1416 }
1417 } 1417 }
1418 1418
1419 ScenePresence avatar; 1419 ScenePresence avatar;
1420 1420
1421 if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) 1421 if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
1422 { 1422 {
1423 destPart.GetProperties(avatar.ControllingClient); 1423 destPart.GetProperties(avatar.ControllingClient);
1424 } 1424 }
1425 } 1425 }
1426 1426
1427 /// <summary> 1427 /// <summary>
1428 /// Called when an object is removed from the environment into inventory. 1428 /// Called when an object is removed from the environment into inventory.
1429 /// </summary> 1429 /// </summary>
@@ -1497,7 +1497,7 @@ namespace OpenSim.Region.Environment.Scenes
1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; 1497 m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
1498 } 1498 }
1499 1499
1500 lock(m_inventoryDeletes) 1500 lock (m_inventoryDeletes)
1501 { 1501 {
1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder(); 1502 DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
1503 dtis.DeRezPacket = DeRezPacket; 1503 dtis.DeRezPacket = DeRezPacket;
@@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes
2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) 2246 public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID)
2247 { 2247 {
2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); 2248 IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
2249 if(scriptModule == null) 2249 if (scriptModule == null)
2250 return; 2250 return;
2251 2251
2252 controllingClient.SendScriptRunningReply(objectID, itemID, 2252 controllingClient.SendScriptRunningReply(objectID, itemID,
@@ -2256,10 +2256,10 @@ namespace OpenSim.Region.Environment.Scenes
2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) 2256 public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running)
2257 { 2257 {
2258 SceneObjectPart part = GetSceneObjectPart(objectID); 2258 SceneObjectPart part = GetSceneObjectPart(objectID);
2259 if(part == null) 2259 if (part == null)
2260 return; 2260 return;
2261 2261
2262 if(running) 2262 if (running)
2263 EventManager.TriggerStartScript(part.LocalId, itemID); 2263 EventManager.TriggerStartScript(part.LocalId, itemID);
2264 else 2264 else
2265 EventManager.TriggerStopScript(part.LocalId, itemID); 2265 EventManager.TriggerStopScript(part.LocalId, itemID);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index fea131e..2db309a 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Scenes
292 public void AddInventoryItemExclusive(TaskInventoryItem item) 292 public void AddInventoryItemExclusive(TaskInventoryItem item)
293 { 293 {
294 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); 294 List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values);
295 foreach(TaskInventoryItem i in il) 295 foreach (TaskInventoryItem i in il)
296 { 296 {
297 if (i.Name == item.Name) 297 if (i.Name == item.Name)
298 { 298 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 5b92a8d..2b40ad2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1,5 +1,3 @@
1#region Header
2
3/* 1/*
4 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
5 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
@@ -27,8 +25,6 @@
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 26 */
29 27
30#endregion Header
31
32using System; 28using System;
33using System.Collections.Generic; 29using System.Collections.Generic;
34using System.Drawing; 30using System.Drawing;
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 3daa680..22ca159 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1093,8 +1093,8 @@ namespace OpenSim.Region.Environment.Scenes
1093 ); 1093 );
1094 1094
1095 //look for prims with explicit sit targets that are available 1095 //look for prims with explicit sit targets that are available
1096 foreach(SceneObjectPart part in partArray) { 1096 foreach (SceneObjectPart part in partArray)
1097 1097 {
1098 // Is a sit target available? 1098 // Is a sit target available?
1099 Vector3 avSitOffSet = part.GetSitTargetPosition(); 1099 Vector3 avSitOffSet = part.GetSitTargetPosition();
1100 Quaternion avSitOrientation = part.GetSitTargetOrientation(); 1100 Quaternion avSitOrientation = part.GetSitTargetOrientation();