Formatting cleanup.

This commit is contained in:
Jeff Ames
2009-10-01 01:00:09 +09:00
parent 33515c75e4
commit ee205e7e81
223 changed files with 875 additions and 930 deletions

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
sbyte type, byte wearableType, uint nextOwnerMask);
void HandleTaskItemUpdateFromTransaction(
IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item);
IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item);
void RemoveAgentAssetTransactions(UUID userID);
}

View File

@@ -33,7 +33,7 @@ namespace OpenSim.Region.Framework.Interfaces
{
/// <value>
/// The name of this commander
/// </value>
/// </value>
string Name { get; }
/// <value>
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <summary>
/// The commands available for this commander
/// </summary>
Dictionary<string, ICommand> Commands { get; }
Dictionary<string, ICommand> Commands { get; }
void ProcessConsoleCommand(string function, string[] args);
void RegisterCommand(string commandName, ICommand command);

View File

@@ -37,15 +37,15 @@ namespace OpenSim.Region.Framework.Interfaces
/// small interval.
/// </summary>
/// <param name="client"></param>
/// <param name="message"></param>
void SendAlertToUser(IClientAPI client, string message);
/// <param name="message"></param>
void SendAlertToUser(IClientAPI client, string message);
/// <summary>
/// Send an alert message to a particular user.
/// </summary>
/// <param name="client"></param>
/// <param name="message"></param>
/// <param name="modal"></param>
/// <param name="modal"></param>
void SendAlertToUser(IClientAPI client, string message, bool modal);
/// <summary>
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="message"></param>
/// <param name="url"></param>
void SendUrlToUser(
UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
/// <summary>
/// Send a notification to all users in the scene. This notification should remain around until the
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
/// <param name="fromAvatarID">The user sending the message</param>
/// <param name="fromAvatarName">The name of the user doing the sending</param>
/// <param name="message">The message being sent to the user</param>
/// <param name="message">The message being sent to the user</param>
void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message);
/// <summary>

View File

@@ -29,13 +29,13 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Framework.Interfaces
namespace OpenSim.Region.Framework.Interfaces
{
/// <summary>
/// Interface to a class that is capable of creating entities
/// </summary>
/// </summary>
public interface IEntityCreator
{
{
/// <summary>
/// The entities that this class is capable of creating. These match the PCode format.
/// </summary>
@@ -51,6 +51,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="rot"></param>
/// <param name="shape"></param>
/// <returns>The entity created, or null if the creation failed</returns>
SceneObjectGroup CreateEntity(UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape);
SceneObjectGroup CreateEntity(UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape);
}
}

View File

@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <summary>
/// Change every item in this inventory to a new group.
/// </summary>
/// <param name="groupID"></param>
/// <param name="groupID"></param>
void ChangeInventoryGroup(UUID groupID);
/// <summary>
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="startParam"></param>
/// <param name="postOnRez"></param>
/// <param name="engine"></param>
/// <param name="stateSource"></param>
/// <param name="stateSource"></param>
void CreateScriptInstance(UUID itemId, int startParam, bool postOnRez, string engine, int stateSource);
/// <summary>
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <summary>
/// Return the name with which a client can request a xfer of this prim's inventory metadata
/// </summary>
/// </summary>
string GetInventoryFileName();
bool GetInventoryFileName(IClientAPI client, uint localID);

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Region.Framework.Interfaces
{
{
public interface IFriendsModule
{
/// <summary>
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// FIXME: This is somewhat too tightly coupled - it should arguably be possible to offer friendships even if the
/// receiving user is not currently online.
/// </param>
/// <param name="offerMessage"></param>
void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage);
/// <param name="offerMessage"></param>
void OfferFriendship(UUID fromUserId, IClientAPI toUserClient, string offerMessage);
}
}

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Region.Framework.Interfaces
{
{
/// <summary>
/// This interface provides god related methods
/// </summary>
@@ -53,6 +53,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="agentID">the person that is being kicked</param>
/// <param name="kickflags">This isn't used apparently</param>
/// <param name="reason">The message to send to the user after it's been turned into a field</param>
void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason);
void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason);
}
}

View File

@@ -30,7 +30,7 @@ using System.IO;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Region.Framework.Interfaces
{
{
/// <summary>
/// Used for the OnInventoryArchiveSaved event.
/// </summary>
@@ -43,11 +43,11 @@ namespace OpenSim.Region.Framework.Interfaces
public delegate void InventoryArchiveSaved(
Guid id, bool succeeded, CachedUserInfo userInfo, string invPath, Stream saveStream, Exception reportedException);
public interface IInventoryArchiverModule
public interface IInventoryArchiverModule
{
/// <summary>
/// Fired when an archive inventory save has been completed.
/// </summary>
/// </summary>
event InventoryArchiveSaved OnInventoryArchiveSaved;
/// <summary>
@@ -69,6 +69,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="invPath">The inventory path from which the inventory should be saved.</param>
/// <param name="saveStream">The stream to which the inventory archive will be saved</param>
/// <returns>true if the first stage of the operation succeeded, false otherwise</returns>
bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream);
bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream);
}
}

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// </summary>
/// <param name="x">Value between 0 - 256 on the x axis of the point</param>
/// <param name="y">Value between 0 - 256 on the y axis of the point</param>
/// <returns>Land object at the point supplied</returns>
/// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(int x, int y);
ILandObject GetLandObject(int localID);
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// </summary>
/// <param name="x">Value between 0 - 256 on the x axis of the point</param>
/// <param name="y">Value between 0 - 256 on the y axis of the point</param>
/// <returns>Land object at the point supplied</returns>
/// <returns>Land object at the point supplied</returns>
ILandObject GetLandObject(float x, float y);
bool IsLandPrimCountTainted();

View File

@@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
/// <param name="savePath"></param>
/// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
void ArchiveRegion(string savePath, Guid requestId);
void ArchiveRegion(string savePath, Guid requestId);
/// <summary>
/// Archive the region to a stream.
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// settings in the archive will be ignored.
/// </param>
/// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
void DearchiveRegion(string loadPath, bool merge, Guid requestId);
void DearchiveRegion(string loadPath, bool merge, Guid requestId);
/// <summary>
/// Dearchive a region from a stream. This replaces the existing scene.
@@ -109,8 +109,8 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="merge">
/// If true, the loaded region merges with the existing one rather than replacing it. Any terrain or region
/// settings in the archive will be ignored.
/// </param>
/// </param>
/// <param name="requestId">If supplied, this request Id is later returned in the saved event</param>
void DearchiveRegion(Stream loadStream, bool merge, Guid requestId);
void DearchiveRegion(Stream loadStream, bool merge, Guid requestId);
}
}

View File

@@ -71,21 +71,21 @@ namespace OpenSim.Region.Framework.Interfaces
/// Load persisted objects from region storage.
/// </summary>
/// <param name="regionUUID">the Region UUID</param>
/// <returns>List of loaded groups</returns>
/// <returns>List of loaded groups</returns>
List<SceneObjectGroup> LoadObjects(UUID regionUUID);
/// <summary>
/// Store a terrain revision in region storage
/// </summary>
/// <param name="ter">HeightField data</param>
/// <param name="regionID">region UUID</param>
/// <param name="regionID">region UUID</param>
void StoreTerrain(double[,] terrain, UUID regionID);
/// <summary>
/// Load the latest terrain revision from region storage
/// </summary>
/// <param name="regionID">the region UUID</param>
/// <returns>Heightfield data</returns>
/// <returns>Heightfield data</returns>
double[,] LoadTerrain(UUID regionID);
void StoreLandObject(ILandObject Parcel);
@@ -96,7 +96,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <item>delete from landaccesslist where LandUUID=globalID</item>
/// </list>
/// </summary>
/// <param name="globalID"></param>
/// <param name="globalID"></param>
void RemoveLandObject(UUID globalID);
List<LandData> LoadLandObjects(UUID regionUUID);

View File

@@ -117,6 +117,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// </summary>
/// <param name="grp"></param>
/// <returns></returns>
string SerializeGroupToXml2(SceneObjectGroup grp);
string SerializeGroupToXml2(SceneObjectGroup grp);
}
}

View File

@@ -29,12 +29,12 @@ using System;
using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces
{
{
public interface ISoundModule
{
void PlayAttachedSound(UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags);
void TriggerSound(
UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle);
UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle);
}
}

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.Framework.Interfaces
{
{
public interface IVegetationModule : IEntityCreator
{
/// <summary>
@@ -44,6 +44,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="newTree"></param>
/// <returns></returns>
SceneObjectGroup AddTree(
UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree);
UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree);
}
}

View File

@@ -26,9 +26,9 @@
*/
namespace OpenSim.Region.Framework.Interfaces
{
{
public interface IWorldMapModule
{
void LazySaveGeneratedMaptile(byte[] data, bool temporary);
void LazySaveGeneratedMaptile(byte[] data, bool temporary);
}
}

View File

@@ -34,7 +34,7 @@ using OpenMetaverse;
using OpenSim.Framework;
namespace OpenSim.Region.Framework.Scenes
{
{
class DeleteToInventoryHolder
{
public DeRezAction action;
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Framework.Scenes
/// up the main client thread.
/// </summary>
public class AsyncSceneObjectGroupDeleter
{
{
private static readonly ILog m_log
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -58,16 +58,16 @@ namespace OpenSim.Region.Framework.Scenes
/// </value>
public bool Enabled;
private Timer m_inventoryTicker = new Timer(2000);
private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
private Scene m_scene;
private Timer m_inventoryTicker = new Timer(2000);
private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
private Scene m_scene;
public AsyncSceneObjectGroupDeleter(Scene scene)
{
m_scene = scene;
m_inventoryTicker.AutoReset = false;
m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
}
/// <summary>
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Framework.Scenes
{
//m_log.Debug("[SCENE]: Sent item successfully to inventory, continuing...");
}
}
}
/// <summary>
/// Move the next object in the queue to inventory. Then delete it properly from the scene.
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns></returns>
public bool InventoryDeQueueAndDelete()
{
DeleteToInventoryHolder x = null;
DeleteToInventoryHolder x = null;
try
{
@@ -142,9 +142,9 @@ namespace OpenSim.Region.Framework.Scenes
try
{
m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient);
m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient);
if (x.permissionToDelete)
m_scene.DeleteSceneObject(x.objectGroup, false);
m_scene.DeleteSceneObject(x.objectGroup, false);
}
catch (Exception e)
{
@@ -166,6 +166,6 @@ namespace OpenSim.Region.Framework.Scenes
m_log.Debug("[SCENE]: No objects left in inventory send queue.");
return false;
}
}
}
}

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (nod.Attributes["name"] != null)
{
string name = (string)nod.Attributes["name"].Value;
string name = (string)nod.Attributes["name"].Value;
UUID id = (UUID)nod.InnerText;
string animState = (string)nod.Attributes["state"].Value;

View File

@@ -234,7 +234,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Variable length strings seem to be null terminated in the animation asset.. but..
/// Variable length strings seem to be null terminated in the animation asset.. but..
/// use with caution, home grown.
/// advances the index.
/// </summary>
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Framework.Scenes
byte[] interm = new byte[endpos-i];
for (; i<endpos; i++)
{
interm[i-startpos] = data[i];
interm[i-startpos] = data[i];
}
i++; // advance past the null character
@@ -624,7 +624,7 @@ switch (jointname)
case "mWristLeft":
case "mWristRight":
case "mShoulderLeft":
case "mShoulderRight":
case "mShoulderRight":
// ZYX->ZXY
t = y;
y = z;

View File

@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.ErrorFormat("Remove Entity failed for {0}", localID, e);
return false;
}
}
}
}

View File

@@ -290,7 +290,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Guid.Empty is returned.
/// </summary>
public delegate void OarFileSaved(Guid guid, string message);
public event OarFileSaved OnOarFileSaved;
public event OarFileSaved OnOarFileSaved;
/// <summary>
/// Called when the script compile queue becomes empty
@@ -1004,7 +1004,7 @@ namespace OpenSim.Region.Framework.Scenes
handlerOarFileSaved = OnOarFileSaved;
if (handlerOarFileSaved != null)
handlerOarFileSaved(requestId, message);
}
}
public void TriggerEmptyScriptCompileQueue(int numScriptsFailed, string message)
{

View File

@@ -357,7 +357,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
m_commsProvider.UserProfileCacheService.RemoveUser(avatar.UUID);
m_log.DebugFormat(
"[HGSceneCommService]: User {0} is going to another region, profile cache removed",
avatar.UUID);
avatar.UUID);
}
}
else

View File

@@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes
public class RegionStatsHandler : IStreamedRequestHandler
{
{
private string osRXStatsURI = String.Empty;
private string osXStatsURI = String.Empty;
//private string osSecret = String.Empty;
@@ -87,13 +87,13 @@ namespace OpenSim.Region.Framework.Scenes
}
public string Path
{
{
// This is for the region and is the regionSecret hashed
get { return "/" + osRXStatsURI + "/"; }
}
private string Report()
{
{
OSDMap args = new OSDMap(30);
//int time = Util.ToUnixTime(DateTime.Now);
args["OSStatsURI"] = OSD.FromString("http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort + "/" + osXStatsURI + "/");

View File

@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.Framework.Scenes
return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId);
}
else
{
{
InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId);
if (agentItem == null)

View File

@@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes
remoteClient.SendInventoryItemDetails(ownerID, item);
}
// else shouldn't we send an alert message?
}
}
/// <summary>
/// Tell the client about the various child items and folders contained in the requested folder.
@@ -485,7 +485,7 @@ namespace OpenSim.Region.Framework.Scenes
// TODO: This code for looking in the folder for the library should be folded back into the
// CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
// can be handled transparently).
// can be handled transparently).
InventoryFolderImpl fold;
if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null)
{
@@ -515,7 +515,7 @@ namespace OpenSim.Region.Framework.Scenes
return contents;
}
}
/// <summary>
/// Handle an inventory folder creation request from the client.
@@ -535,7 +535,7 @@ namespace OpenSim.Region.Framework.Scenes
"[AGENT INVENTORY]: Failed to move create folder for user {0} {1}",
remoteClient.Name, remoteClient.AgentId);
}
}
}
/// <summary>
/// Handle a client request to update the inventory folder
@@ -570,7 +570,7 @@ namespace OpenSim.Region.Framework.Scenes
remoteClient.Name, remoteClient.AgentId);
}
}
}
}
public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
{
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.WarnFormat("[AGENT INVENTORY]: request to move folder {0} but folder not found", folderID);
}
}
}
/// <summary>
/// This should delete all the items and folders in the given directory.
@@ -609,7 +609,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_log.WarnFormat("[AGENT INVENTORY]: Exception on purge folder for user {0}: {1}", remoteClient.AgentId, e.Message);
}
}
}
private void PurgeFolderAsync(UUID userID, UUID folderID)

View File

@@ -805,7 +805,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="invType"></param>
/// <param name="objectID"></param>
/// <param name="userID"></param>
/// <returns></returns>
/// <returns></returns>
public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
{
CreateObjectInventoryHandler handler = OnCreateObjectInventory;
@@ -856,7 +856,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
/// <param name="invType"></param>
/// <param name="userID"></param>
/// <returns></returns>
/// <returns></returns>
public bool CanCreateUserInventory(int invType, UUID userID)
{
CreateUserInventoryHandler handler = OnCreateUserInventory;
@@ -877,7 +877,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary>
/// <param name="itemID"></param>
/// <param name="userID"></param>
/// <returns></returns>
/// <returns></returns>
public bool CanEditUserInventory(UUID itemID, UUID userID)
{
EditUserInventoryHandler handler = OnEditUserInventory;
@@ -891,14 +891,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
return true;
}
}
/// <summary>
/// Check whether the specified user is allowed to copy the given inventory item from their own inventory.
/// </summary>
/// <param name="itemID"></param>
/// <param name="userID"></param>
/// <returns></returns>
/// <returns></returns>
public bool CanCopyUserInventory(UUID itemID, UUID userID)
{
CopyUserInventoryHandler handler = OnCopyUserInventory;
@@ -912,14 +912,14 @@ namespace OpenSim.Region.Framework.Scenes
}
}
return true;
}
}
/// <summary>
/// Check whether the specified user is allowed to edit the given inventory item within their own inventory.
/// </summary>
/// <param name="itemID"></param>
/// <param name="userID"></param>
/// <returns></returns>
/// <returns></returns>
public bool CanDeleteUserInventory(UUID itemID, UUID userID)
{
DeleteUserInventoryHandler handler = OnDeleteUserInventory;
@@ -933,7 +933,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
return true;
}
}
public bool CanTeleport(UUID userID)
{

View File

@@ -996,7 +996,7 @@ namespace OpenSim.Region.Framework.Scenes
// Loop it
if (m_frame == Int32.MaxValue)
m_frame = 0;
m_frame = 0;
otherMS = Environment.TickCount;
// run through all entities looking for updates (slow)
@@ -2023,12 +2023,12 @@ namespace OpenSim.Region.Framework.Scenes
return true;
}
break;
case Cardinals.W:
case Cardinals.W:
foreach (Border b in WestBorders)
{
if (b.TestCross(position))
return true;
}
}
break;
}
}
@@ -3270,7 +3270,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region",
agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
//reason = String.Format("You are not currently on the access list for {0}",RegionInfo.RegionName);
return false;
return false;
}
}

View File

@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <value>
/// Registered classes that are capable of creating entities.
/// </value>
protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>();
protected Dictionary<PCode, IEntityCreator> m_entityCreators = new Dictionary<PCode, IEntityCreator>();
/// <summary>
/// The last allocated local prim id. When a new local id is requested, the next number in the sequence is
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Framework.Scenes
_primAllocateMutex.ReleaseMutex();
return myID;
}
}
#region Module Methods
@@ -473,7 +473,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Shows various details about the sim based on the parameters supplied by the console command in openSimMain.
/// </summary>
/// <param name="showParams">What to show</param>
/// <param name="showParams">What to show</param>
public virtual void Show(string[] showParams)
{
switch (showParams[0])
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes
}
break;
}
}
}
public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback)
{

View File

@@ -845,7 +845,7 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence sp;
lock (ScenePresences)
{
{
ScenePresences.TryGetValue(agentID, out sp);
}

View File

@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SaveCurrentSceneToXml(string filename)
{
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
serialiser.SavePrimsToXml(CurrentOrFirstScene, filename);
}
@@ -205,7 +205,7 @@ namespace OpenSim.Region.Framework.Scenes
public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector3 loadOffset)
{
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
serialiser.LoadPrimsFromXml(CurrentOrFirstScene, filename, generateNewIDs, loadOffset);
}
@@ -216,14 +216,14 @@ namespace OpenSim.Region.Framework.Scenes
public void SaveCurrentSceneToXml2(string filename)
{
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
serialiser.SavePrimsToXml2(CurrentOrFirstScene, filename);
}
public void SaveNamedPrimsToXml2(string primName, string filename)
{
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
serialiser.SaveNamedPrimsToXml2(CurrentOrFirstScene, primName, filename);
}
@@ -233,7 +233,7 @@ namespace OpenSim.Region.Framework.Scenes
public void LoadCurrentSceneFromXml2(string filename)
{
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
if (serialiser != null)
serialiser.LoadPrimsFromXml2(CurrentOrFirstScene, filename);
}
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
public void LoadArchiveToCurrentScene(string filename)
{
IRegionArchiverModule archiver = CurrentOrFirstScene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null)
if (archiver != null)
archiver.DearchiveRegion(filename);
}

View File

@@ -263,7 +263,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
&& !IsAttachmentCheckFull())
{
{
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
}
@@ -454,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="scene"></param>
public void AttachToScene(Scene scene)
{
m_scene = scene;
m_scene = scene;
RegionHandle = m_scene.RegionInfo.RegionHandle;
if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0)
@@ -479,9 +479,9 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
}
ApplyPhysics(m_scene.m_physicalPrim);
ApplyPhysics(m_scene.m_physicalPrim);
ScheduleGroupForFullUpdate();
ScheduleGroupForFullUpdate();
}
public Vector3 GroupScale()
@@ -1037,12 +1037,12 @@ namespace OpenSim.Region.Framework.Scenes
m_rootPart = part;
if (!IsAttachment)
part.ParentID = 0;
part.LinkNum = 0;
part.LinkNum = 0;
// No locking required since the SOG should not be in the scene yet - one can't change root parts after
// the scene object has been attached to the scene
m_parts.Add(m_rootPart.UUID, m_rootPart);
}
}
/// <summary>
/// Add a new part to this scene object. The part must already be correctly configured.
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Delete this group from its scene and tell all the scene presences about that deletion.
/// </summary>
/// </summary>
/// <param name="silent">Broadcast deletions to all clients.</param>
public void DeleteGroup(bool silent)
{
@@ -1267,11 +1267,11 @@ namespace OpenSim.Region.Framework.Scenes
if (part.LocalId != m_rootPart.LocalId)
{
part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim);
}
}
}
}
// Hack to get the physics scene geometries in the right spot
ResetChildPrimPhysicsPositions();
ResetChildPrimPhysicsPositions();
}
else
{
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
List<SceneObjectPart> partList;
lock (m_parts)
{
{
partList = new List<SceneObjectPart>(m_parts.Values);
}
@@ -1744,7 +1744,7 @@ namespace OpenSim.Region.Framework.Scenes
rootpart.PhysActor.PIDHoverActive = false;
}
}
}
}
}
/// <summary>

View File

@@ -42,7 +42,7 @@ using OpenSim.Region.Framework.Scenes.Scripting;
using OpenSim.Region.Physics.Manager;
namespace OpenSim.Region.Framework.Scenes
{
{
#region Enumerations
[Flags]
@@ -187,7 +187,7 @@ namespace OpenSim.Region.Framework.Scenes
public IEntityInventory Inventory
{
get { return m_inventory; }
}
}
protected SceneObjectPartInventory m_inventory;
[XmlIgnore]
@@ -309,9 +309,9 @@ namespace OpenSim.Region.Framework.Scenes
RotationOffset = rotationOffset;
Velocity = new Vector3(0, 0, 0);
AngularVelocity = new Vector3(0, 0, 0);
Acceleration = new Vector3(0, 0, 0);
Acceleration = new Vector3(0, 0, 0);
m_TextureAnimation = new byte[0];
m_particleSystem = new byte[0];
m_particleSystem = new byte[0];
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
@@ -384,7 +384,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <value>
/// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes
/// </value>
/// </value>
public TaskInventoryDictionary TaskInventory
{
get { return m_inventory.Items; }
@@ -3484,7 +3484,7 @@ if (m_shape != null) {
}
else // it already has a physical representation
{
pa.IsPhysical = UsePhysics;
pa.IsPhysical = UsePhysics;
DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
if (m_parentGroup != null)
@@ -3775,7 +3775,7 @@ if (m_shape != null) {
public override string ToString()
{
return String.Format("{0} {1} (parent {2}))", Name, UUID, ParentGroup);
}
}
#endregion Public Methods
@@ -3823,11 +3823,11 @@ if (m_shape != null) {
_everyoneMask &= _nextOwnerMask;
Inventory.ApplyNextOwnerPermissions();
}
}
public bool CanBeDeleted()
{
return Inventory.CanBeDeleted();
}
}
}
}

View File

@@ -105,7 +105,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ForceInventoryPersistence()
{
HasInventoryChanged = true;
}
}
/// <summary>
/// Reset UUIDs for all the items in the prim's inventory. This involves either generating
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Change every item in this inventory to a new group.
/// </summary>
/// <param name="groupID"></param>
/// <param name="groupID"></param>
public void ChangeInventoryGroup(UUID groupID)
{
lock (Items)

View File

@@ -776,7 +776,7 @@ namespace OpenSim.Region.Framework.Scenes
// Moved this from SendInitialData to ensure that m_appearance is initialized
// before the inventory is processed in MakeRootAgent. This fixes a race condition
// related to the handling of attachments
//m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
//m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
if (m_scene.TestBorderCross(pos, Cardinals.E))
{
Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E);
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((flags & (uint) AgentManager.ControlFlags.AGENT_CONTROL_STAND_UP) != 0)
{
StandUp();
}
}
// Check if Client has camera in 'follow cam' or 'build' mode.
Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation);
@@ -1489,7 +1489,7 @@ namespace OpenSim.Region.Framework.Scenes
{
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
// m_log.DebugFormat(
// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
AddNewMovement(agent_control_v3, q);
@@ -2306,7 +2306,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Rotate the avatar to the given rotation and apply a movement in the given relative vector
/// </summary>
/// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
/// <param name="rotation">The direction in which this avatar should now face.
/// <param name="rotation">The direction in which this avatar should now face.
public void AddNewMovement(Vector3 vec, Quaternion rotation)
{
if (m_isChildAgent)
@@ -2649,7 +2649,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Tell the client for this scene presence what items it should be wearing now
/// </summary>
public void SendWearables()
{
{
ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
}
@@ -3175,7 +3175,7 @@ namespace OpenSim.Region.Framework.Scenes
else
{
wears[i++] = UUID.Zero;
wears[i++] = UUID.Zero;
wears[i++] = UUID.Zero;
}
}
cAgent.Wearables = wears;
@@ -3487,7 +3487,7 @@ namespace OpenSim.Region.Framework.Scenes
public bool HasAttachments()
{
return m_attachments.Count > 0;
return m_attachments.Count > 0;
}
public bool HasScriptedAttachments()

View File

@@ -122,13 +122,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
"[SERIALIZER]: Deserialization of xml failed with {0}. xml was {1}", e, xmlData);
return null;
}
}
}
/// <summary>
/// Serialize a scene object to the original xml format
/// </summary>
/// <param name="sceneObject"></param>
/// <returns></returns>
/// <returns></returns>
public static string ToOriginalXmlFormat(SceneObjectGroup sceneObject)
{
using (StringWriter sw = new StringWriter())
@@ -140,13 +140,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
return sw.ToString();
}
}
}
/// <summary>
/// Serialize a scene object to the original xml format
/// </summary>
/// <param name="sceneObject"></param>
/// <returns></returns>
/// <returns></returns>
public static void ToOriginalXmlFormat(SceneObjectGroup sceneObject, XmlTextWriter writer)
{
//m_log.DebugFormat("[SERIALIZER]: Starting serialization of {0}", Name);
@@ -238,13 +238,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
m_log.ErrorFormat("[SERIALIZER]: Deserialization of xml failed with {0}. xml was {1}", e, xmlData);
return null;
}
}
}
/// <summary>
/// Serialize a scene object to the 'xml2' format.
/// </summary>
/// <param name="sceneObject"></param>
/// <returns></returns>
/// <returns></returns>
public static string ToXml2Format(SceneObjectGroup sceneObject)
{
using (StringWriter sw = new StringWriter())
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
/// Serialize a scene object to the 'xml2' format.
/// </summary>
/// <param name="sceneObject"></param>
/// <returns></returns>
/// <returns></returns>
public static void ToXml2Format(SceneObjectGroup sceneObject, XmlTextWriter writer)
{
//m_log.DebugFormat("[SERIALIZER]: Starting serialization of SOG {0} to XML2", Name);
@@ -288,6 +288,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteEndElement(); // End of SceneObjectGroup
//m_log.DebugFormat("[SERIALIZER]: Finished serialization of SOG {0} to XML2, {1}ms", Name, System.Environment.TickCount - time);
}
}
}
}

View File

@@ -236,7 +236,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
}
SavePrimListToXml2(primList, fileName);
}
}
public static void SavePrimListToXml2(List<EntityBase> entityList, string fileName)
{

View File

@@ -450,7 +450,7 @@ namespace OpenSim.Region.Framework.Scenes
{
addFrameMS(ms);
addAgentMS(ms);
}
}
#endregion
}

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{
[TestFixture, LongRunning]
public class EntityManagerTests
{
{
static public Random random;
SceneObjectGroup found;
Scene scene = SceneSetupHelpers.SetupScene();
@@ -81,13 +81,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(entman.ContainsKey(obj1), Is.False);
Assert.That(entman.ContainsKey(li1), Is.False);
Assert.That(entman.ContainsKey(obj2), Is.False);
Assert.That(entman.ContainsKey(li2), Is.False);
Assert.That(entman.ContainsKey(obj2), Is.False);
Assert.That(entman.ContainsKey(li2), Is.False);
}
[Test]
public void T011_ThreadAddRemoveTest()
{
{
TestHelper.InMethod();
// Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod());
@@ -148,12 +148,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests
int size = random.Next(40,80);
char ch ;
for (int i=0; i<size; i++)
{
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))) ;
name.Append(ch);
}
return name.ToString();
}
}
}
public class NewTestThreads
@@ -179,4 +179,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
entman.Remove(sog.UUID);
}
}
}
}

View File

@@ -46,13 +46,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// </summary>
[TestFixture]
public class SceneObjectBasicTests
{
{
/// <summary>
/// Test adding an object to a scene.
/// </summary>
[Test, LongRunning]
public void TestAddSceneObject()
{
{
TestHelper.InMethod();
Scene scene = SceneSetupHelpers.SetupScene();
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
//m_log.Debug("retrievedPart : {0}", retrievedPart);
// If the parts have the same UUID then we will consider them as one and the same
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
}
/// <summary>
@@ -72,11 +72,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{
TestHelper.InMethod();
TestScene scene = SceneSetupHelpers.SetupScene();
TestScene scene = SceneSetupHelpers.SetupScene();
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
scene.DeleteSceneObject(part.ParentGroup, false);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
Assert.That(retrievedPart, Is.Null);
}
@@ -115,13 +115,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
//[Test]
//public void TestDeleteSceneObjectAsyncToUserInventory()
//{
// TestHelper.InMethod();
// //log4net.Config.XmlConfigurator.Configure();
// TestHelper.InMethod();
// //log4net.Config.XmlConfigurator.Configure();
// UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
// string myObjectName = "Fred";
// TestScene scene = SceneSetupHelpers.SetupScene();
// TestScene scene = SceneSetupHelpers.SetupScene();
// SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName);
// Assert.That(

View File

@@ -45,7 +45,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary>
/// Linking tests
/// </summary>
[TestFixture]
[TestFixture]
public class SceneObjectLinkingTests
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -174,13 +174,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests
// Link grp4 to grp3.
grp3.LinkToGroup(grp4);
// At this point we should have 4 parts total in two groups.
// At this point we should have 4 parts total in two groups.
Assert.That(grp1.Children.Count == 2);
Assert.That(grp2.IsDeleted, "Group 2 was not registered as deleted after link.");
Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained parts after delink.");
Assert.That(grp2.Children.Count, Is.EqualTo(0), "Group 2 still contained parts after delink.");
Assert.That(grp3.Children.Count == 2);
Assert.That(grp4.IsDeleted, "Group 4 was not registered as deleted after link.");
Assert.That(grp4.Children.Count, Is.EqualTo(0), "Group 4 still contained parts after delink.");
Assert.That(grp4.Children.Count, Is.EqualTo(0), "Group 4 still contained parts after delink.");
if (debugtest)
{
@@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation);
m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset);
m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset);
}
}
// Required for linking
grp1.RootPart.UpdateFlag = 0;
@@ -253,6 +253,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
&& (part4.RotationOffset.Y - compareQuaternion.Y < 0.00003)
&& (part4.RotationOffset.Z - compareQuaternion.Z < 0.00003)
&& (part4.RotationOffset.W - compareQuaternion.W < 0.00003));
}
}
}
}

View File

@@ -41,11 +41,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
public class SceneTests
{
private class FakeStorageManager : StorageManager
{
{
private class FakeRegionDataStore : IRegionDataStore
{
public void Initialise(string filename)
{
{
}
public void Dispose()

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
{
/// <summary>
/// Teleport tests in a standalone OpenSim
/// </summary>
/// </summary>
[TestFixture]
public class StandaloneTeleportTests
{
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// </summary>
/// Does not yet do what is says on the tin.
/// Commenting for now
//[Test, LongRunning]
//[Test, LongRunning]
public void TestSimpleNotNeighboursTeleport()
{
TestHelper.InMethod();

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Framework.Scenes
{
/// <summary>
/// Gather uuids for a given entity.
/// </summary>
/// </summary>
///
/// This does a deep inspection of the entity to retrieve all the assets it uses (whether as textures, as scripts
/// contained in inventory, as scripts contained in objects contained in another object's inventory, etc. Assets
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Framework.Scenes
///
/// <param name="assetUuid">The uuid of the asset for which to gather referenced assets</param>
/// <param name="assetType">The type of the asset for the uuid given</param>
/// <param name="assetUuids">The assets gathered</param>
/// <param name="assetUuids">The assets gathered</param>
public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, int> assetUuids)
{
assetUuids[assetUuid] = 1;
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Framework.Scenes
// If the prim is a sculpt then preserve this information too
if (part.Shape.SculptTexture != UUID.Zero)
assetUuids[part.Shape.SculptTexture] = 1;
assetUuids[part.Shape.SculptTexture] = 1;
TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone();
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// The callback made when we request the asset for an object from the asset service.
/// </summary>
/// </summary>
protected void AssetReceived(string id, Object sender, AssetBase asset)
{
lock (this)
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
AssetBase assetBase = GetAsset(wearableAssetUuid);
if (null != assetBase)
{
{
//m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data));
AssetWearable wearableAsset = new AssetBodypart(wearableAssetUuid, assetBase.Data);
wearableAsset.Decode();
@@ -275,6 +275,6 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectGroup sog = SceneObjectSerializer.FromOriginalXmlFormat(xml);
GatherAssetUuids(sog, assetUuids);
}
}
}
}
}