Massive tab and trailing space cleanup

This commit is contained in:
Melanie Thielker
2017-01-05 19:07:37 +00:00
parent e88e2945e9
commit b16abc8166
959 changed files with 23646 additions and 23646 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// A value of 0 will apply no pause. The pause is specified in milliseconds.
/// </remarks>
public int ThrottlePer100PrimsRezzed { get; set; }
private Scene m_scene;
private IInventoryAccessModule m_invAccessModule;
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// Are attachments enabled?
/// </summary>
public bool Enabled { get; private set; }
public string Name { get { return "Attachments Module"; } }
public Type ReplaceableInterface { get { return null; } }
@@ -87,14 +87,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
Enabled = true;
}
}
public void AddRegion(Scene scene)
{
m_scene = scene;
if (Enabled)
{
// Only register module with scene if it is enabled. All callers check for a null attachments module.
// Ideally, there should be a null attachments module for when this core attachments module has been
// Ideally, there should be a null attachments module for when this core attachments module has been
// disabled. Registering only when enabled allows for other attachments module implementations.
m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
@@ -181,7 +181,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
private void HandleScriptStateChange(uint localID, bool started)
{
SceneObjectGroup sog = m_scene.GetGroupByPrim(localID);
if (sog != null && sog.IsAttachment)
if (sog != null && sog.IsAttachment)
{
if (!started)
{
@@ -198,21 +198,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
}
}
public void RemoveRegion(Scene scene)
public void RemoveRegion(Scene scene)
{
m_scene.UnregisterModuleInterface<IAttachmentsModule>(this);
if (Enabled)
m_scene.EventManager.OnNewClient -= SubscribeToClientEvents;
}
public void RegionLoaded(Scene scene)
{
m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>();
}
public void Close()
public void Close()
{
RemoveRegion(m_scene);
}
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
((SceneObjectGroup)so).RootPart.ClearUpdateSchedule();
// m_log.DebugFormat(
// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}",
// "[ATTACHMENTS MODULE]: Copying script state with {0} bytes for object {1} for {2} in {3}",
// ad.AttachmentObjectStates[i].Length, so.Name, sp.Name, m_scene.Name);
so.SetState(ad.AttachmentObjectStates[i++], m_scene);
@@ -295,7 +295,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
if (DebugLevel > 0)
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments",
"[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments",
m_scene.Name, sp.Name);
return;
@@ -357,7 +357,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// For some reason assetIDs are being written as Zero's in the DB -- need to track tat down
// But they're not used anyway, the item is being looked up for now, so let's proceed.
//if (UUID.Zero == assetID)
//if (UUID.Zero == assetID)
//{
// m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID);
// continue;
@@ -434,7 +434,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
UpdateDetachedObject(sp, so, String.Empty);
sp.ClearAttachments();
}
}
}
}
public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent)
@@ -445,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (DebugLevel > 0)
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Deleting attachments from scene {0} for {1}, silent = {2}",
m_scene.RegionInfo.RegionName, sp.Name, silent);
m_scene.RegionInfo.RegionName, sp.Name, silent);
foreach (SceneObjectGroup sop in sp.GetAttachments())
{
@@ -454,7 +454,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
sp.ClearAttachments();
}
public bool AttachObject(IScenePresence sp, SceneObjectGroup group, uint attachmentPt, bool silent,
bool addToInventory, bool append)
{
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
// be removed when that functionality is implemented in opensim
attachmentPt &= 0x7f;
// If the attachment point isn't the same as the one previously used
// set it's offset position = 0 so that it appears on the attachment point
// and not in a weird location somewhere unknown.
@@ -583,7 +583,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (addToInventory && sp.PresenceType != PresenceType.Npc)
UpdateUserInventoryWithAttachment(sp, group, attachmentPt, append);
AttachToAgent(sp, group, attachmentPt, attachPos, silent);
if (resumeScripts)
@@ -616,11 +616,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt)
{
return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null);
}
{
return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null);
}
public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc)
public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc)
{
if (!Enabled)
return null;
@@ -631,8 +631,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
(AttachmentPoint)AttachmentPt, itemID, sp.Name, m_scene.Name);
// We check the attachments in the avatar appearance here rather than the objects attached to the
// ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are
// already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done
// ScenePresence itself so that we can ignore calls by viewer 2/3 to attach objects on startup. We are
// already doing this in ScenePresence.MakeRootAgent(). Simulator-side attaching needs to be done
// because pre-outfit folder viewers (most version 1 viewers) require it.
bool alreadyOn = false;
List<AvatarAttachment> existingAttachments = sp.Appearance.GetAttachments();
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (DebugLevel > 0)
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}",
"[ATTACHMENTS MODULE]: Rezzing {0} attachments from inventory for {1} in {2}",
rezlist.Count, sp.Name, m_scene.Name);
foreach (KeyValuePair<UUID, uint> rez in rezlist)
@@ -727,7 +727,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint;
sp.RemoveAttachment(so);
so.FromItemID = UUID.Zero;
@@ -744,7 +744,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
rootPart.RemFlag(PrimFlags.TemporaryOnRez);
so.ApplyPhysics();
rootPart.Rezzed = DateTime.Now;
@@ -804,7 +804,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (DebugLevel > 0)
m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}",
"[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}",
so.Name, so.LocalId, so.FromItemID, sp.Name, m_scene.Name);
// Scripts MUST be snapshotted before the object is
@@ -827,14 +827,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
UpdateDetachedObject(sp, so, scriptedState);
}
}
public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
{
if (!Enabled)
return;
sog.UpdateGroupPosition(pos);
sog.HasGroupChanged = true;
sog.HasGroupChanged = true;
}
#endregion
@@ -843,7 +843,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// This is public but is not part of the IAttachmentsModule interface.
// RegionCombiner module needs to poke at it to deliver client events.
// This breaks the encapsulation of the module and should get fixed somehow.
// This breaks the encapsulation of the module and should get fixed somehow.
public void SubscribeToClientEvents(IClientAPI client)
{
client.OnRezSingleAttachmentFromInv += Client_OnRezSingleAttachmentFromInv;
@@ -856,7 +856,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// This is public but is not part of the IAttachmentsModule interface.
// RegionCombiner module needs to poke at it to deliver client events.
// This breaks the encapsulation of the module and should get fixed somehow.
// This breaks the encapsulation of the module and should get fixed somehow.
public void UnsubscribeFromClientEvents(IClientAPI client)
{
client.OnRezSingleAttachmentFromInv -= Client_OnRezSingleAttachmentFromInv;
@@ -936,7 +936,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// Attach this scene object to the given avatar.
/// </summary>
/// <remarks>
/// This isn't publicly available since attachments should always perform the corresponding inventory
/// This isn't publicly available since attachments should always perform the corresponding inventory
/// operation (to show the attach in user inventory and update the asset with positional information).
/// </remarks>
/// <param name="sp"></param>
@@ -997,7 +997,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Fudge below is an extremely unhelpful comment. It's probably here so that the scheduled full update
// will succeed, as that will not update if an attachment is selected.
so.IsSelected = false; // fudge....
so.IsSelected = false; // fudge....
so.ScheduleGroupForFullUpdate();
}
@@ -1041,7 +1041,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// </summary>
/// <remarks>
/// This involves triggering the detach event and getting the script state (which also stops the script)
/// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a
/// This MUST be done outside sp.AttachmentsSyncLock, since otherwise there is a chance of deadlock if a
/// running script is performing attachment operations.
/// </remarks>
/// <returns>
@@ -1088,7 +1088,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Remove the object from the scene so no more updates
// are sent. Doing this before the below changes will ensure
// updates can't cause "HUD artefacts"
m_scene.DeleteSceneObject(so, false, false);
// Prepare sog for storage
@@ -1125,7 +1125,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
itemID, rezGroupID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
false, false, sp.UUID, true);
else
objatt = m_invAccessModule.RezObject(sp.ControllingClient,
objatt = m_invAccessModule.RezObject(sp.ControllingClient,
null, rezGroupID, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
false, false, sp.UUID, true);
@@ -1139,7 +1139,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
else if (itemID == UUID.Zero)
{
// We need to have a FromItemID for multiple attachments on a single attach point to appear. This is
// We need to have a FromItemID for multiple attachments on a single attach point to appear. This is
// true on Singularity 1.8.5 and quite possibly other viewers as well. As NPCs don't have an inventory
// we will satisfy this requirement by inserting a random UUID.
objatt.FromItemID = UUID.Random();
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
if (tainted)
objatt.HasGroupChanged = true;
objatt.HasGroupChanged = true;
if (ThrottlePer100PrimsRezzed > 0)
{