From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- OpenSim/Region/Environment/Scenes/EntityBase.cs | 4 +- OpenSim/Region/Environment/Scenes/EventManager.cs | 32 +- OpenSim/Region/Environment/Scenes/InnerScene.cs | 42 +- .../Region/Environment/Scenes/Scene.Inventory.cs | 73 +- OpenSim/Region/Environment/Scenes/Scene.cs | 82 +- .../Scenes/SceneCommunicationService.cs | 8 +- .../Environment/Scenes/SceneExternalChecks.cs | 1571 ++++++++++---------- .../Scenes/SceneObjectGroup.Inventory.cs | 8 +- .../Region/Environment/Scenes/SceneObjectGroup.cs | 78 +- .../Scenes/SceneObjectPart.Inventory.cs | 24 +- .../Region/Environment/Scenes/SceneObjectPart.cs | 98 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 26 +- .../Region/Environment/Scenes/SimStatsReporter.cs | 2 +- OpenSim/Region/Environment/Scenes/UndoState.cs | 8 +- 14 files changed, 1039 insertions(+), 1017 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index bc3e06c..40caabc 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Scenes get { return m_name; } set { m_name = value; } } - + /// /// Signals whether this group was in a scene but has since been deleted from it. /// @@ -71,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes { get { return m_isDeleted; } } - protected bool m_isDeleted; + protected bool m_isDeleted; protected LLVector3 m_pos; diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 2b1adee..1dd2273 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs @@ -131,13 +131,10 @@ namespace OpenSim.Region.Environment.Scenes public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; - public delegate void SignificantClientMovement(IClientAPI remote_client); public event SignificantClientMovement OnSignificantClientMovement; - - public delegate void NewGridInstantMessage(GridInstantMessage message); public event NewGridInstantMessage OnGridInstantMessageToIMModule; @@ -163,7 +160,7 @@ namespace OpenSim.Region.Environment.Scenes public event ScriptAtTargetEvent OnScriptAtTargetEvent; public delegate void ScriptNotAtTargetEvent(uint localID); - + public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; public delegate void ScriptColliding(uint localID, ColliderArgs colliders); @@ -172,8 +169,6 @@ namespace OpenSim.Region.Environment.Scenes public event ScriptColliding OnScriptColliding; public event ScriptColliding OnScriptCollidingEnd; - - public delegate void OnMakeChildAgentDelegate(ScenePresence presence); public event OnMakeChildAgentDelegate OnMakeChildAgent; @@ -289,7 +284,6 @@ namespace OpenSim.Region.Environment.Scenes public int transactionID = 0; public int amountDebited = 0; - public LandBuyArgs(LLUUID pagentId, LLUUID pgroupId, bool pfinal, bool pgroupOwned, bool premoveContribution, int pparcelLocalID, int pparcelArea, int pparcelPrice, bool pauthenticated) @@ -306,8 +300,6 @@ namespace OpenSim.Region.Environment.Scenes } } - - public delegate void MoneyTransferEvent(Object sender, MoneyTransferArgs e); public delegate void LandBuy(Object sender, LandBuyArgs e); @@ -377,7 +369,6 @@ namespace OpenSim.Region.Environment.Scenes private ScriptColliding handlerColliding = null; private ScriptColliding handlerCollidingEnd = null; - private SunLindenHour handlerSunGetLindenHour = null; public void TriggerOnScriptChangedEvent(uint localID, uint change) @@ -491,7 +482,6 @@ namespace OpenSim.Region.Environment.Scenes if (handlerObjectBeingRemovedFromScene != null) { handlerObjectBeingRemovedFromScene(obj); - } } @@ -641,7 +631,6 @@ namespace OpenSim.Region.Environment.Scenes { handlerGridInstantMessageToFriends(message); } - } } @@ -698,7 +687,8 @@ namespace OpenSim.Region.Environment.Scenes handlerNewInventoryItemUpdateComplete(agentID, AssetID, AssetName, userlevel); } } - public void TriggerLandBuy (Object sender, LandBuyArgs e) + + public void TriggerLandBuy(Object sender, LandBuyArgs e) { handlerLandBuy = OnLandBuy; if (handlerLandBuy != null) @@ -706,6 +696,7 @@ namespace OpenSim.Region.Environment.Scenes handlerLandBuy(sender, e); } } + public void TriggerValidateLandBuy(Object sender, LandBuyArgs e) { handlerValidateLandBuy = OnValidateLandBuy; @@ -741,6 +732,7 @@ namespace OpenSim.Region.Environment.Scenes handlerRequestChangeWaterHeight(height); } } + public void TriggerAvatarKill(uint KillerObjectLocalID, ScenePresence DeadAvatar) { handlerAvatarKill = OnAvatarKilled; @@ -756,7 +748,6 @@ namespace OpenSim.Region.Environment.Scenes if (handlerSignificantClientMovement != null) { handlerSignificantClientMovement(client); - } } @@ -787,7 +778,6 @@ namespace OpenSim.Region.Environment.Scenes } } - public void TriggerNoticeNoLandDataFromStorage() { handlerNoticeNoLandDataFromStorage = OnNoticeNoLandDataFromStorage; @@ -818,26 +808,24 @@ namespace OpenSim.Region.Environment.Scenes } } - - public void TriggerRequestParcelPrimCountUpdate() { handlerRequestParcelPrimCountUpdate = OnRequestParcelPrimCountUpdate; if (handlerRequestParcelPrimCountUpdate != null) { handlerRequestParcelPrimCountUpdate(); - } } + public void TriggerParcelPrimCountTainted() { handlerParcelPrimCountTainted = OnParcelPrimCountTainted; if (handlerParcelPrimCountTainted != null) { handlerParcelPrimCountTainted(); - } } + // this lets us keep track of nasty script events like timer, etc. public void TriggerTimerEvent(uint objLocalID, double Interval) { @@ -845,9 +833,7 @@ namespace OpenSim.Region.Environment.Scenes if (handlerScriptTimerEvent != null) { handlerScriptTimerEvent(objLocalID, Interval); - } - } public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) @@ -875,19 +861,19 @@ namespace OpenSim.Region.Environment.Scenes if (handlerCollidingStart != null) handlerCollidingStart(localId, colliders); } + public void TriggerScriptColliding(uint localId, ColliderArgs colliders) { - handlerColliding = OnScriptColliding; if (handlerColliding != null) handlerColliding(localId, colliders); } + public void TriggerScriptCollidingEnd(uint localId, ColliderArgs colliders) { handlerCollidingEnd = OnScriptCollidingEnd; if (handlerCollidingEnd != null) handlerCollidingEnd(localId, colliders); } - } } diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 3021891..6695dbf 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -96,7 +96,7 @@ namespace OpenSim.Region.Environment.Scenes // Then we've got to remove the previous // event handler - if (_PhyScene != null) + if (_PhyScene != null) _PhyScene.OnPhysicsCrash -= physicsBasedCrash; _PhyScene = value; @@ -194,7 +194,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// true if the object was added, false if an object with the same uuid was already in the scene - /// + /// protected internal bool AddRestoredSceneObject( SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) { @@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Scenes { part.LocalId = m_parentScene.PrimIDAllocate(); } - + sceneObject.UpdateParentIDs(); if (!alreadyPersisted) @@ -213,10 +213,10 @@ namespace OpenSim.Region.Environment.Scenes sceneObject.ForceInventoryPersistence(); sceneObject.HasGroupChanged = true; } - + return AddSceneObject(sceneObject, attachToBackup); } - + /// /// Add a newly created object to the scene. This will both update the scene, and send information about the /// new object to all clients interested in the scene. @@ -228,12 +228,12 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// true if the object was added, false if an object with the same uuid was already in the scene - /// + /// protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup) - { + { // Ensure that we persist this new scene object sceneObject.HasGroupChanged = true; - + return AddSceneObject(sceneObject, attachToBackup); } @@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Scenes { sceneObject.ApplyPhysics(m_parentScene.m_physicalPrim); sceneObject.ScheduleGroupForFullUpdate(); - + lock (Entities) { if (!Entities.ContainsKey(sceneObject.UUID)) @@ -261,8 +261,8 @@ namespace OpenSim.Region.Environment.Scenes Entities.Add(sceneObject.UUID, sceneObject); m_numPrim += sceneObject.Children.Count; - if (attachToBackup) - sceneObject.AttachToBackup(); + if (attachToBackup) + sceneObject.AttachToBackup(); return true; } @@ -342,7 +342,7 @@ namespace OpenSim.Region.Environment.Scenes "[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.UUID, e); } } - + m_updateList.Clear(); } } @@ -555,7 +555,7 @@ namespace OpenSim.Region.Environment.Scenes protected internal void AddScenePresence(ScenePresence presence) { bool child = presence.IsChildAgent; - + if (child) { m_numChildAgents++; @@ -598,7 +598,7 @@ namespace OpenSim.Region.Environment.Scenes { if (!ScenePresences.Remove(agentID)) { - m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); + m_log.WarnFormat("[SCENE] Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); } // else // { @@ -774,7 +774,7 @@ namespace OpenSim.Region.Environment.Scenes /// Get a scene object group that contains the prim with the given uuid /// /// - /// null if no scene object group containing that prim is found + /// null if no scene object group containing that prim is found private SceneObjectGroup GetGroupByPrim(LLUUID fullID) { List EntityList = GetEntities(); @@ -823,7 +823,7 @@ namespace OpenSim.Region.Environment.Scenes protected internal SceneObjectPart GetSceneObjectPart(uint localID) { SceneObjectGroup group = GetGroupByPrim(localID); - + if (group != null) return group.GetChildPart(localID); else @@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Scenes /// Get a part contained in this scene. /// /// - /// null if the part was not found + /// null if the part was not found protected internal SceneObjectPart GetSceneObjectPart(LLUUID fullID) { SceneObjectGroup group = GetGroupByPrim(fullID); @@ -1089,7 +1089,7 @@ namespace OpenSim.Region.Environment.Scenes group.SendGroupTerseUpdate(); return; } - + if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) { group.UpdateSinglePosition(pos, localID); @@ -1119,7 +1119,7 @@ namespace OpenSim.Region.Environment.Scenes if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.IsAttachment) { group.SendGroupTerseUpdate(); - + return; } if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.IsAttachment) @@ -1397,14 +1397,14 @@ namespace OpenSim.Region.Environment.Scenes if (sendEvents) parenPrim.TriggerScriptChangedEvent(Changed.LINK); } - else + else { // The link set has prims remaining. This path is taken // when a subset of a link set's prims are selected // and the root prim is part of that selection // List parts = new List(parenPrim.Children.Values); - + List unlink_ids = new List(); foreach (SceneObjectPart unlink_part in parts) unlink_ids.Add(unlink_part.LocalId); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index fe66dd5..0148d76 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -242,9 +242,9 @@ namespace OpenSim.Region.Environment.Scenes // Retrieve item TaskInventoryItem item = group.GetInventoryItem(part.LocalId, itemId); - + if (null == item) - { + { m_log.ErrorFormat( "[PRIM INVENTORY]: Tried to retrieve item ID {0} from prim {1}, {2} for caps script update " + " but the item does not exist in this inventory", @@ -338,7 +338,6 @@ namespace OpenSim.Region.Environment.Scenes item.CreationDate = Util.UnixTimeSinceEpoch(); else item.CreationDate = itemUpd.CreationDate; - // TODO: Check if folder changed and move item //item.NextPermissions = itemUpd.Folder; @@ -577,7 +576,7 @@ namespace OpenSim.Region.Environment.Scenes asset.Type = assetType; asset.FullID = LLUUID.Random(); asset.Data = (data == null) ? new byte[1] : data; - + return asset; } @@ -958,7 +957,7 @@ namespace OpenSim.Region.Environment.Scenes agentItem.Folder = folderId; AddInventoryItem(remoteClient, agentItem); } - + /// /// ClientMoveTaskInventoryItem /// @@ -981,13 +980,13 @@ namespace OpenSim.Region.Environment.Scenes } TaskInventoryItem taskItem = part.GetInventoryItem(itemId); - + if (null == taskItem) { m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed" + " because the inventory item could not be found", itemId, primLocalId); - + return; } @@ -997,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes MoveTaskInventoryItem(remoteClient, folderId, part, itemId); } - + /// /// MoveTaskInventoryItem /// @@ -1029,7 +1028,7 @@ namespace OpenSim.Region.Environment.Scenes AddInventoryItem(avatarId, agentItem); } } - + /// /// Copy a task (prim) inventory item to another task (prim) /// @@ -1049,7 +1048,7 @@ namespace OpenSim.Region.Environment.Scenes return; } - + SceneObjectPart destPart = GetSceneObjectPart(destId); if (destPart == null) @@ -1060,7 +1059,7 @@ namespace OpenSim.Region.Environment.Scenes destId); return; } - + if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) { // object cannot copy items to an object owned by a different owner @@ -1076,7 +1075,7 @@ namespace OpenSim.Region.Environment.Scenes } TaskInventoryItem destTaskItem = new TaskInventoryItem(); - + destTaskItem.ItemID = LLUUID.Random(); destTaskItem.CreatorID = srcTaskItem.CreatorID; destTaskItem.AssetID = srcTaskItem.AssetID; @@ -1091,7 +1090,7 @@ namespace OpenSim.Region.Environment.Scenes destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; destTaskItem.NextPermissions = srcTaskItem.NextPermissions; destTaskItem.Flags = srcTaskItem.Flags; - + if (destPart.OwnerID != part.OwnerID) { if (ExternalChecks.ExternalChecksPropagatePermissions()) @@ -1112,20 +1111,20 @@ namespace OpenSim.Region.Environment.Scenes destTaskItem.Name = srcTaskItem.Name; destTaskItem.InvType = srcTaskItem.InvType; destTaskItem.Type = srcTaskItem.Type; - + destPart.AddInventoryItem(destTaskItem); if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) part.RemoveInventoryItem(itemId); ScenePresence avatar; - + if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) { destPart.GetProperties(avatar.ControllingClient); } } - + public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List items) { CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); @@ -1139,7 +1138,7 @@ namespace OpenSim.Region.Environment.Scenes } LLUUID newFolderID = LLUUID.Random(); - + profile.CreateFolder(category, newFolderID, 0xffff, profile.RootFolder.ID); foreach (LLUUID itemID in items) @@ -1346,7 +1345,7 @@ namespace OpenSim.Region.Environment.Scenes part.AddInventoryItem(taskItem); part.GetProperties(remoteClient); - + part.CreateScriptInstance(taskItem, 0, false); } } @@ -1370,7 +1369,7 @@ namespace OpenSim.Region.Environment.Scenes return; } - + SceneObjectPart destPart = GetSceneObjectPart(destId); if (destPart == null) @@ -1381,7 +1380,7 @@ namespace OpenSim.Region.Environment.Scenes destId); return; } - + // Must own the object, and have modify rights if (srcPart.OwnerID != destPart.OwnerID) return; @@ -1395,14 +1394,14 @@ namespace OpenSim.Region.Environment.Scenes "[PRIM INVENTORY]: " + "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); - // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - + // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - // "Object: Task Object trying to illegally load script onto task Other_Object!" // How do we shout from in here? return; } - + TaskInventoryItem destTaskItem = new TaskInventoryItem(); - + destTaskItem.ItemID = LLUUID.Random(); destTaskItem.CreatorID = srcTaskItem.CreatorID; destTaskItem.AssetID = srcTaskItem.AssetID; @@ -1417,7 +1416,7 @@ namespace OpenSim.Region.Environment.Scenes destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions; destTaskItem.NextPermissions = srcTaskItem.NextPermissions; destTaskItem.Flags = srcTaskItem.Flags; - + if (destPart.OwnerID != srcPart.OwnerID) { if (ExternalChecks.ExternalChecksPropagatePermissions()) @@ -1438,22 +1437,22 @@ namespace OpenSim.Region.Environment.Scenes destTaskItem.Name = srcTaskItem.Name; destTaskItem.InvType = srcTaskItem.InvType; destTaskItem.Type = srcTaskItem.Type; - + destPart.AddInventoryItemExclusive(destTaskItem); if (running > 0) { destPart.CreateScriptInstance(destTaskItem, 0, false); } - + ScenePresence avatar; - + if (TryGetAvatar(srcTaskItem.OwnerID, out avatar)) { destPart.GetProperties(avatar.ControllingClient); } } - + /// /// Called when an object is removed from the environment into inventory. /// @@ -1566,7 +1565,7 @@ namespace OpenSim.Region.Environment.Scenes private bool InventoryDeQueueAndDelete() { DeleteToInventoryHolder x = null; - + try { lock (m_inventoryDeletes) @@ -1580,13 +1579,13 @@ namespace OpenSim.Region.Environment.Scenes return true; } } - } + } catch(Exception e) { // We can't put the object group details in here since the root part may have disappeared (which is where these sit). // FIXME: This needs to be fixed. m_log.ErrorFormat( - "[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}", + "[AGENT INVENTORY]: Queued deletion of scene object to agent {0} {1} failed: {2}", (x != null ? x.remoteClient.Name : "unavailable"), (x != null ? x.remoteClient.AgentId : "unavailable"), e.ToString()); } @@ -1745,7 +1744,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + AssetBase asset = CreateAsset( objectGroup.GetPartName(objectGroup.LocalId), objectGroup.GetPartDescription(objectGroup.LocalId), @@ -1792,7 +1791,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + public LLUUID attachObjectAssetStore(IClientAPI remoteClient, SceneObjectGroup grp, LLUUID AgentId) { SceneObjectGroup objectGroup = grp; @@ -2057,7 +2056,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// public virtual SceneObjectGroup RezObject( - SceneObjectPart sourcePart, TaskInventoryItem item, + SceneObjectPart sourcePart, TaskInventoryItem item, LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param) { // Rez object @@ -2142,10 +2141,10 @@ namespace OpenSim.Region.Environment.Scenes return rootPart.ParentGroup; } } - + return null; } - + public virtual bool returnObjects(SceneObjectGroup[] returnobjects, LLUUID AgentId) { string message = ""; @@ -2218,7 +2217,7 @@ namespace OpenSim.Region.Environment.Scenes item.AssetType = asset.Type; item.InvType = (int)InventoryType.Object; item.Folder = folderID; - + if ((AgentId != returnobjects[i].RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) { uint perms = returnobjects[i].GetEffectivePermissions(); diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index e8a8a78..474f062 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -74,11 +74,11 @@ namespace OpenSim.Region.Environment.Scenes public InnerScene m_innerScene; /// - /// The last allocated local prim id. When a new local id is requested, the next number in the sequence is + /// The last allocated local prim id. When a new local id is requested, the next number in the sequence is /// dispenced. - /// + /// private uint m_lastAllocatedLocalId = 720000; - + private readonly Mutex _primAllocateMutex = new Mutex(false); private int m_timePhase = 24; @@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Scenes public override void Close() { m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); - + // Kick all ROOT agents with the message, 'The simulator is going down' ForEachScenePresence(delegate(ScenePresence avatar) { @@ -765,7 +765,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_frame % m_update_backup == 0) { UpdateStorageBackup(); - + } if (m_frame % m_update_terrain == 0) @@ -1112,7 +1112,7 @@ namespace OpenSim.Region.Environment.Scenes //X // . // - // Shade the terrain for shadows + // Shade the terrain for shadows if ((x - 1 > 0) && (y - 1 > 0)) { hfvalue = (float)hm[x, y]; @@ -1133,7 +1133,7 @@ namespace OpenSim.Region.Environment.Scenes else if (hfdiff < -0.3f) { // We have to desaturate and blacken the land at the same time - // we use floats, colors use bytes, so shrink are space down to + // we use floats, colors use bytes, so shrink are space down to // 0-255 @@ -1429,13 +1429,13 @@ namespace OpenSim.Region.Environment.Scenes public void LazySaveGeneratedMaptile(byte[] data, bool temporary) { // Overwrites the local Asset cache with new maptile data - // Assets are single write, this causes the asset server to ignore this update, + // Assets are single write, this causes the asset server to ignore this update, // but the local asset cache does not // this is on purpose! The net result of this is the region always has the most up to date - // map tile while protecting the (grid) asset database from bloat caused by a new asset each + // map tile while protecting the (grid) asset database from bloat caused by a new asset each // time a mapimage is generated! - + LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; int lastMapRefresh = 0; @@ -1711,7 +1711,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// true if the object was added, false if an object with the same uuid was already in the scene - /// + /// public bool AddRestoredSceneObject( SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) { @@ -1739,15 +1739,15 @@ namespace OpenSim.Region.Environment.Scenes lock (Entities) { ICollection entities = new List(Entities.Values); - + foreach (EntityBase e in entities) { if (e is SceneObjectGroup) DeleteSceneObject((SceneObjectGroup)e); } - } + } } - + /// /// Delete the given object from the scene. /// @@ -1791,8 +1791,8 @@ namespace OpenSim.Region.Environment.Scenes public void LoadPrimsFromXml(string fileName, bool newIdsFlag, LLVector3 loadOffset) { - m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); - + m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName); + m_serialiser.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset); } @@ -1805,29 +1805,29 @@ namespace OpenSim.Region.Environment.Scenes public void LoadPrimsFromXml2(string fileName) { - m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName); - + m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName); + m_serialiser.LoadPrimsFromXml2(this, fileName); } public void LoadPrimsFromXml2(TextReader reader, bool startScripts) { - m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from stream", RegionInfo.RegionName); - + m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from stream", RegionInfo.RegionName); + m_serialiser.LoadPrimsFromXml2(this, reader, startScripts); } public void SavePrimsToXml2(string fileName) { m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to {1}", RegionInfo.RegionName, fileName); - + m_serialiser.SavePrimsToXml2(this, fileName); } public void SavePrimsToXml2(TextWriter stream, LLVector3 min, LLVector3 max) { m_log.InfoFormat("[SCENE]: Saving prims in xml2 format for region {0} to stream", RegionInfo.RegionName); - + m_serialiser.SavePrimsToXml2(this, stream, min, max); } @@ -1835,7 +1835,7 @@ namespace OpenSim.Region.Environment.Scenes { m_log.InfoFormat( "[SCENE]: Saving prims with name {0} in xml2 format for region {1} to {2}", primName, RegionInfo.RegionName, fileName); - + List entityList = GetEntities(); List primList = new List(); @@ -1860,7 +1860,7 @@ namespace OpenSim.Region.Environment.Scenes public void LoadPrimsFromArchive(string filePath) { m_log.InfoFormat("[SCENE]: Loading archive to region {0} from {1}", RegionInfo.RegionName, filePath); - + m_archiver.DearchiveRegion(filePath); } @@ -1871,7 +1871,7 @@ namespace OpenSim.Region.Environment.Scenes public void SavePrimsToArchive(string filePath) { m_log.InfoFormat("[SCENE]: Writing archive for region {0} to {1}", RegionInfo.RegionName, filePath); - + m_archiver.ArchiveRegion(filePath); } @@ -1986,7 +1986,7 @@ namespace OpenSim.Region.Environment.Scenes m_log.Warn("{[INTERREGION]: A new prim arrived from a neighbor"); if (XMLMethod == 0) { - SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); + SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); AddRestoredSceneObject(sceneObject, true, false); SceneObjectPart RootPrim = GetSceneObjectPart(primID); @@ -1999,7 +1999,7 @@ namespace OpenSim.Region.Environment.Scenes { DeleteSceneObject(grp); } - + m_log.Info("[INTERREGION]: Denied prim crossing for banned avatar"); return false; @@ -2075,7 +2075,7 @@ namespace OpenSim.Region.Environment.Scenes else { m_log.DebugFormat( - "[SCENE]: Adding new {0} agent {1} {2} in {3}", + "[SCENE]: Adding new {0} agent {1} {2} in {3}", (child ? "child" : "root"), client.Name, client.AgentId, RegionInfo.RegionName); CommsManager.UserProfileCacheService.AddNewUser(client.AgentId); @@ -2156,7 +2156,7 @@ namespace OpenSim.Region.Environment.Scenes client.OnScriptReset += ProcessScriptReset; client.OnGetScriptRunning += GetScriptRunning; client.OnSetScriptRunning += SetScriptRunning; - + client.OnRegionHandleRequest += RegionHandleRequest; client.OnUnackedTerrain += TerrainUnAcked; @@ -2310,7 +2310,7 @@ namespace OpenSim.Region.Environment.Scenes public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) { appearance = null; // VS needs this line, mono doesn't - + try { if (m_AvatarFactory == null || @@ -2323,10 +2323,10 @@ namespace OpenSim.Region.Environment.Scenes catch (Exception e) { m_log.ErrorFormat( - "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", + "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", client.Name, client.AgentId, e); appearance = new AvatarAppearance(); - } + } } /// @@ -2341,13 +2341,13 @@ namespace OpenSim.Region.Environment.Scenes { childagentYN = avatar.IsChildAgent; } - + try { m_log.DebugFormat( - "[SCENE]: Removing {0} agent {1} from region {2}", + "[SCENE]: Removing {0} agent {1} from region {2}", (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); - + if (avatar.IsChildAgent) { m_innerScene.removeUserCount(false); @@ -2378,7 +2378,7 @@ namespace OpenSim.Region.Environment.Scenes // We don't know which count to remove it from // Avatar is already disposed :/ } - + m_eventManager.TriggerOnRemovePresence(agentID); Broadcast(delegate(IClientAPI client) { @@ -2717,7 +2717,7 @@ namespace OpenSim.Region.Environment.Scenes { m_innerScene.removeUserCount(true); } - + // Tell a single agent to disconnect from the region. presence.ControllingClient.SendShutdownConnectionNotice(); @@ -3827,9 +3827,9 @@ namespace OpenSim.Region.Environment.Scenes { //should be doing this by parcel, but as its only for testing // The use of Thread.Sleep here causes the following compiler error under mono 1.2.4 - // OpenSim/Region/Environment/Scenes/Scene.cs(3675,17): error CS0103: The name `Thread' does not exist + // OpenSim/Region/Environment/Scenes/Scene.cs(3675,17): error CS0103: The name `Thread' does not exist // in the context of `<>c__CompilerGenerated17' - // MW said it was okay to comment the body of this method out for now since the code is experimental + // MW said it was okay to comment the body of this method out for now since the code is experimental // and will be replaced anyway // ForEachClient(delegate(IClientAPI client) // { @@ -3840,7 +3840,7 @@ namespace OpenSim.Region.Environment.Scenes // client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); // }); } - + public void RegionHandleRequest(IClientAPI client, LLUUID regionID) { RegionInfo info; @@ -3860,4 +3860,4 @@ namespace OpenSim.Region.Environment.Scenes client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); } } -} +} diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 35a7434..adad7d3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -60,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes public event RemoveKnownRegionsFromAvatarList OnRemoveKnownRegionFromAvatar; public event LogOffUser OnLogOffUser; public event GetLandData OnGetLandData; - + private AgentCrossing handlerAvatarCrossingIntoRegion = null; // OnAvatarCrossingIntoRegion; private ExpectUserDelegate handlerExpectUser = null; // OnExpectUser; private ExpectPrimDelegate handlerExpectPrim = null; // OnExpectPrim; @@ -70,7 +70,7 @@ namespace OpenSim.Region.Environment.Scenes private ChildAgentUpdate handlerChildAgentUpdate = null; // OnChildAgentUpdate; private RemoveKnownRegionsFromAvatarList handlerRemoveKnownRegionFromAvatar = null; // OnRemoveKnownRegionFromAvatar; private LogOffUser handlerLogOffUser = null; - private GetLandData handlerGetLandData = null; // OnGetLandData + private GetLandData handlerGetLandData = null; // OnGetLandData public KillObjectDelegate KillObject; public string _debugRegionName = String.Empty; @@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Scenes } return null; } - + #endregion #region Inform Client of Neighbours @@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 lookAt, uint flags) { bool destRegionUp = false; - + if (regionHandle == m_regionInfo.RegionHandle) { // Teleport within the same region diff --git a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs index 0b2cc9e..a0e0a37 100644 --- a/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs +++ b/OpenSim/Region/Environment/Scenes/SceneExternalChecks.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * @@ -45,534 +45,553 @@ namespace OpenSim.Region.Environment.Scenes #region Object Permission Checks - public delegate uint GenerateClientFlags(LLUUID userID, LLUUID objectIDID); - private List GenerateClientFlagsCheckFunctions = new List(); + public delegate uint GenerateClientFlags(LLUUID userID, LLUUID objectIDID); + private List GenerateClientFlagsCheckFunctions = new List(); - public void addGenerateClientFlags(GenerateClientFlags delegateFunc) - { - if (!GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) - GenerateClientFlagsCheckFunctions.Add(delegateFunc); - } - public void removeGenerateClientFlags(GenerateClientFlags delegateFunc) - { - if (GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) - GenerateClientFlagsCheckFunctions.Remove(delegateFunc); - } + public void addGenerateClientFlags(GenerateClientFlags delegateFunc) + { + if (!GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) + GenerateClientFlagsCheckFunctions.Add(delegateFunc); + } - public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) - { - SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); - - if (part == null) - return 0; - - uint perms=part.GetEffectiveObjectFlags() | - (uint)LLObject.ObjectFlags.ObjectModify | - (uint)LLObject.ObjectFlags.ObjectCopy | - (uint)LLObject.ObjectFlags.ObjectMove | - (uint)LLObject.ObjectFlags.ObjectTransfer | - (uint)LLObject.ObjectFlags.ObjectYouOwner | - (uint)LLObject.ObjectFlags.ObjectAnyOwner | - (uint)LLObject.ObjectFlags.ObjectOwnerModify | - (uint)LLObject.ObjectFlags.ObjectYouOfficer; - - foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) - { - perms &= check(userID, objectID); - } - return perms; - } + public void removeGenerateClientFlags(GenerateClientFlags delegateFunc) + { + if (GenerateClientFlagsCheckFunctions.Contains(delegateFunc)) + GenerateClientFlagsCheckFunctions.Remove(delegateFunc); + } - public delegate void SetBypassPermissions(bool value); - private List SetBypassPermissionsCheckFunctions = new List(); + public uint ExternalChecksGenerateClientFlags(LLUUID userID, LLUUID objectID) + { + SceneObjectPart part=m_scene.GetSceneObjectPart(objectID); - public void addSetBypassPermissions(SetBypassPermissions delegateFunc) - { - if (!SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) - SetBypassPermissionsCheckFunctions.Add(delegateFunc); - } - public void removeSetBypassPermissions(SetBypassPermissions delegateFunc) - { - if (SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) - SetBypassPermissionsCheckFunctions.Remove(delegateFunc); - } + if (part == null) + return 0; + + uint perms=part.GetEffectiveObjectFlags() | + (uint)LLObject.ObjectFlags.ObjectModify | + (uint)LLObject.ObjectFlags.ObjectCopy | + (uint)LLObject.ObjectFlags.ObjectMove | + (uint)LLObject.ObjectFlags.ObjectTransfer | + (uint)LLObject.ObjectFlags.ObjectYouOwner | + (uint)LLObject.ObjectFlags.ObjectAnyOwner | + (uint)LLObject.ObjectFlags.ObjectOwnerModify | + (uint)LLObject.ObjectFlags.ObjectYouOfficer; - public void ExternalChecksSetBypassPermissions(bool value) + foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions) { - foreach (SetBypassPermissions check in SetBypassPermissionsCheckFunctions) - { - check(value); - } + perms &= check(userID, objectID); } + return perms; + } - public delegate bool BypassPermissions(); - private List BypassPermissionsCheckFunctions = new List(); + public delegate void SetBypassPermissions(bool value); + private List SetBypassPermissionsCheckFunctions = new List(); - public void addBypassPermissions(BypassPermissions delegateFunc) - { - if (!BypassPermissionsCheckFunctions.Contains(delegateFunc)) - BypassPermissionsCheckFunctions.Add(delegateFunc); - } - public void removeBypassPermissions(BypassPermissions delegateFunc) + public void addSetBypassPermissions(SetBypassPermissions delegateFunc) + { + if (!SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) + SetBypassPermissionsCheckFunctions.Add(delegateFunc); + } + + public void removeSetBypassPermissions(SetBypassPermissions delegateFunc) + { + if (SetBypassPermissionsCheckFunctions.Contains(delegateFunc)) + SetBypassPermissionsCheckFunctions.Remove(delegateFunc); + } + + public void ExternalChecksSetBypassPermissions(bool value) + { + foreach (SetBypassPermissions check in SetBypassPermissionsCheckFunctions) { - if (BypassPermissionsCheckFunctions.Contains(delegateFunc)) - BypassPermissionsCheckFunctions.Remove(delegateFunc); + check(value); } + } - public bool ExternalChecksBypassPermissions() + public delegate bool BypassPermissions(); + private List BypassPermissionsCheckFunctions = new List(); + + public void addBypassPermissions(BypassPermissions delegateFunc) + { + if (!BypassPermissionsCheckFunctions.Contains(delegateFunc)) + BypassPermissionsCheckFunctions.Add(delegateFunc); + } + + public void removeBypassPermissions(BypassPermissions delegateFunc) + { + if (BypassPermissionsCheckFunctions.Contains(delegateFunc)) + BypassPermissionsCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksBypassPermissions() + { + foreach (BypassPermissions check in BypassPermissionsCheckFunctions) { - foreach (BypassPermissions check in BypassPermissionsCheckFunctions) + if (check() == false) { - if (check() == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool PropagatePermissions(); - private List PropagatePermissionsCheckFunctions = new List(); + public delegate bool PropagatePermissions(); + private List PropagatePermissionsCheckFunctions = new List(); - public void addPropagatePermissions(PropagatePermissions delegateFunc) - { - if (!PropagatePermissionsCheckFunctions.Contains(delegateFunc)) - PropagatePermissionsCheckFunctions.Add(delegateFunc); - } - public void removePropagatePermissions(PropagatePermissions delegateFunc) - { - if (PropagatePermissionsCheckFunctions.Contains(delegateFunc)) - PropagatePermissionsCheckFunctions.Remove(delegateFunc); - } + public void addPropagatePermissions(PropagatePermissions delegateFunc) + { + if (!PropagatePermissionsCheckFunctions.Contains(delegateFunc)) + PropagatePermissionsCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksPropagatePermissions() + public void removePropagatePermissions(PropagatePermissions delegateFunc) + { + if (PropagatePermissionsCheckFunctions.Contains(delegateFunc)) + PropagatePermissionsCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksPropagatePermissions() + { + foreach (PropagatePermissions check in PropagatePermissionsCheckFunctions) { - foreach (PropagatePermissions check in PropagatePermissionsCheckFunctions) + if (check() == false) { - if (check() == false) - { - return false; - } + return false; } - return true; } + return true; + } - #region REZ OBJECT - public delegate bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene); - private List CanRezObjectCheckFunctions = new List(); + #region REZ OBJECT + public delegate bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene); + private List CanRezObjectCheckFunctions = new List(); - public void addCheckRezObject(CanRezObject delegateFunc) - { - if (!CanRezObjectCheckFunctions.Contains(delegateFunc)) - CanRezObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckRezObject(CanRezObject delegateFunc) - { - if (CanRezObjectCheckFunctions.Contains(delegateFunc)) - CanRezObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckRezObject(CanRezObject delegateFunc) + { + if (!CanRezObjectCheckFunctions.Contains(delegateFunc)) + CanRezObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckRezObject(CanRezObject delegateFunc) + { + if (CanRezObjectCheckFunctions.Contains(delegateFunc)) + CanRezObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition) + public bool ExternalChecksCanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition) + { + foreach (CanRezObject check in CanRezObjectCheckFunctions) { - foreach (CanRezObject check in CanRezObjectCheckFunctions) + if (check(objectCount, owner,objectPosition, m_scene) == false) { - if (check(objectCount, owner,objectPosition, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region DELETE OBJECT - public delegate bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene); - private List CanDeleteObjectCheckFunctions = new List(); + #region DELETE OBJECT + public delegate bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene); + private List CanDeleteObjectCheckFunctions = new List(); - public void addCheckDeleteObject(CanDeleteObject delegateFunc) - { - if (!CanDeleteObjectCheckFunctions.Contains(delegateFunc)) - CanDeleteObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckDeleteObject(CanDeleteObject delegateFunc) - { - if (CanDeleteObjectCheckFunctions.Contains(delegateFunc)) - CanDeleteObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckDeleteObject(CanDeleteObject delegateFunc) + { + if (!CanDeleteObjectCheckFunctions.Contains(delegateFunc)) + CanDeleteObjectCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanDeleteObject(LLUUID objectID, LLUUID deleter) + public void removeCheckDeleteObject(CanDeleteObject delegateFunc) + { + if (CanDeleteObjectCheckFunctions.Contains(delegateFunc)) + CanDeleteObjectCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanDeleteObject(LLUUID objectID, LLUUID deleter) + { + foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions) { - foreach (CanDeleteObject check in CanDeleteObjectCheckFunctions) + if (check(objectID,deleter,m_scene) == false) { - if (check(objectID,deleter,m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region TAKE OBJECT - public delegate bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene); - private List CanTakeObjectCheckFunctions = new List(); + #region TAKE OBJECT + public delegate bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene); + private List CanTakeObjectCheckFunctions = new List(); - public void addCheckTakeObject(CanTakeObject delegateFunc) - { - if (!CanTakeObjectCheckFunctions.Contains(delegateFunc)) - CanTakeObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckTakeObject(CanTakeObject delegateFunc) - { - if (CanTakeObjectCheckFunctions.Contains(delegateFunc)) - CanTakeObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckTakeObject(CanTakeObject delegateFunc) + { + if (!CanTakeObjectCheckFunctions.Contains(delegateFunc)) + CanTakeObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckTakeObject(CanTakeObject delegateFunc) + { + if (CanTakeObjectCheckFunctions.Contains(delegateFunc)) + CanTakeObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanTakeObject(LLUUID objectID, LLUUID AvatarTakingUUID) + public bool ExternalChecksCanTakeObject(LLUUID objectID, LLUUID AvatarTakingUUID) + { + foreach (CanTakeObject check in CanTakeObjectCheckFunctions) { - foreach (CanTakeObject check in CanTakeObjectCheckFunctions) + if (check(objectID, AvatarTakingUUID, m_scene) == false) { - if (check(objectID, AvatarTakingUUID, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region TAKE COPY OBJECT - public delegate bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene); - private List CanTakeCopyObjectCheckFunctions = new List(); + #region TAKE COPY OBJECT + public delegate bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene); + private List CanTakeCopyObjectCheckFunctions = new List(); - public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc) - { - if (!CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) - CanTakeCopyObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckTakeCopyObject(CanTakeCopyObject delegateFunc) - { - if (CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) - CanTakeCopyObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckTakeCopyObject(CanTakeCopyObject delegateFunc) + { + if (!CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) + CanTakeCopyObjectCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanTakeCopyObject(LLUUID objectID, LLUUID userID) + public void removeCheckTakeCopyObject(CanTakeCopyObject delegateFunc) + { + if (CanTakeCopyObjectCheckFunctions.Contains(delegateFunc)) + CanTakeCopyObjectCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanTakeCopyObject(LLUUID objectID, LLUUID userID) + { + foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions) { - foreach (CanTakeCopyObject check in CanTakeCopyObjectCheckFunctions) + if (check(objectID,userID,m_scene) == false) { - if (check(objectID,userID,m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region DUPLICATE OBJECT - public delegate bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition); - private List CanDuplicateObjectCheckFunctions = new List(); + #region DUPLICATE OBJECT + public delegate bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition); + private List CanDuplicateObjectCheckFunctions = new List(); - public void addCheckDuplicateObject(CanDuplicateObject delegateFunc) - { - if (!CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) - CanDuplicateObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckDuplicateObject(CanDuplicateObject delegateFunc) - { - if (CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) - CanDuplicateObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckDuplicateObject(CanDuplicateObject delegateFunc) + { + if (!CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) + CanDuplicateObjectCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, LLVector3 objectPosition) + public void removeCheckDuplicateObject(CanDuplicateObject delegateFunc) + { + if (CanDuplicateObjectCheckFunctions.Contains(delegateFunc)) + CanDuplicateObjectCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, LLVector3 objectPosition) + { + foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions) { - foreach (CanDuplicateObject check in CanDuplicateObjectCheckFunctions) + if (check(objectCount, objectID, owner, m_scene, objectPosition) == false) { - if (check(objectCount, objectID, owner, m_scene, objectPosition) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region EDIT OBJECT - public delegate bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene); - private List CanEditObjectCheckFunctions = new List(); + #region EDIT OBJECT + public delegate bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene); + private List CanEditObjectCheckFunctions = new List(); - public void addCheckEditObject(CanEditObject delegateFunc) - { - if (!CanEditObjectCheckFunctions.Contains(delegateFunc)) - CanEditObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckEditObject(CanEditObject delegateFunc) - { - if (CanEditObjectCheckFunctions.Contains(delegateFunc)) - CanEditObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckEditObject(CanEditObject delegateFunc) + { + if (!CanEditObjectCheckFunctions.Contains(delegateFunc)) + CanEditObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckEditObject(CanEditObject delegateFunc) + { + if (CanEditObjectCheckFunctions.Contains(delegateFunc)) + CanEditObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanEditObject(LLUUID objectID, LLUUID editorID) + public bool ExternalChecksCanEditObject(LLUUID objectID, LLUUID editorID) + { + foreach (CanEditObject check in CanEditObjectCheckFunctions) { - foreach (CanEditObject check in CanEditObjectCheckFunctions) + if (check(objectID, editorID, m_scene) == false) { - if (check(objectID, editorID, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region MOVE OBJECT - public delegate bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene); - private List CanMoveObjectCheckFunctions = new List(); + #region MOVE OBJECT + public delegate bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene); + private List CanMoveObjectCheckFunctions = new List(); - public void addCheckMoveObject(CanMoveObject delegateFunc) - { - if (!CanMoveObjectCheckFunctions.Contains(delegateFunc)) - CanMoveObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckMoveObject(CanMoveObject delegateFunc) - { - if (CanMoveObjectCheckFunctions.Contains(delegateFunc)) - CanMoveObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckMoveObject(CanMoveObject delegateFunc) + { + if (!CanMoveObjectCheckFunctions.Contains(delegateFunc)) + CanMoveObjectCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanMoveObject(LLUUID objectID, LLUUID moverID) + public void removeCheckMoveObject(CanMoveObject delegateFunc) + { + if (CanMoveObjectCheckFunctions.Contains(delegateFunc)) + CanMoveObjectCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanMoveObject(LLUUID objectID, LLUUID moverID) + { + foreach (CanMoveObject check in CanMoveObjectCheckFunctions) { - foreach (CanMoveObject check in CanMoveObjectCheckFunctions) + if (check(objectID,moverID,m_scene) == false) { - if (check(objectID,moverID,m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region OBJECT ENTRY - public delegate bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene); - private List CanObjectEntryCheckFunctions = new List(); + #region OBJECT ENTRY + public delegate bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene); + private List CanObjectEntryCheckFunctions = new List(); - public void addCheckObjectEntry(CanObjectEntry delegateFunc) - { - if (!CanObjectEntryCheckFunctions.Contains(delegateFunc)) - CanObjectEntryCheckFunctions.Add(delegateFunc); - } - public void removeCheckObjectEntry(CanObjectEntry delegateFunc) - { - if (CanObjectEntryCheckFunctions.Contains(delegateFunc)) - CanObjectEntryCheckFunctions.Remove(delegateFunc); - } + public void addCheckObjectEntry(CanObjectEntry delegateFunc) + { + if (!CanObjectEntryCheckFunctions.Contains(delegateFunc)) + CanObjectEntryCheckFunctions.Add(delegateFunc); + } + + public void removeCheckObjectEntry(CanObjectEntry delegateFunc) + { + if (CanObjectEntryCheckFunctions.Contains(delegateFunc)) + CanObjectEntryCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanObjectEntry(LLUUID objectID, LLVector3 newPoint) + public bool ExternalChecksCanObjectEntry(LLUUID objectID, LLVector3 newPoint) + { + foreach (CanObjectEntry check in CanObjectEntryCheckFunctions) { - foreach (CanObjectEntry check in CanObjectEntryCheckFunctions) + if (check(objectID, newPoint, m_scene) == false) { - if (check(objectID, newPoint, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region RETURN OBJECT - public delegate bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene); - private List CanReturnObjectCheckFunctions = new List(); + #region RETURN OBJECT + public delegate bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene); + private List CanReturnObjectCheckFunctions = new List(); - public void addCheckReturnObject(CanReturnObject delegateFunc) - { - if (!CanReturnObjectCheckFunctions.Contains(delegateFunc)) - CanReturnObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckReturnObject(CanReturnObject delegateFunc) - { - if (CanReturnObjectCheckFunctions.Contains(delegateFunc)) - CanReturnObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckReturnObject(CanReturnObject delegateFunc) + { + if (!CanReturnObjectCheckFunctions.Contains(delegateFunc)) + CanReturnObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckReturnObject(CanReturnObject delegateFunc) + { + if (CanReturnObjectCheckFunctions.Contains(delegateFunc)) + CanReturnObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanReturnObject(LLUUID objectID, LLUUID returnerID) + public bool ExternalChecksCanReturnObject(LLUUID objectID, LLUUID returnerID) + { + foreach (CanReturnObject check in CanReturnObjectCheckFunctions) { - foreach (CanReturnObject check in CanReturnObjectCheckFunctions) + if (check(objectID,returnerID,m_scene) == false) { - if (check(objectID,returnerID,m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region INSTANT MESSAGE - public delegate bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene); - private List CanInstantMessageCheckFunctions = new List(); + #region INSTANT MESSAGE + public delegate bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene); + private List CanInstantMessageCheckFunctions = new List(); - public void addCheckInstantMessage(CanInstantMessage delegateFunc) - { - if (!CanInstantMessageCheckFunctions.Contains(delegateFunc)) - CanInstantMessageCheckFunctions.Add(delegateFunc); - } - public void removeCheckInstantMessage(CanInstantMessage delegateFunc) - { - if (CanInstantMessageCheckFunctions.Contains(delegateFunc)) - CanInstantMessageCheckFunctions.Remove(delegateFunc); - } + public void addCheckInstantMessage(CanInstantMessage delegateFunc) + { + if (!CanInstantMessageCheckFunctions.Contains(delegateFunc)) + CanInstantMessageCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanInstantMessage(LLUUID user, LLUUID target) + public void removeCheckInstantMessage(CanInstantMessage delegateFunc) + { + if (CanInstantMessageCheckFunctions.Contains(delegateFunc)) + CanInstantMessageCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanInstantMessage(LLUUID user, LLUUID target) + { + foreach (CanInstantMessage check in CanInstantMessageCheckFunctions) { - foreach (CanInstantMessage check in CanInstantMessageCheckFunctions) + if (check(user, target, m_scene) == false) { - if (check(user, target, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } + + #endregion - #endregion + #region INVENTORY TRANSFER + public delegate bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene); + private List CanInventoryTransferCheckFunctions = new List(); - #region INVENTORY TRANSFER - public delegate bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene); - private List CanInventoryTransferCheckFunctions = new List(); + public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc) + { + if (!CanInventoryTransferCheckFunctions.Contains(delegateFunc)) + CanInventoryTransferCheckFunctions.Add(delegateFunc); + } - public void addCheckInventoryTransfer(CanInventoryTransfer delegateFunc) - { - if (!CanInventoryTransferCheckFunctions.Contains(delegateFunc)) - CanInventoryTransferCheckFunctions.Add(delegateFunc); - } - public void removeCheckInventoryTransfer(CanInventoryTransfer delegateFunc) + public void removeCheckInventoryTransfer(CanInventoryTransfer delegateFunc) { if (CanInventoryTransferCheckFunctions.Contains(delegateFunc)) CanInventoryTransferCheckFunctions.Remove(delegateFunc); } - public bool ExternalChecksCanInventoryTransfer(LLUUID user, LLUUID target) + public bool ExternalChecksCanInventoryTransfer(LLUUID user, LLUUID target) + { + foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions) { - foreach (CanInventoryTransfer check in CanInventoryTransferCheckFunctions) + if (check(user, target, m_scene) == false) { - if (check(user, target, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region VIEW SCRIPT - public delegate bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); - private List CanViewScriptCheckFunctions = new List(); + #region VIEW SCRIPT + public delegate bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); + private List CanViewScriptCheckFunctions = new List(); - public void addCheckViewScript(CanViewScript delegateFunc) - { - if (!CanViewScriptCheckFunctions.Contains(delegateFunc)) - CanViewScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckViewScript(CanViewScript delegateFunc) - { - if (CanViewScriptCheckFunctions.Contains(delegateFunc)) - CanViewScriptCheckFunctions.Remove(delegateFunc); - } + public void addCheckViewScript(CanViewScript delegateFunc) + { + if (!CanViewScriptCheckFunctions.Contains(delegateFunc)) + CanViewScriptCheckFunctions.Add(delegateFunc); + } + + public void removeCheckViewScript(CanViewScript delegateFunc) + { + if (CanViewScriptCheckFunctions.Contains(delegateFunc)) + CanViewScriptCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanViewScript(LLUUID script, LLUUID objectID, LLUUID user) + public bool ExternalChecksCanViewScript(LLUUID script, LLUUID objectID, LLUUID user) + { + foreach (CanViewScript check in CanViewScriptCheckFunctions) { - foreach (CanViewScript check in CanViewScriptCheckFunctions) + if (check(script, objectID, user, m_scene) == false) { - if (check(script, objectID, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); - private List CanViewNotecardCheckFunctions = new List(); + public delegate bool CanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); + private List CanViewNotecardCheckFunctions = new List(); - public void addCheckViewNotecard(CanViewNotecard delegateFunc) - { - if (!CanViewNotecardCheckFunctions.Contains(delegateFunc)) - CanViewNotecardCheckFunctions.Add(delegateFunc); - } - public void removeCheckViewNotecard(CanViewNotecard delegateFunc) - { - if (CanViewNotecardCheckFunctions.Contains(delegateFunc)) - CanViewNotecardCheckFunctions.Remove(delegateFunc); - } + public void addCheckViewNotecard(CanViewNotecard delegateFunc) + { + if (!CanViewNotecardCheckFunctions.Contains(delegateFunc)) + CanViewNotecardCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user) + public void removeCheckViewNotecard(CanViewNotecard delegateFunc) + { + if (CanViewNotecardCheckFunctions.Contains(delegateFunc)) + CanViewNotecardCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanViewNotecard(LLUUID script, LLUUID objectID, LLUUID user) + { + foreach (CanViewNotecard check in CanViewNotecardCheckFunctions) { - foreach (CanViewNotecard check in CanViewNotecardCheckFunctions) + if (check(script, objectID, user, m_scene) == false) { - if (check(script, objectID, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region EDIT SCRIPT - public delegate bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); - private List CanEditScriptCheckFunctions = new List(); + #region EDIT SCRIPT + public delegate bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); + private List CanEditScriptCheckFunctions = new List(); - public void addCheckEditScript(CanEditScript delegateFunc) - { - if (!CanEditScriptCheckFunctions.Contains(delegateFunc)) - CanEditScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckEditScript(CanEditScript delegateFunc) - { - if (CanEditScriptCheckFunctions.Contains(delegateFunc)) - CanEditScriptCheckFunctions.Remove(delegateFunc); - } + public void addCheckEditScript(CanEditScript delegateFunc) + { + if (!CanEditScriptCheckFunctions.Contains(delegateFunc)) + CanEditScriptCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanEditScript(LLUUID script, LLUUID objectID, LLUUID user) + public void removeCheckEditScript(CanEditScript delegateFunc) + { + if (CanEditScriptCheckFunctions.Contains(delegateFunc)) + CanEditScriptCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanEditScript(LLUUID script, LLUUID objectID, LLUUID user) + { + foreach (CanEditScript check in CanEditScriptCheckFunctions) { - foreach (CanEditScript check in CanEditScriptCheckFunctions) + if (check(script, objectID, user, m_scene) == false) { - if (check(script, objectID, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene); - private List CanEditNotecardCheckFunctions = new List(); + public delegate bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene); + private List CanEditNotecardCheckFunctions = new List(); - public void addCheckEditNotecard(CanEditNotecard delegateFunc) - { - if (!CanEditNotecardCheckFunctions.Contains(delegateFunc)) - CanEditNotecardCheckFunctions.Add(delegateFunc); - } - public void removeCheckEditNotecard(CanEditNotecard delegateFunc) - { - if (CanEditNotecardCheckFunctions.Contains(delegateFunc)) - CanEditNotecardCheckFunctions.Remove(delegateFunc); - } + public void addCheckEditNotecard(CanEditNotecard delegateFunc) + { + if (!CanEditNotecardCheckFunctions.Contains(delegateFunc)) + CanEditNotecardCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanEditNotecard(LLUUID script, LLUUID objectID, LLUUID user) + public void removeCheckEditNotecard(CanEditNotecard delegateFunc) + { + if (CanEditNotecardCheckFunctions.Contains(delegateFunc)) + CanEditNotecardCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanEditNotecard(LLUUID script, LLUUID objectID, LLUUID user) { foreach (CanEditNotecard check in CanEditNotecardCheckFunctions) { @@ -584,388 +603,402 @@ namespace OpenSim.Region.Environment.Scenes return true; } - #endregion + #endregion - #region RUN SCRIPT (When Script Placed in Object) - public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); - private List CanRunScriptCheckFunctions = new List(); + #region RUN SCRIPT (When Script Placed in Object) + public delegate bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene); + private List CanRunScriptCheckFunctions = new List(); - public void addCheckRunScript(CanRunScript delegateFunc) - { - if (!CanRunScriptCheckFunctions.Contains(delegateFunc)) - CanRunScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckRunScript(CanRunScript delegateFunc) - { - if (CanRunScriptCheckFunctions.Contains(delegateFunc)) - CanRunScriptCheckFunctions.Remove(delegateFunc); - } + public void addCheckRunScript(CanRunScript delegateFunc) + { + if (!CanRunScriptCheckFunctions.Contains(delegateFunc)) + CanRunScriptCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanRunScript(LLUUID script, LLUUID objectID, LLUUID user) + public void removeCheckRunScript(CanRunScript delegateFunc) + { + if (CanRunScriptCheckFunctions.Contains(delegateFunc)) + CanRunScriptCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanRunScript(LLUUID script, LLUUID objectID, LLUUID user) + { + foreach (CanRunScript check in CanRunScriptCheckFunctions) { - foreach (CanRunScript check in CanRunScriptCheckFunctions) + if (check(script, objectID, user, m_scene) == false) { - if (check(script, objectID, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region START SCRIPT (When Script run box is Checked after placed in object) - public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene); - private List CanStartScriptCheckFunctions = new List(); + #region START SCRIPT (When Script run box is Checked after placed in object) + public delegate bool CanStartScript(LLUUID script, LLUUID user, Scene scene); + private List CanStartScriptCheckFunctions = new List(); - public void addCheckStartScript(CanStartScript delegateFunc) - { - if (!CanStartScriptCheckFunctions.Contains(delegateFunc)) - CanStartScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckStartScript(CanStartScript delegateFunc) - { - if (CanStartScriptCheckFunctions.Contains(delegateFunc)) - CanStartScriptCheckFunctions.Remove(delegateFunc); - } + public void addCheckStartScript(CanStartScript delegateFunc) + { + if (!CanStartScriptCheckFunctions.Contains(delegateFunc)) + CanStartScriptCheckFunctions.Add(delegateFunc); + } + + public void removeCheckStartScript(CanStartScript delegateFunc) + { + if (CanStartScriptCheckFunctions.Contains(delegateFunc)) + CanStartScriptCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user) + public bool ExternalChecksCanStartScript(LLUUID script, LLUUID user) + { + foreach (CanStartScript check in CanStartScriptCheckFunctions) { - foreach (CanStartScript check in CanStartScriptCheckFunctions) + if (check(script, user, m_scene) == false) { - if (check(script, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } #endregion - #region STOP SCRIPT (When Script run box is unchecked after placed in object) - public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene); - private List CanStopScriptCheckFunctions = new List(); + #region STOP SCRIPT (When Script run box is unchecked after placed in object) + public delegate bool CanStopScript(LLUUID script, LLUUID user, Scene scene); + private List CanStopScriptCheckFunctions = new List(); + + public void addCheckStopScript(CanStopScript delegateFunc) + { + if (!CanStopScriptCheckFunctions.Contains(delegateFunc)) + CanStopScriptCheckFunctions.Add(delegateFunc); + } - public void addCheckStopScript(CanStopScript delegateFunc) - { - if (!CanStopScriptCheckFunctions.Contains(delegateFunc)) - CanStopScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckStopScript(CanStopScript delegateFunc) - { - if (CanStopScriptCheckFunctions.Contains(delegateFunc)) - CanStopScriptCheckFunctions.Remove(delegateFunc); - } + public void removeCheckStopScript(CanStopScript delegateFunc) + { + if (CanStopScriptCheckFunctions.Contains(delegateFunc)) + CanStopScriptCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user) + public bool ExternalChecksCanStopScript(LLUUID script, LLUUID user) + { + foreach (CanStopScript check in CanStopScriptCheckFunctions) { - foreach (CanStopScript check in CanStopScriptCheckFunctions) + if (check(script, user, m_scene) == false) { - if (check(script, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region RESET SCRIPT - public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene); - private List CanResetScriptCheckFunctions = new List(); + #region RESET SCRIPT + public delegate bool CanResetScript(LLUUID script, LLUUID user, Scene scene); + private List CanResetScriptCheckFunctions = new List(); - public void addCheckResetScript(CanResetScript delegateFunc) - { - if (!CanResetScriptCheckFunctions.Contains(delegateFunc)) - CanResetScriptCheckFunctions.Add(delegateFunc); - } - public void removeCheckResetScript(CanResetScript delegateFunc) - { - if (CanResetScriptCheckFunctions.Contains(delegateFunc)) - CanResetScriptCheckFunctions.Remove(delegateFunc); - } + public void addCheckResetScript(CanResetScript delegateFunc) + { + if (!CanResetScriptCheckFunctions.Contains(delegateFunc)) + CanResetScriptCheckFunctions.Add(delegateFunc); + } + + public void removeCheckResetScript(CanResetScript delegateFunc) + { + if (CanResetScriptCheckFunctions.Contains(delegateFunc)) + CanResetScriptCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user) + public bool ExternalChecksCanResetScript(LLUUID script, LLUUID user) + { + foreach (CanResetScript check in CanResetScriptCheckFunctions) { - foreach (CanResetScript check in CanResetScriptCheckFunctions) + if (check(script, user, m_scene) == false) { - if (check(script, user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region TERRAFORM LAND - public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); - private List CanTerraformLandCheckFunctions = new List(); + #region TERRAFORM LAND + public delegate bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene); + private List CanTerraformLandCheckFunctions = new List(); - public void addCheckTerraformLand(CanTerraformLand delegateFunc) - { - if (!CanTerraformLandCheckFunctions.Contains(delegateFunc)) - CanTerraformLandCheckFunctions.Add(delegateFunc); - } - public void removeCheckTerraformLand(CanTerraformLand delegateFunc) - { - if (CanTerraformLandCheckFunctions.Contains(delegateFunc)) - CanTerraformLandCheckFunctions.Remove(delegateFunc); - } + public void addCheckTerraformLand(CanTerraformLand delegateFunc) + { + if (!CanTerraformLandCheckFunctions.Contains(delegateFunc)) + CanTerraformLandCheckFunctions.Add(delegateFunc); + } + + public void removeCheckTerraformLand(CanTerraformLand delegateFunc) + { + if (CanTerraformLandCheckFunctions.Contains(delegateFunc)) + CanTerraformLandCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanTerraformLand(LLUUID user, LLVector3 pos) + public bool ExternalChecksCanTerraformLand(LLUUID user, LLVector3 pos) + { + foreach (CanTerraformLand check in CanTerraformLandCheckFunctions) { - foreach (CanTerraformLand check in CanTerraformLandCheckFunctions) + if (check(user, pos, m_scene) == false) { - if (check(user, pos, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region RUN CONSOLE COMMAND - public delegate bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene); - private List CanRunConsoleCommandCheckFunctions = new List(); + #region RUN CONSOLE COMMAND + public delegate bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene); + private List CanRunConsoleCommandCheckFunctions = new List(); - public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) - { - if (!CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) - CanRunConsoleCommandCheckFunctions.Add(delegateFunc); - } - public void removeCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) - { - if (CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) - CanRunConsoleCommandCheckFunctions.Remove(delegateFunc); - } + public void addCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) + { + if (!CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) + CanRunConsoleCommandCheckFunctions.Add(delegateFunc); + } + + public void removeCheckRunConsoleCommand(CanRunConsoleCommand delegateFunc) + { + if (CanRunConsoleCommandCheckFunctions.Contains(delegateFunc)) + CanRunConsoleCommandCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanRunConsoleCommand(LLUUID user) + public bool ExternalChecksCanRunConsoleCommand(LLUUID user) + { + foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions) { - foreach (CanRunConsoleCommand check in CanRunConsoleCommandCheckFunctions) + if (check(user, m_scene) == false) { - if (check(user, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - #endregion + #endregion - #region CAN ISSUE ESTATE COMMAND - public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand); - private List CanIssueEstateCommandCheckFunctions = new List(); + #region CAN ISSUE ESTATE COMMAND + public delegate bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand); + private List CanIssueEstateCommandCheckFunctions = new List(); - public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) - { - if (!CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) - CanIssueEstateCommandCheckFunctions.Add(delegateFunc); - } - public void removeCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) - { - if (CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) - CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); - } + public void addCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) + { + if (!CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) + CanIssueEstateCommandCheckFunctions.Add(delegateFunc); + } + + public void removeCheckIssueEstateCommand(CanIssueEstateCommand delegateFunc) + { + if (CanIssueEstateCommandCheckFunctions.Contains(delegateFunc)) + CanIssueEstateCommandCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand) + public bool ExternalChecksCanIssueEstateCommand(LLUUID user, bool ownerCommand) + { + foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) { - foreach (CanIssueEstateCommand check in CanIssueEstateCommandCheckFunctions) + if (check(user, m_scene, ownerCommand) == false) { - if (check(user, m_scene, ownerCommand) == false) - { - return false; - } + return false; } - return true; } - #endregion + return true; + } + #endregion - #region CAN BE GODLIKE - public delegate bool CanBeGodLike(LLUUID user, Scene requestFromScene); - private List CanBeGodLikeCheckFunctions = new List(); + #region CAN BE GODLIKE + public delegate bool CanBeGodLike(LLUUID user, Scene requestFromScene); + private List CanBeGodLikeCheckFunctions = new List(); - public void addCheckBeGodLike(CanBeGodLike delegateFunc) - { - if (!CanBeGodLikeCheckFunctions.Contains(delegateFunc)) - CanBeGodLikeCheckFunctions.Add(delegateFunc); - } - public void removeCheckBeGodLike(CanBeGodLike delegateFunc) - { - if (CanBeGodLikeCheckFunctions.Contains(delegateFunc)) - CanBeGodLikeCheckFunctions.Remove(delegateFunc); - } + public void addCheckBeGodLike(CanBeGodLike delegateFunc) + { + if (!CanBeGodLikeCheckFunctions.Contains(delegateFunc)) + CanBeGodLikeCheckFunctions.Add(delegateFunc); + } + + public void removeCheckBeGodLike(CanBeGodLike delegateFunc) + { + if (CanBeGodLikeCheckFunctions.Contains(delegateFunc)) + CanBeGodLikeCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanBeGodLike(LLUUID user) + public bool ExternalChecksCanBeGodLike(LLUUID user) + { + foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions) { - foreach (CanBeGodLike check in CanBeGodLikeCheckFunctions) + if (check(user, m_scene) == false) { - if (check(user, m_scene) == false) - { - return false; - } + return false; } - return true; } - #endregion + return true; + } + #endregion - #region EDIT PARCEL - public delegate bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene); - private List CanEditParcelCheckFunctions = new List(); + #region EDIT PARCEL + public delegate bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene); + private List CanEditParcelCheckFunctions = new List(); - public void addCheckEditParcel(CanEditParcel delegateFunc) - { - if (!CanEditParcelCheckFunctions.Contains(delegateFunc)) - CanEditParcelCheckFunctions.Add(delegateFunc); - } - public void removeCheckEditParcel(CanEditParcel delegateFunc) - { - if (CanEditParcelCheckFunctions.Contains(delegateFunc)) - CanEditParcelCheckFunctions.Remove(delegateFunc); - } + public void addCheckEditParcel(CanEditParcel delegateFunc) + { + if (!CanEditParcelCheckFunctions.Contains(delegateFunc)) + CanEditParcelCheckFunctions.Add(delegateFunc); + } + + public void removeCheckEditParcel(CanEditParcel delegateFunc) + { + if (CanEditParcelCheckFunctions.Contains(delegateFunc)) + CanEditParcelCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanEditParcel(LLUUID user, ILandObject parcel) + public bool ExternalChecksCanEditParcel(LLUUID user, ILandObject parcel) + { + foreach (CanEditParcel check in CanEditParcelCheckFunctions) { - foreach (CanEditParcel check in CanEditParcelCheckFunctions) + if (check(user, parcel, m_scene) == false) { - if (check(user, parcel, m_scene) == false) - { - return false; - } + return false; } - return true; } - #endregion + return true; + } + #endregion - #region SELL PARCEL - public delegate bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene); - private List CanSellParcelCheckFunctions = new List(); + #region SELL PARCEL + public delegate bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene); + private List CanSellParcelCheckFunctions = new List(); - public void addCheckSellParcel(CanSellParcel delegateFunc) - { - if (!CanSellParcelCheckFunctions.Contains(delegateFunc)) - CanSellParcelCheckFunctions.Add(delegateFunc); - } - public void removeCheckSellParcel(CanSellParcel delegateFunc) - { - if (CanSellParcelCheckFunctions.Contains(delegateFunc)) - CanSellParcelCheckFunctions.Remove(delegateFunc); - } + public void addCheckSellParcel(CanSellParcel delegateFunc) + { + if (!CanSellParcelCheckFunctions.Contains(delegateFunc)) + CanSellParcelCheckFunctions.Add(delegateFunc); + } + + public void removeCheckSellParcel(CanSellParcel delegateFunc) + { + if (CanSellParcelCheckFunctions.Contains(delegateFunc)) + CanSellParcelCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanSellParcel(LLUUID user, ILandObject parcel) + public bool ExternalChecksCanSellParcel(LLUUID user, ILandObject parcel) + { + foreach (CanSellParcel check in CanSellParcelCheckFunctions) { - foreach (CanSellParcel check in CanSellParcelCheckFunctions) + if (check(user, parcel, m_scene) == false) { - if (check(user, parcel, m_scene) == false) - { - return false; - } + return false; } - return true; } - #endregion + return true; + } + #endregion - #region ABANDON PARCEL - public delegate bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene); - private List CanAbandonParcelCheckFunctions = new List(); + #region ABANDON PARCEL + public delegate bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene); + private List CanAbandonParcelCheckFunctions = new List(); - public void addCheckAbandonParcel(CanAbandonParcel delegateFunc) - { - if (!CanAbandonParcelCheckFunctions.Contains(delegateFunc)) - CanAbandonParcelCheckFunctions.Add(delegateFunc); - } - public void removeCheckAbandonParcel(CanAbandonParcel delegateFunc) - { - if (CanAbandonParcelCheckFunctions.Contains(delegateFunc)) - CanAbandonParcelCheckFunctions.Remove(delegateFunc); - } + public void addCheckAbandonParcel(CanAbandonParcel delegateFunc) + { + if (!CanAbandonParcelCheckFunctions.Contains(delegateFunc)) + CanAbandonParcelCheckFunctions.Add(delegateFunc); + } + + public void removeCheckAbandonParcel(CanAbandonParcel delegateFunc) + { + if (CanAbandonParcelCheckFunctions.Contains(delegateFunc)) + CanAbandonParcelCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanAbandonParcel(LLUUID user, ILandObject parcel) + public bool ExternalChecksCanAbandonParcel(LLUUID user, ILandObject parcel) + { + foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions) { - foreach (CanAbandonParcel check in CanAbandonParcelCheckFunctions) + if (check(user, parcel, m_scene) == false) { - if (check(user, parcel, m_scene) == false) - { - return false; - } + return false; } - return true; } - #endregion + return true; + } + #endregion - public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene); - private List CanReclaimParcelCheckFunctions = new List(); + public delegate bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene); + private List CanReclaimParcelCheckFunctions = new List(); - public void addCheckReclaimParcel(CanReclaimParcel delegateFunc) - { - if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc)) - CanReclaimParcelCheckFunctions.Add(delegateFunc); - } - public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc) - { - if (CanReclaimParcelCheckFunctions.Contains(delegateFunc)) - CanReclaimParcelCheckFunctions.Remove(delegateFunc); - } + public void addCheckReclaimParcel(CanReclaimParcel delegateFunc) + { + if (!CanReclaimParcelCheckFunctions.Contains(delegateFunc)) + CanReclaimParcelCheckFunctions.Add(delegateFunc); + } + + public void removeCheckReclaimParcel(CanReclaimParcel delegateFunc) + { + if (CanReclaimParcelCheckFunctions.Contains(delegateFunc)) + CanReclaimParcelCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel) + public bool ExternalChecksCanReclaimParcel(LLUUID user, ILandObject parcel) + { + foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions) { - foreach (CanReclaimParcel check in CanReclaimParcelCheckFunctions) + if (check(user, parcel, m_scene) == false) { - if (check(user, parcel, m_scene) == false) - { - return false; - } + return false; } - return true; } - public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); - private List CanBuyLandCheckFunctions = new List(); + return true; + } + public delegate bool CanBuyLand(LLUUID user, ILandObject parcel, Scene scene); + private List CanBuyLandCheckFunctions = new List(); - public void addCheckCanBuyLand(CanBuyLand delegateFunc) - { - if (!CanBuyLandCheckFunctions.Contains(delegateFunc)) - CanBuyLandCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanBuyLand(CanBuyLand delegateFunc) - { - if (CanBuyLandCheckFunctions.Contains(delegateFunc)) - CanBuyLandCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanBuyLand(CanBuyLand delegateFunc) + { + if (!CanBuyLandCheckFunctions.Contains(delegateFunc)) + CanBuyLandCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanBuyLand(CanBuyLand delegateFunc) + { + if (CanBuyLandCheckFunctions.Contains(delegateFunc)) + CanBuyLandCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanBuyLand(LLUUID user, ILandObject parcel) + public bool ExternalChecksCanBuyLand(LLUUID user, ILandObject parcel) + { + foreach (CanBuyLand check in CanBuyLandCheckFunctions) { - foreach (CanBuyLand check in CanBuyLandCheckFunctions) + if (check(user, parcel, m_scene) == false) { - if (check(user, parcel, m_scene) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanLinkObject(LLUUID user, LLUUID objectID); - private List CanLinkObjectCheckFunctions = new List(); + public delegate bool CanLinkObject(LLUUID user, LLUUID objectID); + private List CanLinkObjectCheckFunctions = new List(); - public void addCheckCanLinkObject(CanLinkObject delegateFunc) - { - if (!CanLinkObjectCheckFunctions.Contains(delegateFunc)) - CanLinkObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanLinkObject(CanLinkObject delegateFunc) - { - if (CanLinkObjectCheckFunctions.Contains(delegateFunc)) - CanLinkObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanLinkObject(CanLinkObject delegateFunc) + { + if (!CanLinkObjectCheckFunctions.Contains(delegateFunc)) + CanLinkObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanLinkObject(CanLinkObject delegateFunc) + { + if (CanLinkObjectCheckFunctions.Contains(delegateFunc)) + CanLinkObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanLinkObject(LLUUID user, LLUUID objectID) + public bool ExternalChecksCanLinkObject(LLUUID user, LLUUID objectID) { foreach (CanLinkObject check in CanLinkObjectCheckFunctions) { @@ -977,137 +1010,141 @@ namespace OpenSim.Region.Environment.Scenes return true; } - public delegate bool CanDelinkObject(LLUUID user, LLUUID objectID); - private List CanDelinkObjectCheckFunctions = new List(); + public delegate bool CanDelinkObject(LLUUID user, LLUUID objectID); + private List CanDelinkObjectCheckFunctions = new List(); - public void addCheckCanDelinkObject(CanDelinkObject delegateFunc) - { - if (!CanDelinkObjectCheckFunctions.Contains(delegateFunc)) - CanDelinkObjectCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanDelinkObject(CanDelinkObject delegateFunc) - { - if (CanDelinkObjectCheckFunctions.Contains(delegateFunc)) - CanDelinkObjectCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanDelinkObject(CanDelinkObject delegateFunc) + { + if (!CanDelinkObjectCheckFunctions.Contains(delegateFunc)) + CanDelinkObjectCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanDelinkObject(CanDelinkObject delegateFunc) + { + if (CanDelinkObjectCheckFunctions.Contains(delegateFunc)) + CanDelinkObjectCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanDelinkObject(LLUUID user, LLUUID objectID) + public bool ExternalChecksCanDelinkObject(LLUUID user, LLUUID objectID) + { + foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions) { - foreach (CanDelinkObject check in CanDelinkObjectCheckFunctions) + if (check(user, objectID) == false) { - if (check(user, objectID) == false) - { - return false; - } + return false; } - return true; } + return true; + } #endregion - public delegate bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID); - private List CanCreateInventoryCheckFunctions = new List(); + public delegate bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID); + private List CanCreateInventoryCheckFunctions = new List(); - public void addCheckCanCreateInventory(CanCreateInventory delegateFunc) - { - if (!CanCreateInventoryCheckFunctions.Contains(delegateFunc)) - CanCreateInventoryCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanCreateInventory(CanCreateInventory delegateFunc) - { - if (CanCreateInventoryCheckFunctions.Contains(delegateFunc)) - CanCreateInventoryCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanCreateInventory(CanCreateInventory delegateFunc) + { + if (!CanCreateInventoryCheckFunctions.Contains(delegateFunc)) + CanCreateInventoryCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanCreateInventory(CanCreateInventory delegateFunc) + { + if (CanCreateInventoryCheckFunctions.Contains(delegateFunc)) + CanCreateInventoryCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) + public bool ExternalChecksCanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) + { + foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions) { - foreach (CanCreateInventory check in CanCreateInventoryCheckFunctions) + if (check(invType, objectID, userID) == false) { - if (check(invType, objectID, userID) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); - private List CanCopyInventoryCheckFunctions = new List(); + public delegate bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); + private List CanCopyInventoryCheckFunctions = new List(); - public void addCheckCanCopyInventory(CanCopyInventory delegateFunc) - { - if (!CanCopyInventoryCheckFunctions.Contains(delegateFunc)) - CanCopyInventoryCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanCopyInventory(CanCopyInventory delegateFunc) - { - if (CanCopyInventoryCheckFunctions.Contains(delegateFunc)) - CanCopyInventoryCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanCopyInventory(CanCopyInventory delegateFunc) + { + if (!CanCopyInventoryCheckFunctions.Contains(delegateFunc)) + CanCopyInventoryCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanCopyInventory(CanCopyInventory delegateFunc) + { + if (CanCopyInventoryCheckFunctions.Contains(delegateFunc)) + CanCopyInventoryCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + public bool ExternalChecksCanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + { + foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions) { - foreach (CanCopyInventory check in CanCopyInventoryCheckFunctions) + if (check(itemID, objectID, userID) == false) { - if (check(itemID, objectID, userID) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); - private List CanDeleteInventoryCheckFunctions = new List(); + public delegate bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID); + private List CanDeleteInventoryCheckFunctions = new List(); - public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc) - { - if (!CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) - CanDeleteInventoryCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanDeleteInventory(CanDeleteInventory delegateFunc) - { - if (CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) - CanDeleteInventoryCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanDeleteInventory(CanDeleteInventory delegateFunc) + { + if (!CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) + CanDeleteInventoryCheckFunctions.Add(delegateFunc); + } - public bool ExternalChecksCanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + public void removeCheckCanDeleteInventory(CanDeleteInventory delegateFunc) + { + if (CanDeleteInventoryCheckFunctions.Contains(delegateFunc)) + CanDeleteInventoryCheckFunctions.Remove(delegateFunc); + } + + public bool ExternalChecksCanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) + { + foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions) { - foreach (CanDeleteInventory check in CanDeleteInventoryCheckFunctions) + if (check(itemID, objectID, userID) == false) { - if (check(itemID, objectID, userID) == false) - { - return false; - } + return false; } - return true; } + return true; + } - public delegate bool CanTeleport(LLUUID userID); - private List CanTeleportCheckFunctions = new List(); + public delegate bool CanTeleport(LLUUID userID); + private List CanTeleportCheckFunctions = new List(); - public void addCheckCanTeleport(CanTeleport delegateFunc) - { - if (!CanTeleportCheckFunctions.Contains(delegateFunc)) - CanTeleportCheckFunctions.Add(delegateFunc); - } - public void removeCheckCanTeleport(CanTeleport delegateFunc) - { - if (CanTeleportCheckFunctions.Contains(delegateFunc)) - CanTeleportCheckFunctions.Remove(delegateFunc); - } + public void addCheckCanTeleport(CanTeleport delegateFunc) + { + if (!CanTeleportCheckFunctions.Contains(delegateFunc)) + CanTeleportCheckFunctions.Add(delegateFunc); + } + + public void removeCheckCanTeleport(CanTeleport delegateFunc) + { + if (CanTeleportCheckFunctions.Contains(delegateFunc)) + CanTeleportCheckFunctions.Remove(delegateFunc); + } - public bool ExternalChecksCanTeleport(LLUUID userID) + public bool ExternalChecksCanTeleport(LLUUID userID) + { + foreach (CanTeleport check in CanTeleportCheckFunctions) { - foreach (CanTeleport check in CanTeleportCheckFunctions) + if (check(userID) == false) { - if (check(userID) == false) - { - return false; - } + return false; } - return true; } + return true; + } } } - diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index cc4891f..032d673 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs @@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Scenes private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// - /// Force all task inventories of prims in the scene object to persist + /// Force all task inventories of prims in the scene object to persist /// public void ForceInventoryPersistence() { @@ -49,9 +49,9 @@ namespace OpenSim.Region.Environment.Scenes { part.ForceInventoryPersistence(); } - } + } } - + /// /// Start the scripts contained in all the prims in this group. /// @@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Scenes // taskItem.SalePrice = item.SalePrice; // taskItem.SaleType = item.SaleType; taskItem.CreationDate = (uint)item.CreationDate; - + part.AddInventoryItem(taskItem); return true; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 2a1b8c5..9c3d6a7 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Scenes /// since the group's last persistent backup /// public bool HasGroupChanged = false; - + public float scriptScore = 0f; private LLVector3 lastPhysGroupPos; @@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes private bool m_scriptListens_notAtTarget = false; #region Properties - + /// /// The name of an object grouping is always the same as its root part /// @@ -123,7 +123,7 @@ namespace OpenSim.Region.Environment.Scenes { get { return RootPart.Name; } set { RootPart.Name = value; } - } + } /// /// Added because the Parcel code seems to use it @@ -445,13 +445,13 @@ namespace OpenSim.Region.Environment.Scenes } more = !reader.EOF; } - + reader.Close(); sr.Close(); UpdateParentIDs(); } - + /// /// /// @@ -468,14 +468,14 @@ namespace OpenSim.Region.Environment.Scenes newPart.LinkNum = 0; m_parts.Add(newPart.UUID, newPart); SetPartAsRoot(newPart); - + // one of these is a proxy. if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem) AttachToBackup(); //ApplyPhysics(scene.m_physicalPrim); } - + /// /// /// @@ -754,7 +754,7 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.ScheduleFullUpdate(); m_rootPart.ClearUndoState(); } - + public void DetachToInventoryPrep() { ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.AttachedAvatar); @@ -873,11 +873,11 @@ namespace OpenSim.Region.Environment.Scenes return m_scene.MaxUndoCount; return 5; } - - // justincc: I don't believe this hack is needed any longer, especially since the physics + + // justincc: I don't believe this hack is needed any longer, especially since the physics // parts of set AbsolutePosition were already commented out. By changing HasGroupChanged to false // this method was preventing proper reload of scene objects. - // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects + // dahlia: I had to uncomment it, without it meshing was failing on some prims and objects // at region startup public void ResetChildPrimPhysicsPositions() { @@ -926,20 +926,20 @@ namespace OpenSim.Region.Environment.Scenes /// public void DeleteGroup() { - // We need to keep track of this state in case this group is still queued for backup. + // We need to keep track of this state in case this group is still queued for backup. // FIXME: This is a poor temporary solution, since it still leaves plenty of scope for race // conditions where a user deletes an entity while it is being stored. Really, the update - // code needs a redesign. + // code needs a redesign. m_isDeleted = true; - - DetachFromBackup(this); + + DetachFromBackup(this); lock (m_parts) { foreach (SceneObjectPart part in m_parts.Values) { part.RemoveScriptInstances(); - + List avatars = Scene.GetScenePresences(); for (int i = 0; i < avatars.Count; i++) { @@ -951,12 +951,12 @@ namespace OpenSim.Region.Environment.Scenes avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); } } - + m_rootPart = null; - m_parts.Clear(); + m_parts.Clear(); } } - + public void FakeDeleteGroup() { foreach (SceneObjectPart part in m_parts.Values) @@ -1034,7 +1034,7 @@ namespace OpenSim.Region.Environment.Scenes lock (m_targets) m_targets.Clear(); } - + ScheduleGroupForFullUpdate(); } @@ -1067,7 +1067,7 @@ namespace OpenSim.Region.Environment.Scenes { part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); } - + // Hack to get the physics scene geometries in the right spot ResetChildPrimPhysicsPositions(); } @@ -1102,14 +1102,14 @@ namespace OpenSim.Region.Environment.Scenes /// /// public void ProcessBackup(IRegionDataStore datastore) - { + { if (HasGroupChanged) { // don't backup while it's selected or you're asking for changes mid stream. if ((!IsSelected) && (RootPart != null)) { m_log.InfoFormat( - "[SCENE]: Storing object {0}, {1} in {2}", + "[SCENE]: Storing object {0}, {1} in {2}", Name, UUID, m_scene.RegionInfo.RegionName); SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); @@ -1236,7 +1236,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); } - + // Now we've made a copy that replaces this one, we need to // switch the owner to the person who did the copying // Second Life copies an object and duplicates the first one in it's place @@ -1267,7 +1267,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.UpdateParentIDs(); dupe.HasGroupChanged = true; dupe.AttachToBackup(); - + ScheduleGroupForFullUpdate(); } @@ -1673,7 +1673,7 @@ namespace OpenSim.Region.Environment.Scenes { return true; } - + return false; } @@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + return false; } @@ -2042,7 +2042,7 @@ namespace OpenSim.Region.Environment.Scenes public void UpdatePrimFlags(uint localID, ushort type, bool inUse, byte[] data) { SceneObjectPart selectionPart = GetChildPart(localID); - + if (selectionPart != null) { lock (m_parts) @@ -2164,7 +2164,7 @@ namespace OpenSim.Region.Environment.Scenes m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); } //if (part.UUID != m_rootPart.UUID) - + HasGroupChanged = true; ScheduleGroupForFullUpdate(); @@ -2332,10 +2332,10 @@ namespace OpenSim.Region.Environment.Scenes } AbsolutePosition = pos; - + HasGroupChanged = true; } - + //we need to do a terse update even if the move wasn't allowed // so that the position is reset in the client (the object snaps back) ScheduleGroupForTerseUpdate(); @@ -2349,7 +2349,7 @@ namespace OpenSim.Region.Environment.Scenes public void UpdateSinglePosition(LLVector3 pos, uint localID) { SceneObjectPart part = GetChildPart(localID); - + if (part != null) { if (part.UUID == m_rootPart.UUID) @@ -2360,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes { part.UpdateOffSet(pos); } - + HasGroupChanged = true; } } @@ -2398,7 +2398,7 @@ namespace OpenSim.Region.Environment.Scenes } AbsolutePosition = newPos; - + HasGroupChanged = true; ScheduleGroupForTerseUpdate(); } @@ -2426,7 +2426,7 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.RotationOffset.Z); m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); } - + HasGroupChanged = true; ScheduleGroupForTerseUpdate(); } @@ -2447,7 +2447,7 @@ namespace OpenSim.Region.Environment.Scenes m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); } AbsolutePosition = pos; - + HasGroupChanged = true; ScheduleGroupForTerseUpdate(); } @@ -2684,7 +2684,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + /// /// Set the user group to which this scene object belongs. /// @@ -2698,10 +2698,10 @@ namespace OpenSim.Region.Environment.Scenes { part.SetGroup(GroupID, client); } - + HasGroupChanged = true; } - + ScheduleGroupForFullUpdate(); } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index 480c030..0ac20e2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Scenes private string m_inventoryFileName = String.Empty; private int m_inventoryFileNameSerial = 0; - + /// /// Serial count for inventory file , used to tell if inventory has changed /// no need for this to be part of Database backup @@ -53,13 +53,13 @@ namespace OpenSim.Region.Environment.Scenes /// /// Holds in memory prim inventory /// - protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); + protected TaskInventoryDictionary m_taskInventory = new TaskInventoryDictionary(); /// /// Tracks whether inventory has changed since the last persistent backup /// protected bool HasInventoryChanged; - + /// /// Force the task inventory of this prim to persist at the next update sweep /// @@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Scenes { if (i.InvType == (int)InventoryType.LSL) RemoveScriptInstance(i.ItemID); - + RemoveInventoryItem(i.ItemID); break; } @@ -316,7 +316,7 @@ namespace OpenSim.Region.Environment.Scenes AddInventoryItem(item.Name, item); } - + /// /// Add an item to this prim's inventory. /// @@ -329,7 +329,7 @@ namespace OpenSim.Region.Environment.Scenes { item.ParentID = UUID; item.ParentPartID = UUID; - + lock (m_taskInventory) { m_taskInventory.Add(item.ItemID, item); @@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Scenes m_inventorySerial++; //m_inventorySerial += 2; HasInventoryChanged = true; - ParentGroup.HasGroupChanged = true; + ParentGroup.HasGroupChanged = true; } /// @@ -369,10 +369,10 @@ namespace OpenSim.Region.Environment.Scenes /// /// null if the item does not exist public TaskInventoryItem GetInventoryItem(LLUUID itemId) - { + { TaskInventoryItem item; m_taskInventory.TryGetValue(itemId, out item); - + return item; } @@ -450,12 +450,12 @@ namespace OpenSim.Region.Environment.Scenes } } - + if (scriptcount <= 0) { RemFlag(LLObject.ObjectFlags.Scripted); } - + ScheduleFullUpdate(); return type; @@ -603,7 +603,7 @@ namespace OpenSim.Region.Environment.Scenes public void ProcessInventoryBackup(IRegionDataStore datastore) { if (HasInventoryChanged) - { + { lock (TaskInventory) { datastore.StorePrimInventory(UUID, TaskInventory.Values); diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 1432912..517114f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Scenes public uint AttachmentPoint = (byte)0; [XmlIgnore] public PhysicsVector RotationAxis = new PhysicsVector(1f,1f,1f); - + [XmlIgnore] public bool Undoing = false; @@ -196,11 +196,11 @@ namespace OpenSim.Region.Environment.Scenes protected LLVector3 m_velocity; // TODO: Those have to be changed into persistent properties at some later point, - // or sit-camera on vehicles will break on sim-crossing. + // or sit-camera on vehicles will break on sim-crossing. private LLVector3 m_cameraEyeOffset = new LLVector3(0.0f, 0.0f, 0.0f); private LLVector3 m_cameraAtOffset = new LLVector3(0.0f, 0.0f, 0.0f); private bool m_forceMouselook = false; - + #endregion Fields #region Constructors @@ -352,13 +352,13 @@ namespace OpenSim.Region.Environment.Scenes private uint _everyoneMask = (uint)PermissionMask.None; private uint _nextOwnerMask = (uint)PermissionMask.All; private LLObject.ObjectFlags _flags = LLObject.ObjectFlags.None; - + public LLUUID CreatorID { - get + get { return _creatorID; } - set + set { _creatorID = value; } @@ -390,26 +390,26 @@ namespace OpenSim.Region.Environment.Scenes { get { return (uint)_flags; } set { _flags = (LLObject.ObjectFlags)value; } - } - + } + public LLUUID UUID { get { return m_uuid; } set { m_uuid = value; } } - + public uint LocalId { get { return m_localId; } set { m_localId = value; } } - + public virtual string Name { get { return m_name; } set { m_name = value; } } - + public byte Material { get { return (byte) m_material; } @@ -607,13 +607,13 @@ namespace OpenSim.Region.Environment.Scenes /// public LLVector3 AngularVelocity { - get - { + get + { if ((PhysActor != null) && PhysActor.IsPhysical) { m_angularVelocity.FromBytes(PhysActor.RotationalVelocity.GetBytes(), 0); } - return m_angularVelocity; + return m_angularVelocity; } set { m_angularVelocity = value; } } @@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Scenes get { return m_description; } set { m_description = value; } } - + public Color Color { get { return m_color; } @@ -702,7 +702,7 @@ namespace OpenSim.Region.Environment.Scenes // set of attributes on shape change. For instance, // changing the lighting on a shape shouldn't cause // this. - if (m_shape != null) + if (m_shape != null) shape_changed = true; m_shape = value; @@ -740,7 +740,7 @@ namespace OpenSim.Region.Environment.Scenes } #endregion - + //--------------- @@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Scenes get { return m_parentGroup; } } - + public scriptEvents ScriptEvents { @@ -802,8 +802,8 @@ namespace OpenSim.Region.Environment.Scenes public LLQuaternion SitTargetOrientationLL { - get - { + get + { return new LLQuaternion( m_sitTargetOrientation.x, m_sitTargetOrientation.y, @@ -830,97 +830,97 @@ namespace OpenSim.Region.Environment.Scenes } } - public uint ParentID + public uint ParentID { get { return _parentID; } set { _parentID = value; } } - public int CreationDate + public int CreationDate { get { return _creationDate; } set { _creationDate = value; } } - public uint Category + public uint Category { get { return _category; } set { _category = value; } } - public int SalePrice + public int SalePrice { get { return _salePrice; } set { _salePrice = value; } } - public byte ObjectSaleType + public byte ObjectSaleType { get { return _objectSaleType; } set { _objectSaleType = value; } } - public int OwnershipCost + public int OwnershipCost { get { return _ownershipCost; } set { _ownershipCost = value; } } - public LLUUID GroupID + public LLUUID GroupID { get { return _groupID; } set { _groupID = value; } } - public LLUUID OwnerID + public LLUUID OwnerID { get { return _ownerID; } set { _ownerID = value; } } - public LLUUID LastOwnerID + public LLUUID LastOwnerID { get { return _lastOwnerID; } set { _lastOwnerID = value; } } - public uint BaseMask + public uint BaseMask { get { return _baseMask; } set { _baseMask = value; } } - public uint OwnerMask + public uint OwnerMask { get { return _ownerMask; } set { _ownerMask = value; } } - public uint GroupMask + public uint GroupMask { get { return _groupMask; } set { _groupMask = value; } } - public uint EveryoneMask + public uint EveryoneMask { get { return _everyoneMask; } set { _everyoneMask = value; } } - public uint NextOwnerMask + public uint NextOwnerMask { get { return _nextOwnerMask; } set { _nextOwnerMask = value; } } - public libsecondlife.LLObject.ObjectFlags Flags + public libsecondlife.LLObject.ObjectFlags Flags { get { return _flags; } set { _flags = value; } } - public LLUUID SitTargetAvatar + public LLUUID SitTargetAvatar { get { return m_sitTargetAvatar; } set { m_sitTargetAvatar = value; } @@ -929,8 +929,8 @@ namespace OpenSim.Region.Environment.Scenes [XmlIgnore] public virtual LLUUID RegionID { - get - { + get + { if (ParentGroup != null && ParentGroup.Scene != null) return ParentGroup.Scene.RegionInfo.RegionID; else @@ -943,9 +943,9 @@ namespace OpenSim.Region.Environment.Scenes [XmlIgnore] public LLUUID ParentUUID { - get + get { - if (ParentGroup != null) + if (ParentGroup != null) { _parentUUID = ParentGroup.UUID; } @@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes } set { _parentUUID = value; } } - + #endregion Public Properties with only Get #region Private Methods @@ -2460,7 +2460,7 @@ namespace OpenSim.Region.Environment.Scenes return; } } - + if (m_parentGroup.GetSceneMaxUndo() > 0) @@ -2914,7 +2914,7 @@ namespace OpenSim.Region.Environment.Scenes ScaleOffset = Math.Abs(ScaleOffset); Vector3 offset = returnresult.normal * ScaleOffset; returnresult.ipoint = AXpos + offset; - + ///pos = (intersectionpoint + offset); } else @@ -3354,27 +3354,27 @@ namespace OpenSim.Region.Environment.Scenes public void SetCameraAtOffset(LLVector3 v) { m_cameraAtOffset = v; } - + public void SetCameraEyeOffset(LLVector3 v) { m_cameraEyeOffset = v; } - + public void SetForceMouselook(bool force) { m_forceMouselook = force; } - + public LLVector3 GetCameraAtOffset() { return m_cameraAtOffset; } - + public LLVector3 GetCameraEyeOffset() { return m_cameraEyeOffset; } - + public bool GetForceMouselook() { return m_forceMouselook; } - + #endregion Public Methods } } diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index cad2496..5669af6 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1198,7 +1198,7 @@ namespace OpenSim.Region.Environment.Scenes RemoveFromPhysicalScene(); } } - + cameraAtOffset = part.GetCameraAtOffset(); cameraEyeOffset = part.GetCameraEyeOffset(); forceMouselook = part.GetForceMouselook(); @@ -1347,7 +1347,7 @@ namespace OpenSim.Region.Environment.Scenes RemoveAnimation(animID); } - + public LLUUID[] GetAnimationArray() { LLUUID[] animIDs; @@ -1696,7 +1696,7 @@ namespace OpenSim.Region.Environment.Scenes /// - /// Do everything required once a client completes its movement into a region + /// Do everything required once a client completes its movement into a region /// public void SendInitialData() { @@ -1898,7 +1898,7 @@ namespace OpenSim.Region.Environment.Scenes { if (IsChildAgent) return; - + LLVector3 pos2 = AbsolutePosition; LLVector3 vel = Velocity; @@ -1968,9 +1968,9 @@ namespace OpenSim.Region.Environment.Scenes // This means we need to remove the current caps handler here and possibly compensate later, // in case both scenes are being hosted on the same region server. Messy m_scene.RemoveCapsHandler(UUID); - newpos = newpos + (vel); + newpos = newpos + (vel); - CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); + CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(UUID); if (userInfo != null) { userInfo.DropInventory(); @@ -1978,11 +1978,11 @@ namespace OpenSim.Region.Environment.Scenes else { m_log.WarnFormat("[SCENE PRESENCE]: No cached user info found for {0} {1} on leaving region", Name, UUID); - } - + } + bool crossingSuccessful = m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, - m_physicsActor.Flying); + m_physicsActor.Flying); if (crossingSuccessful) { AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); @@ -1998,8 +1998,8 @@ namespace OpenSim.Region.Environment.Scenes m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, capsPath); MakeChildAgent(); - CrossAttachmentsIntoNewRegion(neighbourHandle); - + CrossAttachmentsIntoNewRegion(neighbourHandle); + m_scene.SendKillObject(m_localId); m_scene.NotifyMyCoarseLocationChange(); // the user may change thier profile information in other region, @@ -2010,7 +2010,7 @@ namespace OpenSim.Region.Environment.Scenes else { // Restore the user structures that we needed to delete before asking the receiving region to complete the crossing - m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); + m_scene.CommsManager.UserProfileCacheService.RequestInventoryForUser(UUID); m_scene.AddCapsHandler(UUID); } } @@ -2825,7 +2825,7 @@ namespace OpenSim.Region.Environment.Scenes } } } - + LastCommands = allflags; } diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index f46aba4..0e551cb 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs @@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Scenes m_report.Interval = statsUpdatesEveryMS; m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); m_report.Enabled = true; - + if (StatsManager.SimExtraStats != null) OnSendStatsResult += StatsManager.SimExtraStats.ReceiveClassicSimStatsPacket; } diff --git a/OpenSim/Region/Environment/Scenes/UndoState.cs b/OpenSim/Region/Environment/Scenes/UndoState.cs index 5d1f6a0..fdbfa8c 100644 --- a/OpenSim/Region/Environment/Scenes/UndoState.cs +++ b/OpenSim/Region/Environment/Scenes/UndoState.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes Rotation = rot; Scale = scale; } - + public UndoState(SceneObjectPart part) { if (part != null) @@ -50,7 +50,7 @@ namespace OpenSim.Region.Environment.Scenes { Position = part.AbsolutePosition; Rotation = part.RotationOffset; - + } else { @@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Scenes if (part != null) { part.Undoing = true; - + if (part.ParentID == 0) { part.ParentGroup.AbsolutePosition = Position; @@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes part.ScheduleTerseUpdate(); } part.Undoing = false; - + } } -- cgit v1.1