Update svn properties, formatting cleanup.

0.6.0-stable
Jeff Ames 2008-09-09 01:26:48 +00:00
parent 3e1441afe1
commit fae34bb10c
41 changed files with 838 additions and 831 deletions

View File

@ -644,7 +644,7 @@ VALUES
using (AutoClosingSqlCommand cmd = _Database.Query(sql))
{
cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString()));
using(SqlDataReader reader = cmd.ExecuteReader())
using (SqlDataReader reader = cmd.ExecuteReader())
{
if (reader.Read())
{

View File

@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
else
m_FieldMap[name].SetValue(es, false);
}
else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
else if (m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
{
UUID uuid = UUID.Zero;

View File

@ -79,7 +79,7 @@ namespace OpenSim.Data.MySQL
m_lastConnect++;
// Overflow protection
if(m_lastConnect == int.MaxValue)
if (m_lastConnect == int.MaxValue)
m_lastConnect = 0;
MySQLSuperManager x = m_dbconnections[m_lastConnect%m_maxConnections];

View File

@ -109,7 +109,7 @@ namespace OpenSim.Data.SQLite
else
m_FieldMap[name].SetValue(es, false);
}
else if(m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
else if (m_FieldMap[name].GetValue(es) is OpenMetaverse.UUID)
{
UUID uuid = UUID.Zero;

View File

@ -10,7 +10,7 @@ namespace OpenSim.Framework.Communications.Cache
public FileAssetClient(string dir)
{
if(!Directory.Exists(dir))
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}

View File

@ -737,7 +737,7 @@ namespace OpenSim.Framework
/// The extracted ulong
/// </returns>
public static ulong BytesToUInt64Big(byte[] bytes) {
if(bytes.Length < 8) return 0;
if (bytes.Length < 8) return 0;
return ((ulong)bytes[0] << 56) | ((ulong)bytes[1] << 48) | ((ulong)bytes[2] << 40) | ((ulong)bytes[3] << 32) |
((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
}

View File

@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
string message = e.Message;
UUID fromID = e.SenderUUID;
if(message.Length >= 1000) // libomv limit
if (message.Length >= 1000) // libomv limit
message = message.Substring(0, 1000);
if (e.Sender != null)

View File

@ -820,7 +820,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
string secret = (string) requestData["secret"];
Scene userScene = GetSceneByUUID(regionId);
if(userScene != null)
if (userScene != null)
{
if (userScene.RegionInfo.regionSecret.ToString() == secret)
{

View File

@ -129,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
private SceneObjectGroup GetGroupByPrim(uint localID)
{
foreach(Object currScene in m_sceneList.Values)
foreach (Object currScene in m_sceneList.Values)
{
foreach (EntityBase ent in ((Scene)currScene).GetEntities())
{
@ -145,10 +145,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private void Initialize(CMModel model, CMView view, Scene scene, int channel)
{
lock(this)
lock (this)
{
m_estateModule = scene.RequestModuleInterface<IEstateModule>();
m_thread = new Thread( MainLoop );
m_thread = new Thread(MainLoop);
m_thread.Name = "Content Management";
m_thread.IsBackground = true;
m_thread.Start();
@ -164,12 +164,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
CMModel model = m_model; CMView view = m_view; int channel = m_channel;
Work currentJob = new Work();
while(true)
while (true)
{
currentJob = m_WorkQueue.Dequeue();
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
switch(currentJob.Type)
switch (currentJob.Type)
{
case WorkType.NONE:
break;
@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
group = GetGroupByPrim(LocalId);
if (group != null)
{
view.DisplayAuras( model.UpdateNormalEntityEffects(group) ); //Might be a normal entity (green aura)
view.DisplayAuras(model.UpdateNormalEntityEffects(group)); //Might be a normal entity (green aura)
m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue aura)
}
}
@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private void ObjectDuplicated(CMModel model, CMView view, uint localId)
{
if ((m_state & State.SHOWING_CHANGES) > 0)
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras( GetGroupByPrim(localId).Scene ));
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras(GetGroupByPrim(localId).Scene));
}
/// <summary>
@ -256,7 +256,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
if ((m_state & State.SHOWING_CHANGES) > 0)
{
foreach(Object scene in m_sceneList.Values)
foreach (Object scene in m_sceneList.Values)
m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
}
}
@ -328,27 +328,27 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// <summary>
/// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
/// </summary>
protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity( Hashtable sceneList, Scene scene)
protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity(Hashtable sceneList, Scene scene)
{
int somethingAddedToList = 1;
System.Collections.Generic.List<Scene> newList = new List<Scene>();
newList.Add(scene);
if (! sceneList.ContainsValue(scene))
if (!sceneList.ContainsValue(scene))
{
foreach(Object sceneObj in sceneList)
foreach (Object sceneObj in sceneList)
newList.Add((Scene) sceneObj);
return newList;
}
while(somethingAddedToList > 0)
while (somethingAddedToList > 0)
{
somethingAddedToList = 0;
for(int i = 0; i < newList.Count; i++)
for (int i = 0; i < newList.Count; i++)
{
foreach(Object sceneObj in sceneList.Values)
foreach (Object sceneObj in sceneList.Values)
{
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (! newList.Contains((Scene)sceneObj)) )
if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (!newList.Contains((Scene)sceneObj)))
{
newList.Add((Scene)sceneObj);
somethingAddedToList++;
@ -357,8 +357,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
}
}
foreach(Object sceneObj in sceneList.Values)
if (! newList.Contains((Scene)sceneObj))
foreach (Object sceneObj in sceneList.Values)
if (!newList.Contains((Scene)sceneObj))
newList.Add((Scene)sceneObj);
return newList;
@ -405,7 +405,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
protected void StopManaging(UUID clientUUID)
{
foreach(Object sceneobj in m_sceneList.Values)
foreach (Object sceneobj in m_sceneList.Values)
{
ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID);
if (presence != null)
@ -504,7 +504,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
protected void commit(string message, Scene scene, CMModel model, CMView view)
{
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
string[] args = message.Split(new char[] {' '});
@ -516,7 +516,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
}
m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region.");
foreach(Scene currScene in proximitySceneList)
foreach (Scene currScene in proximitySceneList)
{
model.CommitRegion(currScene, new String(logMessage));
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
model.DeleteAllMetaObjects();
//Recreate them from backend files
foreach(Scene currScene in proximitySceneList)
foreach (Scene currScene in proximitySceneList)
{
model.UpdateCMEntities(currScene);
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
@ -553,7 +553,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
protected void diffmode(Scene scene, CMModel model, CMView view)
{
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF
{
@ -575,17 +575,17 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
view.HideAllAuras();
model.DeleteAllMetaObjects();
//Recreate them from backend files
foreach(Object currScene in m_sceneList.Values)
foreach (Object currScene in m_sceneList.Values)
model.UpdateCMEntities((Scene) currScene);
}
else if ((m_state & State.DIRTY) != 0) {
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
foreach(Scene currScene in proximitySceneList)
foreach (Scene currScene in proximitySceneList)
model.UpdateCMEntities(currScene);
}
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
foreach(Scene currScene in proximitySceneList)
foreach (Scene currScene in proximitySceneList)
model.CheckForNewEntitiesMissingAuras(currScene);
view.DisplayRecentChanges();
@ -608,14 +608,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
view.HideAllMetaEntities();
}
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene);
foreach(Scene currScene in proximitySceneList)
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
foreach (Scene currScene in proximitySceneList)
model.RollbackRegion(currScene);
if ((m_state & State.DIRTY) != 0 )
if ((m_state & State.DIRTY) != 0)
{
model.DeleteAllMetaObjects();
foreach(Scene currScene in proximitySceneList)
foreach (Scene currScene in proximitySceneList)
model.UpdateCMEntities(currScene);
}
@ -672,7 +672,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
return;
}
switch(args[0])
switch (args[0])
{
case "ci":
case "commit":

View File

@ -115,21 +115,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
System.Collections.ArrayList missingList = new System.Collections.ArrayList();
SceneObjectGroup temp = null;
foreach( EntityBase currObj in currList )
foreach (EntityBase currObj in currList)
{
if (! (currObj is SceneObjectGroup))
if (!(currObj is SceneObjectGroup))
continue;
temp = (SceneObjectGroup) currObj;
if (m_CMEntityHash.ContainsKey(temp.UUID))
{
foreach(SceneObjectPart part in temp.Children.Values)
foreach (SceneObjectPart part in temp.Children.Values)
if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
missingList.Add(part);
}
else //Entire group is missing from revision. (and is a new part in region)
{
foreach(SceneObjectPart part in temp.Children.Values)
foreach (SceneObjectPart part in temp.Children.Values)
missingList.Add(part);
}
}

View File

@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//If so, then the current scene's parts that are new should be marked green.
missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities());
foreach(Object missingPart in missingList)
foreach (Object missingPart in missingList)
{
if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
continue;
@ -175,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group)
{
// Deal with new parts not revisioned that have been deleted.
foreach(SceneObjectPart part in group.Children.Values)
foreach (SceneObjectPart part in group.Children.Values)
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID);
}
@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
try{
temp = new SceneObjectGroup(xml);
temp.SetScene(scene);
foreach(SceneObjectPart part in temp.Children.Values)
foreach (SceneObjectPart part in temp.Children.Values)
part.RegionHandle = scene.RegionInfo.RegionHandle;
ReplacementList.Add(temp.UUID, (EntityBase)temp);
}
@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
try
{
foreach(EntityBase entity in scene.GetEntities())
foreach (EntityBase entity in scene.GetEntities())
{
if (entity == null)
continue;
@ -253,7 +253,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
break;
}
foreach(UUID uuid in deleteListUUIDs.Keys)
foreach (UUID uuid in deleteListUUIDs.Keys)
{
try
{
@ -275,7 +275,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
scene.Entities = ReplacementList;
}
foreach(EntityBase ent in ReplacementList.Values)
foreach (EntityBase ent in ReplacementList.Values)
{
try
{
@ -340,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
System.Collections.ArrayList auraList = new System.Collections.ArrayList();
if (group == null)
return null;
foreach(SceneObjectPart part in group.Children.Values)
foreach (SceneObjectPart part in group.Children.Values)
{
if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
{

View File

@ -78,21 +78,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
// Auras To
public void DisplayAuras(CMEntityCollection auraCollection)
{
foreach( Object ent in auraCollection.Auras.Values)
foreach (Object ent in auraCollection.Auras.Values)
((AuraMetaEntity)ent).SendFullUpdateToAll();
}
// Auras To Client
public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client)
{
foreach( Object ent in auraCollection.Auras.Values)
foreach (Object ent in auraCollection.Auras.Values)
((AuraMetaEntity)ent).SendFullUpdate(client);
}
// Auras from List To ALL
public void DisplayAuras(ArrayList list)
{
foreach( Object ent in list)
foreach (Object ent in list)
{
m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
((AuraMetaEntity)ent).SendFullUpdateToAll();
@ -102,21 +102,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
// Entities to ALL
public void DisplayEntities(CMEntityCollection entityCollection)
{
foreach( Object ent in entityCollection.Entities.Values)
foreach (Object ent in entityCollection.Entities.Values)
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
}
// Entities to Client
public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client)
{
foreach( Object ent in entityCollection.Entities.Values)
foreach (Object ent in entityCollection.Entities.Values)
((ContentManagementEntity)ent).SendFullDiffUpdate(client);
}
// Entities from List to ALL
public void DisplayEntities(ArrayList list)
{
foreach( Object ent in list)
foreach (Object ent in list)
((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
}
@ -158,13 +158,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public void HideAllAuras()
{
foreach(Object obj in m_model.MetaEntityCollection.Auras.Values)
foreach (Object obj in m_model.MetaEntityCollection.Auras.Values)
((MetaEntity)obj).HideFromAll();
}
public void HideAllMetaEntities()
{
foreach(Object obj in m_model.MetaEntityCollection.Entities.Values)
foreach (Object obj in m_model.MetaEntityCollection.Entities.Values)
((ContentManagementEntity)obj).HideFromAll();
}
@ -186,7 +186,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll();
// Deal with new parts not revisioned that have been deleted.
foreach(SceneObjectPart part in group.Children.Values)
foreach (SceneObjectPart part in group.Children.Values)
if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
}

View File

@ -104,11 +104,11 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
#region Private Methods
/// <summary>
/// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid.
/// Check if an entitybase list (like that returned by scene.GetEntities()) contains a group with the rootpart uuid that matches the current uuid.
/// </summary>
private bool ContainsKey(List<EntityBase> list, UUID uuid)
{
foreach( EntityBase part in list)
foreach (EntityBase part in list)
if (part.UUID == uuid)
return true;
return false;
@ -138,12 +138,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
DiffersFromSceneGroup = false;
// if group is not contained in scene's list
if(!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID))
if (!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID))
{
foreach(SceneObjectPart part in m_UnchangedEntity.Children.Values)
foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
{
// if scene list no longer contains this part, display translucent part and mark with red aura
if(! ContainsKey(sceneEntityList, part.UUID))
if (!ContainsKey(sceneEntityList, part.UUID))
{
// if already displaying a red aura over part, make sure its red
if (m_AuraEntities.ContainsKey(part.UUID))
@ -199,8 +199,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
public bool HasChildPrim(uint localID)
{
foreach( SceneObjectPart part in m_UnchangedEntity.Children.Values)
if ( part.LocalId == localID )
foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
if (part.LocalId == localID)
return true;
return false;
}
@ -208,18 +208,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public override void Hide(IClientAPI client)
{
base.Hide(client);
foreach(MetaEntity group in m_AuraEntities.Values)
foreach (MetaEntity group in m_AuraEntities.Values)
group.Hide(client);
foreach(MetaEntity group in m_BeamEntities.Values)
foreach (MetaEntity group in m_BeamEntities.Values)
group.Hide(client);
}
public override void HideFromAll()
{
base.HideFromAll();
foreach(MetaEntity group in m_AuraEntities.Values)
foreach (MetaEntity group in m_AuraEntities.Values)
group.HideFromAll();
foreach(MetaEntity group in m_BeamEntities.Values)
foreach (MetaEntity group in m_BeamEntities.Values)
group.HideFromAll();
}
@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
// Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
// had originally saved.
// m_Entity will NOT necessarily be the same entity as the user had saved.
foreach(SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values)
foreach (SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values)
{
//This is the part that we use to show changes.
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
@ -328,7 +328,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
if (DiffersFromSceneGroup)
{
foreach(AuraMetaEntity group in m_AuraEntities.Values)
foreach (AuraMetaEntity group in m_AuraEntities.Values)
group.SendFullUpdate(client);
}
}
@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
if (DiffersFromSceneGroup)
{
foreach(AuraMetaEntity group in m_AuraEntities.Values)
foreach (AuraMetaEntity group in m_AuraEntities.Values)
group.SendFullUpdateToAll();
}
}
@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
if (DiffersFromSceneGroup)
{
foreach(BeamMetaEntity group in m_BeamEntities.Values)
foreach (BeamMetaEntity group in m_BeamEntities.Values)
group.SendFullUpdate(client);
}
}
@ -355,7 +355,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
if (DiffersFromSceneGroup)
{
foreach(BeamMetaEntity group in m_BeamEntities.Values)
foreach (BeamMetaEntity group in m_BeamEntities.Values)
group.SendFullUpdateToAll();
}
}

View File

@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
return;
}
lock(this)
lock (this)
{
if (!initialised) //only init once
{
@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
if (! m_enabled)
return;
lock(this)
lock (this)
{
if (!m_posted) //only post once
{

View File

@ -102,11 +102,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private void SetupSerialiser()
{
if (m_serialiser.Count == 0)
foreach(UUID region in m_scenes.Keys)
{
foreach (UUID region in m_scenes.Keys)
{
m_serialiser.Add(region,
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
);
}
}
}
#endregion Private Methods
@ -151,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//int primCount = 0;
//SceneObjectGroup obj = null;
if(File.Exists(filename))
if (File.Exists(filename))
{
XmlTextReader reader = new XmlTextReader(filename);
reader.WhitespaceHandling = WhitespaceHandling.None;
@ -177,9 +181,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
XmlDocument doc = new XmlDocument();
XmlNode rootNode;
m_log.Info("[FSDB]: Checking if " + filename + " exists.");
if(File.Exists(filename))
if (File.Exists(filename))
{
Stopwatch x = new Stopwatch();
x.Start();
@ -191,7 +194,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
rootNode = doc.FirstChild;
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
{
xmlList.Add(aPrimNode.OuterXml);
}
x.Stop();
TimeToDownload += x.ElapsedMilliseconds;
@ -204,12 +209,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public void Initialise(Scene scene, string dir)
{
lock(this)
lock (this)
{
if (m_repodir == null)
m_repodir = dir;
}
lock(m_scenes)
lock (m_scenes)
m_scenes.Add(scene.RegionInfo.RegionID, scene);
}
@ -224,9 +229,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
StreamReader sr = null;
String logMessage = "";
String logLocation = "";
foreach(string revisionDir in directories)
foreach (string revisionDir in directories)
{
try
{
try {
logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
fs = new FileStream( logLocation, FileMode.Open);
sr = new StreamReader(fs);
@ -236,7 +242,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
revisionDict.Add(revisionDir, logMessage);
}
catch (Exception)
{}
{
}
}
return revisionDict;

View File

@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{
//make new uuids
Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
foreach(SceneObjectPart part in m_Entity.Children.Values)
foreach (SceneObjectPart part in m_Entity.Children.Values)
{
part.ResetIDs(part.LinkNum);
parts.Add(part.UUID, part);
@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//This deletes the group without removing from any databases.
//This is important because we are not IN any database.
//m_Entity.FakeDeleteGroup();
foreach( SceneObjectPart part in m_Entity.Children.Values)
foreach (SceneObjectPart part in m_Entity.Children.Values)
client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
}
@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary>
public virtual void HideFromAll()
{
foreach( SceneObjectPart part in m_Entity.Children.Values)
foreach (SceneObjectPart part in m_Entity.Children.Values)
m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
);

View File

@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
{
if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
if (TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
&& TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
&& TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
)
@ -164,46 +164,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
Diff result = 0;
// VECTOR COMPARISONS
if(! AreVectorsEquivalent(first.Acceleration, second.Acceleration))
if (!AreVectorsEquivalent(first.Acceleration, second.Acceleration))
result |= Diff.ACCELERATION;
if(! AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
if (!AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
result |= Diff.POSITION;
if(! AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
if (!AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
result |= Diff.ANGULARVELOCITY;
if(! AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
result |= Diff.OFFSETPOSITION;
if(! AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
result |= Diff.ROTATIONALVELOCITY;
if(! AreVectorsEquivalent(first.Scale, second.Scale))
if (!AreVectorsEquivalent(first.Scale, second.Scale))
result |= Diff.SCALE;
if(! AreVectorsEquivalent(first.Velocity, second.Velocity))
if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
result |= Diff.VELOCITY;
// QUATERNION COMPARISONS
if(! AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
if (!AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
result |= Diff.ROTATIONOFFSET;
// MISC COMPARISONS (UUID, Byte)
if(first.ClickAction != second.ClickAction)
if (first.ClickAction != second.ClickAction)
result |= Diff.CLICKACTION;
if(first.ObjectOwner != second.ObjectOwner)
if (first.ObjectOwner != second.ObjectOwner)
result |= Diff.OBJECTOWNER;
// STRING COMPARISONS
if(first.Description != second.Description)
if (first.Description != second.Description)
result |= Diff.DESCRIPTION;
if(first.Material != second.Material)
if (first.Material != second.Material)
result |= Diff.MATERIAL;
if(first.Name != second.Name)
if (first.Name != second.Name)
result |= Diff.NAME;
if(first.SitName != second.SitName)
if (first.SitName != second.SitName)
result |= Diff.SITNAME;
if(first.Text != second.Text)
if (first.Text != second.Text)
result |= Diff.TEXT;
if(first.TouchName != second.TouchName)
if (first.TouchName != second.TouchName)
result |= Diff.TOUCHNAME;
x.Stop();

View File

@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
{
if(texture == UUID.Zero)
if (texture == UUID.Zero)
return;
switch (corner)

View File

@ -7546,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// the object we are in
UUID objectID = m_host.ParentUUID;
if(objectID == UUID.Zero) return;
if (objectID == UUID.Zero) return;
// we need the permission first, to know which avatar we want to set the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@ -7597,7 +7597,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// the object we are in
UUID objectID = m_host.ParentUUID;
if(objectID == UUID.Zero) return;
if (objectID == UUID.Zero) return;
// we need the permission first, to know which avatar we want to clear the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;

View File

@ -7418,7 +7418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the object we are in
UUID objectID = m_host.ParentUUID;
if(objectID == UUID.Zero) return;
if (objectID == UUID.Zero) return;
// we need the permission first, to know which avatar we want to set the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@ -7469,7 +7469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the object we are in
UUID objectID = m_host.ParentUUID;
if(objectID == UUID.Zero) return;
if (objectID == UUID.Zero) return;
// we need the permission first, to know which avatar we want to clear the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;

View File

@ -686,7 +686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{
// If we're currently in an event, just tell it to save upon return
//
if(m_InEvent)
if (m_InEvent)
{
m_SaveState = true;
return;