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)) using (AutoClosingSqlCommand cmd = _Database.Query(sql))
{ {
cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString())); cmd.Parameters.Add(_Database.CreateParameter("@regionUUID", regionUUID.ToString()));
using(SqlDataReader reader = cmd.ExecuteReader()) using (SqlDataReader reader = cmd.ExecuteReader())
{ {
if (reader.Read()) if (reader.Read())
{ {

View File

@ -185,7 +185,7 @@ namespace OpenSim.Data.MySQL
else else
m_FieldMap[name].SetValue(es, false); 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; UUID uuid = UUID.Zero;

View File

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

View File

@ -109,7 +109,7 @@ namespace OpenSim.Data.SQLite
else else
m_FieldMap[name].SetValue(es, false); 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; UUID uuid = UUID.Zero;

View File

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

View File

@ -325,7 +325,7 @@ namespace OpenSim.Framework
ulong ActiveGroupPowers { get; } ulong ActiveGroupPowers { get; }
ulong GetGroupPowers(UUID groupID); ulong GetGroupPowers(UUID groupID);
string FirstName { get; } string FirstName { get; }

View File

@ -737,7 +737,7 @@ namespace OpenSim.Framework
/// The extracted ulong /// The extracted ulong
/// </returns> /// </returns>
public static ulong BytesToUInt64Big(byte[] bytes) { 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) | 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]; ((ulong)bytes[4] << 24) | ((ulong)bytes[5] << 16) | ((ulong)bytes[6] << 8) | (ulong)bytes[7];
} }

View File

@ -115,7 +115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected UUID m_activeGroupID = UUID.Zero; protected UUID m_activeGroupID = UUID.Zero;
protected string m_activeGroupName = String.Empty; protected string m_activeGroupName = String.Empty;
protected ulong m_activeGroupPowers = 0; protected ulong m_activeGroupPowers = 0;
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
/* Instantiated Designated Event Delegates */ /* Instantiated Designated Event Delegates */
//- used so we don't create new objects for each incoming packet and then toss it out later */ //- used so we don't create new objects for each incoming packet and then toss it out later */
@ -302,7 +302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
get { return m_activeGroupPowers; } get { return m_activeGroupPowers; }
} }
public ulong GetGroupPowers(UUID groupID) public ulong GetGroupPowers(UUID groupID)
{ {
if (m_groupPowers.ContainsKey(groupID)) if (m_groupPowers.ContainsKey(groupID))
return m_groupPowers[groupID]; return m_groupPowers[groupID];

View File

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

View File

@ -820,27 +820,27 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
string secret = (string) requestData["secret"]; string secret = (string) requestData["secret"];
Scene userScene = GetSceneByUUID(regionId); Scene userScene = GetSceneByUUID(regionId);
if(userScene != null) if (userScene != null)
{ {
if (userScene.RegionInfo.regionSecret.ToString() == secret) if (userScene.RegionInfo.regionSecret.ToString() == secret)
{ {
IClientAPI client = LocateClientObject(agentId); IClientAPI client = LocateClientObject(agentId);
if (client != null) if (client != null)
{ {
if (soundId != UUID.Zero) if (soundId != UUID.Zero)
client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text); client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
retparam.Add("success", true); retparam.Add("success", true);
} }
else else
{ {
retparam.Add("success", false); retparam.Add("success", false);
} }
} }
else else
{ {
retparam.Add("success", false); retparam.Add("success", false);

View File

@ -98,12 +98,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
float burstRate = 0.4f; float burstRate = 0.4f;
if (radius >= 8.0f) if (radius >= 8.0f)
{ {
//float sizeOfObject = radius / 2.0f; //float sizeOfObject = radius / 2.0f;
burstRadius = (radius - 8.0f)/3f; burstRadius = (radius - 8.0f)/3f;
burstRate = 1.5f; burstRate = 1.5f;
radius = 7.99f; radius = 7.99f;
patternFlags = Primitive.ParticleSystem.SourcePattern.Explode; patternFlags = Primitive.ParticleSystem.SourcePattern.Explode;
age = 4.0f; age = 4.0f;
} }
SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
} }
@ -114,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
// Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
// Primitive.ParticleSystem.ParticleDataFlags.TargetPos; // Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
prules.PartStartColor.G = color.Y; prules.PartStartColor.G = color.Y;
prules.PartStartColor.B = color.Z; prules.PartStartColor.B = color.Z;

View File

@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
// Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
Primitive.ParticleSystem.ParticleDataFlags.TargetPos; Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
prules.PartStartColor.G = color.Y; prules.PartStartColor.G = color.Y;
prules.PartStartColor.B = color.Z; prules.PartStartColor.B = color.Z;

View File

@ -129,31 +129,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
private SceneObjectGroup GetGroupByPrim(uint localID) 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()) foreach (EntityBase ent in ((Scene)currScene).GetEntities())
{ {
if (ent is SceneObjectGroup) if (ent is SceneObjectGroup)
{ {
if (((SceneObjectGroup)ent).HasChildPrim(localID)) if (((SceneObjectGroup)ent).HasChildPrim(localID))
return (SceneObjectGroup)ent; return (SceneObjectGroup)ent;
} }
} }
} }
return null; return null;
} }
private void Initialize(CMModel model, CMView view, Scene scene, int channel) private void Initialize(CMModel model, CMView view, Scene scene, int channel)
{ {
lock(this) lock (this)
{ {
m_estateModule = scene.RequestModuleInterface<IEstateModule>(); m_estateModule = scene.RequestModuleInterface<IEstateModule>();
m_thread = new Thread( MainLoop ); m_thread = new Thread(MainLoop);
m_thread.Name = "Content Management"; m_thread.Name = "Content Management";
m_thread.IsBackground = true; m_thread.IsBackground = true;
m_thread.Start(); m_thread.Start();
ThreadTracker.Add(m_thread); ThreadTracker.Add(m_thread);
m_state = State.NONE; m_state = State.NONE;
} }
} }
@ -164,41 +164,41 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
CMModel model = m_model; CMView view = m_view; int channel = m_channel; CMModel model = m_model; CMView view = m_view; int channel = m_channel;
Work currentJob = new Work(); Work currentJob = new Work();
while(true) while (true)
{ {
currentJob = m_WorkQueue.Dequeue(); currentJob = m_WorkQueue.Dequeue();
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request"); m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type); m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
switch(currentJob.Type) switch (currentJob.Type)
{ {
case WorkType.NONE: case WorkType.NONE:
break; break;
case WorkType.OBJECTATTRIBUTECHANGE: case WorkType.OBJECTATTRIBUTECHANGE:
ObjectAttributeChanged(model, view, currentJob.LocalId); ObjectAttributeChanged(model, view, currentJob.LocalId);
break; break;
case WorkType.PRIMITIVEADDED: case WorkType.PRIMITIVEADDED:
PrimitiveAdded(model, view, currentJob); PrimitiveAdded(model, view, currentJob);
break; break;
case WorkType.OBJECTDUPLICATED: case WorkType.OBJECTDUPLICATED:
ObjectDuplicated(model, view, currentJob.LocalId); ObjectDuplicated(model, view, currentJob.LocalId);
break; break;
case WorkType.OBJECTKILLED: case WorkType.OBJECTKILLED:
ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1); ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1);
break; break;
case WorkType.UNDODID: case WorkType.UNDODID:
UndoDid(model, view, currentJob.UUID); UndoDid(model, view, currentJob.UUID);
break; break;
case WorkType.NEWCLIENT: case WorkType.NEWCLIENT:
NewClient(view, (IClientAPI) currentJob.Data1); NewClient(view, (IClientAPI) currentJob.Data1);
break; break;
case WorkType.SIMCHAT: case WorkType.SIMCHAT:
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message); m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message);
SimChat(model, view, (OSChatMessage) currentJob.Data1, channel); SimChat(model, view, (OSChatMessage) currentJob.Data1, channel);
break; break;
default: default:
m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?"); m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?");
break; break;
} }
} }
} }
@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private void NewClient(CMView view, IClientAPI client) private void NewClient(CMView view, IClientAPI client)
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
view.SendMetaEntitiesToNewClient(client); view.SendMetaEntitiesToNewClient(client);
} }
/// <summary> /// <summary>
@ -219,12 +219,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
SceneObjectGroup group = null; SceneObjectGroup group = null;
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
{ {
group = GetGroupByPrim(LocalId); group = GetGroupByPrim(LocalId);
if (group != null) 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) 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) private void ObjectDuplicated(CMModel model, CMView view, uint localId)
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
view.DisplayAuras(model.CheckForNewEntitiesMissingAuras( GetGroupByPrim(localId).Scene )); view.DisplayAuras(model.CheckForNewEntitiesMissingAuras(GetGroupByPrim(localId).Scene));
} }
/// <summary> /// <summary>
@ -244,8 +244,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
{ {
view.RemoveOrUpdateDeletedEntity(group); view.RemoveOrUpdateDeletedEntity(group);
model.RemoveOrUpdateDeletedEntity(group); model.RemoveOrUpdateDeletedEntity(group);
} }
} }
@ -256,8 +256,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) 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)); m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
} }
} }
@ -268,9 +268,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
{ {
ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid); ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid);
if (ent != null) if (ent != null)
view.DisplayEntity(ent); view.DisplayEntity(ent);
} }
} }
@ -328,38 +328,38 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// <summary> /// <summary>
/// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument. /// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
/// </summary> /// </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; int somethingAddedToList = 1;
System.Collections.Generic.List<Scene> newList = new List<Scene>(); System.Collections.Generic.List<Scene> newList = new List<Scene>();
newList.Add(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); newList.Add((Scene) sceneObj);
return newList; return newList;
} }
while(somethingAddedToList > 0) while (somethingAddedToList > 0)
{ {
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); newList.Add((Scene)sceneObj);
somethingAddedToList++; somethingAddedToList++;
} }
} }
} }
} }
foreach(Object sceneObj in sceneList.Values) foreach (Object sceneObj in sceneList.Values)
if (! newList.Contains((Scene)sceneObj)) if (!newList.Contains((Scene)sceneObj))
newList.Add((Scene)sceneObj); newList.Add((Scene)sceneObj);
return newList; return newList;
} }
@ -405,9 +405,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
protected void StopManaging(UUID clientUUID) 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); ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID);
if (presence != null) if (presence != null)
{ {
IClientAPI client = presence.ControllingClient; IClientAPI client = presence.ControllingClient;
@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
client.OnUndo -= OnUnDid; client.OnUndo -= OnUnDid;
//client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation; //client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation;
return; return;
} }
} }
} }
@ -504,22 +504,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
protected void commit(string message, Scene scene, CMModel model, CMView view) 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[] {' '}); string[] args = message.Split(new char[] {' '});
char[] logMessage = {' '}; char[] logMessage = {' '};
if (args.Length > 1) if (args.Length > 1)
{ {
logMessage = new char[message.Length - (args[0].Length)]; logMessage = new char[message.Length - (args[0].Length)];
message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length)); message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length));
} }
m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region."); 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)); model.CommitRegion(currScene, new String(logMessage));
view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName); view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
} }
view.SendSimChatMessage(scene, "Successfully saved all regions."); view.SendSimChatMessage(scene, "Successfully saved all regions.");
@ -527,24 +527,24 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
if ((m_state & State.SHOWING_CHANGES) > 0) //DISPLAY NEW CHANGES INSTEAD OF OLD CHANGES if ((m_state & State.SHOWING_CHANGES) > 0) //DISPLAY NEW CHANGES INSTEAD OF OLD CHANGES
{ {
view.SendSimChatMessage(scene, "Updating differences between new revision and current environment."); view.SendSimChatMessage(scene, "Updating differences between new revision and current environment.");
//Hide objects from users and Forget about them //Hide objects from users and Forget about them
view.HideAllMetaEntities(); view.HideAllMetaEntities();
view.HideAllAuras(); view.HideAllAuras();
model.DeleteAllMetaObjects(); model.DeleteAllMetaObjects();
//Recreate them from backend files //Recreate them from backend files
foreach(Scene currScene in proximitySceneList) foreach (Scene currScene in proximitySceneList)
{ {
model.UpdateCMEntities(currScene); model.UpdateCMEntities(currScene);
view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName); view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
} }
//Display new objects to users1 //Display new objects to users1
view.DisplayRecentChanges(); view.DisplayRecentChanges();
view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE."); view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE.");
m_state &= ~(State.DIRTY); m_state &= ~(State.DIRTY);
m_state |= State.SHOWING_CHANGES; m_state |= State.SHOWING_CHANGES;
} }
} }
@ -553,45 +553,45 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
protected void diffmode(Scene scene, CMModel model, CMView view) 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 if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF
{ {
view.SendSimChatMessage(scene, "Hiding all meta objects."); view.SendSimChatMessage(scene, "Hiding all meta objects.");
view.HideAllMetaEntities(); view.HideAllMetaEntities();
view.HideAllAuras(); view.HideAllAuras();
view.SendSimChatMessage(scene, "Diff-mode = OFF"); view.SendSimChatMessage(scene, "Diff-mode = OFF");
m_state &= ~State.SHOWING_CHANGES; m_state &= ~State.SHOWING_CHANGES;
return; return;
} }
else // TURN ON else // TURN ON
{ {
if ((m_state & State.DIRTY) != 0 || m_state == State.NONE) if ((m_state & State.DIRTY) != 0 || m_state == State.NONE)
{ {
view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision"); view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision");
//Hide objects from users and Forget about them //Hide objects from users and Forget about them
view.HideAllMetaEntities(); view.HideAllMetaEntities();
view.HideAllAuras(); view.HideAllAuras();
model.DeleteAllMetaObjects(); model.DeleteAllMetaObjects();
//Recreate them from backend files //Recreate them from backend files
foreach(Object currScene in m_sceneList.Values) foreach (Object currScene in m_sceneList.Values)
model.UpdateCMEntities((Scene) currScene); model.UpdateCMEntities((Scene) currScene);
} }
else if ((m_state & State.DIRTY) != 0) { else if ((m_state & State.DIRTY) != 0) {
view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision"); view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
foreach(Scene currScene in proximitySceneList) foreach (Scene currScene in proximitySceneList)
model.UpdateCMEntities(currScene); model.UpdateCMEntities(currScene);
} }
view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment"); view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
foreach(Scene currScene in proximitySceneList) foreach (Scene currScene in proximitySceneList)
model.CheckForNewEntitiesMissingAuras(currScene); model.CheckForNewEntitiesMissingAuras(currScene);
view.DisplayRecentChanges(); view.DisplayRecentChanges();
view.SendSimChatMessage(scene, "Diff-mode = ON"); view.SendSimChatMessage(scene, "Diff-mode = ON");
m_state |= State.SHOWING_CHANGES; m_state |= State.SHOWING_CHANGES;
m_state &= ~State.DIRTY; m_state &= ~State.DIRTY;
} }
} }
@ -604,23 +604,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
{ {
view.HideAllAuras(); view.HideAllAuras();
view.HideAllMetaEntities(); view.HideAllMetaEntities();
} }
System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene); System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
foreach(Scene currScene in proximitySceneList) foreach (Scene currScene in proximitySceneList)
model.RollbackRegion(currScene); model.RollbackRegion(currScene);
if ((m_state & State.DIRTY) != 0 ) if ((m_state & State.DIRTY) != 0)
{ {
model.DeleteAllMetaObjects(); model.DeleteAllMetaObjects();
foreach(Scene currScene in proximitySceneList) foreach (Scene currScene in proximitySceneList)
model.UpdateCMEntities(currScene); model.UpdateCMEntities(currScene);
} }
if ((m_state & State.SHOWING_CHANGES) > 0) if ((m_state & State.SHOWING_CHANGES) > 0)
view.DisplayRecentChanges(); view.DisplayRecentChanges();
} }
#endregion Protected Methods #endregion Protected Methods
@ -642,7 +642,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
scene.EventManager.OnNewClient += StartManaging; scene.EventManager.OnNewClient += StartManaging;
scene.EventManager.OnRemovePresence += StopManaging; scene.EventManager.OnRemovePresence += StopManaging;
// scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; // scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted; scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted;
} }
@ -652,9 +652,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public void SimChat(CMModel model, CMView view, OSChatMessage e, int channel) public void SimChat(CMModel model, CMView view, OSChatMessage e, int channel)
{ {
if (e.Channel != channel) if (e.Channel != channel)
return; return;
if (e.Sender == null) if (e.Sender == null)
return; return;
m_log.Debug("[CONTENT MANAGEMENT] Message received: " + e.Message); m_log.Debug("[CONTENT MANAGEMENT] Message received: " + e.Message);
@ -667,31 +667,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
if (!(m_estateModule.IsManager(avatar.UUID))) if (!(m_estateModule.IsManager(avatar.UUID)))
{ {
m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring."); m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring.");
view.SendSimChatMessage(scene, "You must be an estate manager to perform that action."); view.SendSimChatMessage(scene, "You must be an estate manager to perform that action.");
return; return;
} }
switch(args[0]) switch (args[0])
{ {
case "ci": case "ci":
case "commit": case "commit":
commit(message, scene, model, view); commit(message, scene, model, view);
break; break;
case "dm": case "dm":
case "diff-mode": case "diff-mode":
diffmode(scene, model, view); diffmode(scene, model, view);
break; break;
case "rb": case "rb":
case "rollback": case "rollback":
rollback(scene, model, view); rollback(scene, model, view);
break; break;
case "help": case "help":
m_view.DisplayHelpMenu(scene); m_view.DisplayHelpMenu(scene);
break; break;
default: default:
view.SendSimChatMessage(scene, "Command not found: " + args[0]); view.SendSimChatMessage(scene, "Command not found: " + args[0]);
break; break;
} }
} }

View File

@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
#region Fields #region Fields
// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Any ContentManagementEntities that represent old versions of current SceneObjectGroups or // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
// old versions of deleted SceneObjectGroups will be stored in this hash table. // old versions of deleted SceneObjectGroups will be stored in this hash table.
// The UUID keys are from the SceneObjectGroup RootPart UUIDs // The UUID keys are from the SceneObjectGroup RootPart UUIDs
@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public bool AddAura(ContentManagementEntity aura) public bool AddAura(ContentManagementEntity aura)
{ {
if (m_NewlyCreatedEntityAura.ContainsKey(aura.UUID)) if (m_NewlyCreatedEntityAura.ContainsKey(aura.UUID))
return false; return false;
m_NewlyCreatedEntityAura.Add(aura.UUID, aura); m_NewlyCreatedEntityAura.Add(aura.UUID, aura);
return true; return true;
} }
@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public bool AddEntity(ContentManagementEntity ent) public bool AddEntity(ContentManagementEntity ent)
{ {
if (m_CMEntityHash.ContainsKey(ent.UUID)) if (m_CMEntityHash.ContainsKey(ent.UUID))
return false; return false;
m_CMEntityHash.Add(ent.UUID, ent); m_CMEntityHash.Add(ent.UUID, ent);
return true; return true;
} }
@ -115,23 +115,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
System.Collections.ArrayList missingList = new System.Collections.ArrayList(); System.Collections.ArrayList missingList = new System.Collections.ArrayList();
SceneObjectGroup temp = null; SceneObjectGroup temp = null;
foreach( EntityBase currObj in currList ) foreach (EntityBase currObj in currList)
{ {
if (! (currObj is SceneObjectGroup)) if (!(currObj is SceneObjectGroup))
continue; continue;
temp = (SceneObjectGroup) currObj; temp = (SceneObjectGroup) currObj;
if (m_CMEntityHash.ContainsKey(temp.UUID)) 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)) if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
missingList.Add(part); missingList.Add(part);
} }
else //Entire group is missing from revision. (and is a new part in region) 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); missingList.Add(part);
} }
} }
return missingList; return missingList;
} }
@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
ContentManagementEntity ent = new ContentManagementEntity(xml, scene, false); ContentManagementEntity ent = new ContentManagementEntity(xml, scene, false);
if (ent == null) if (ent == null)
return null; return null;
m_CMEntityHash.Add(ent.UnchangedEntity.UUID, ent); m_CMEntityHash.Add(ent.UnchangedEntity.UUID, ent);
return ent; return ent;
} }
@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public bool RemoveEntity(UUID uuid) public bool RemoveEntity(UUID uuid)
{ {
if (!m_CMEntityHash.ContainsKey(uuid)) if (!m_CMEntityHash.ContainsKey(uuid))
return false; return false;
m_CMEntityHash.Remove(uuid); m_CMEntityHash.Remove(uuid);
return true; return true;
} }
@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public bool RemoveNewlyCreatedEntityAura(UUID uuid) public bool RemoveNewlyCreatedEntityAura(UUID uuid)
{ {
if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
return false; return false;
m_NewlyCreatedEntityAura.Remove(uuid); m_NewlyCreatedEntityAura.Remove(uuid);
return true; return true;
} }

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

View File

@ -78,46 +78,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
// Auras To // Auras To
public void DisplayAuras(CMEntityCollection auraCollection) public void DisplayAuras(CMEntityCollection auraCollection)
{ {
foreach( Object ent in auraCollection.Auras.Values) foreach (Object ent in auraCollection.Auras.Values)
((AuraMetaEntity)ent).SendFullUpdateToAll(); ((AuraMetaEntity)ent).SendFullUpdateToAll();
} }
// Auras To Client // Auras To Client
public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI 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); ((AuraMetaEntity)ent).SendFullUpdate(client);
} }
// Auras from List To ALL // Auras from List To ALL
public void DisplayAuras(ArrayList list) 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"); m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
((AuraMetaEntity)ent).SendFullUpdateToAll(); ((AuraMetaEntity)ent).SendFullUpdateToAll();
} }
} }
// Entities to ALL // Entities to ALL
public void DisplayEntities(CMEntityCollection entityCollection) public void DisplayEntities(CMEntityCollection entityCollection)
{ {
foreach( Object ent in entityCollection.Entities.Values) foreach (Object ent in entityCollection.Entities.Values)
((ContentManagementEntity)ent).SendFullDiffUpdateToAll(); ((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
} }
// Entities to Client // Entities to Client
public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI 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); ((ContentManagementEntity)ent).SendFullDiffUpdate(client);
} }
// Entities from List to ALL // Entities from List to ALL
public void DisplayEntities(ArrayList list) public void DisplayEntities(ArrayList list)
{ {
foreach( Object ent in list) foreach (Object ent in list)
((ContentManagementEntity)ent).SendFullDiffUpdateToAll(); ((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
} }
// Entity to ALL // Entity to ALL
@ -138,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
if (group != null) if (group != null)
group.SendFullDiffUpdateToAll(); group.SendFullDiffUpdateToAll();
} }
/// <summary> /// <summary>
@ -158,14 +158,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public void HideAllAuras() public void HideAllAuras()
{ {
foreach(Object obj in m_model.MetaEntityCollection.Auras.Values) foreach (Object obj in m_model.MetaEntityCollection.Auras.Values)
((MetaEntity)obj).HideFromAll(); ((MetaEntity)obj).HideFromAll();
} }
public void HideAllMetaEntities() public void HideAllMetaEntities()
{ {
foreach(Object obj in m_model.MetaEntityCollection.Entities.Values) foreach (Object obj in m_model.MetaEntityCollection.Entities.Values)
((ContentManagementEntity)obj).HideFromAll(); ((ContentManagementEntity)obj).HideFromAll();
} }
public void Initialise(CMModel model) public void Initialise(CMModel model)
@ -183,12 +183,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
// Deal with revisioned parts that have been deleted. // Deal with revisioned parts that have been deleted.
if (m_model.MetaEntityCollection.Entities.ContainsKey(group.UUID)) if (m_model.MetaEntityCollection.Entities.ContainsKey(group.UUID))
((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll(); ((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll();
// Deal with new parts not revisioned that have been deleted. // 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)) if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll(); ((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
} }
public void SendMetaEntitiesToNewClient(IClientAPI client) public void SendMetaEntitiesToNewClient(IClientAPI client)

View File

@ -104,13 +104,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
#region Private Methods #region Private Methods
/// <summary> /// <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> /// </summary>
private bool ContainsKey(List<EntityBase> list, UUID uuid) private bool ContainsKey(List<EntityBase> list, UUID uuid)
{ {
foreach( EntityBase part in list) foreach (EntityBase part in list)
if (part.UUID == uuid) if (part.UUID == uuid)
return true; return true;
return false; return false;
} }
@ -118,9 +118,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
foreach (EntityBase ent in list) foreach (EntityBase ent in list)
{ {
if (ent is SceneObjectGroup) if (ent is SceneObjectGroup)
if (ent.UUID == uuid) if (ent.UUID == uuid)
return (SceneObjectGroup)ent; return (SceneObjectGroup)ent;
} }
return null; return null;
} }
@ -138,49 +138,49 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities(); System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
DiffersFromSceneGroup = false; DiffersFromSceneGroup = false;
// if group is not contained in scene's list // 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 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 already displaying a red aura over part, make sure its red
if (m_AuraEntities.ContainsKey(part.UUID)) if (m_AuraEntities.ContainsKey(part.UUID))
{ {
m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale); m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
} }
else else
{ {
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
m_Entity.Scene.PrimIDAllocate(), m_Entity.Scene.PrimIDAllocate(),
part.GetWorldPosition(), part.GetWorldPosition(),
MetaEntity.TRANSLUCENT, MetaEntity.TRANSLUCENT,
new Vector3(254,0,0), new Vector3(254,0,0),
part.Scale part.Scale
); );
m_AuraEntities.Add(part.UUID, auraGroup); m_AuraEntities.Add(part.UUID, auraGroup);
} }
SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum); SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum);
SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT); SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT);
} }
// otherwise, scene will not contain the part. note: a group can not remove a part without changing group id // otherwise, scene will not contain the part. note: a group can not remove a part without changing group id
} }
// a deleted part has no where to point a beam particle system, // a deleted part has no where to point a beam particle system,
// if a metapart had a particle system (maybe it represented a moved part) remove it // if a metapart had a particle system (maybe it represented a moved part) remove it
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
{ {
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
} }
DiffersFromSceneGroup = true; DiffersFromSceneGroup = true;
} }
// if scene list does contain group, compare each part in group for differences and display beams and auras appropriately // if scene list does contain group, compare each part in group for differences and display beams and auras appropriately
else else
{ {
MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID)); MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID));
} }
} }
@ -190,7 +190,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public bool HasChildPrim(UUID uuid) public bool HasChildPrim(UUID uuid)
{ {
if (m_UnchangedEntity.Children.ContainsKey(uuid)) if (m_UnchangedEntity.Children.ContainsKey(uuid))
return true; return true;
return false; return false;
} }
@ -199,28 +199,28 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
public bool HasChildPrim(uint localID) public bool HasChildPrim(uint localID)
{ {
foreach( SceneObjectPart part in m_UnchangedEntity.Children.Values) foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
if ( part.LocalId == localID ) if (part.LocalId == localID)
return true; return true;
return false; return false;
} }
public override void Hide(IClientAPI client) public override void Hide(IClientAPI client)
{ {
base.Hide(client); base.Hide(client);
foreach(MetaEntity group in m_AuraEntities.Values) foreach (MetaEntity group in m_AuraEntities.Values)
group.Hide(client); group.Hide(client);
foreach(MetaEntity group in m_BeamEntities.Values) foreach (MetaEntity group in m_BeamEntities.Values)
group.Hide(client); group.Hide(client);
} }
public override void HideFromAll() public override void HideFromAll()
{ {
base.HideFromAll(); base.HideFromAll();
foreach(MetaEntity group in m_AuraEntities.Values) foreach (MetaEntity group in m_AuraEntities.Values)
group.HideFromAll(); group.HideFromAll();
foreach(MetaEntity group in m_BeamEntities.Values) foreach (MetaEntity group in m_BeamEntities.Values)
group.HideFromAll(); group.HideFromAll();
} }
/// <summary> /// <summary>
@ -237,89 +237,89 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
// Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user // Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
// had originally saved. // had originally saved.
// m_Entity will NOT necessarily be the same entity as the user had 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. //This is the part that we use to show changes.
metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum); metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID)) if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID))
{ {
sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID]; sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID];
differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart); differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart);
if (differences != Diff.NONE) if (differences != Diff.NONE)
metaEntityPart.Text = "CHANGE: " + differences.ToString(); metaEntityPart.Text = "CHANGE: " + differences.ToString();
if (differences != 0) if (differences != 0)
{ {
// Root Part that has been modified // Root Part that has been modified
if ((differences&Diff.POSITION) > 0) if ((differences&Diff.POSITION) > 0)
{ {
// If the position of any part has changed, make sure the RootPart of the // If the position of any part has changed, make sure the RootPart of the
// meta entity is pointing with a beam particle system // meta entity is pointing with a beam particle system
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
{ {
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
} }
BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene, BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
m_Entity.Scene.PrimIDAllocate(), m_Entity.Scene.PrimIDAllocate(),
m_UnchangedEntity.RootPart.GetWorldPosition(), m_UnchangedEntity.RootPart.GetWorldPosition(),
MetaEntity.TRANSLUCENT, MetaEntity.TRANSLUCENT,
sceneEntityPart, sceneEntityPart,
new Vector3(0,0,254) new Vector3(0,0,254)
); );
m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
} }
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
{ {
m_AuraEntities[UnchangedPart.UUID].HideFromAll(); m_AuraEntities[UnchangedPart.UUID].HideFromAll();
m_AuraEntities.Remove(UnchangedPart.UUID); m_AuraEntities.Remove(UnchangedPart.UUID);
} }
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
m_Entity.Scene.PrimIDAllocate(), m_Entity.Scene.PrimIDAllocate(),
UnchangedPart.GetWorldPosition(), UnchangedPart.GetWorldPosition(),
MetaEntity.TRANSLUCENT, MetaEntity.TRANSLUCENT,
new Vector3(0,0,254), new Vector3(0,0,254),
UnchangedPart.Scale UnchangedPart.Scale
); );
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT); SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
DiffersFromSceneGroup = true; DiffersFromSceneGroup = true;
} }
else // no differences between scene part and meta part else // no differences between scene part and meta part
{ {
if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
{ {
m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
} }
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
{ {
m_AuraEntities[UnchangedPart.UUID].HideFromAll(); m_AuraEntities[UnchangedPart.UUID].HideFromAll();
m_AuraEntities.Remove(UnchangedPart.UUID); m_AuraEntities.Remove(UnchangedPart.UUID);
} }
SetPartTransparency(metaEntityPart, MetaEntity.NONE); SetPartTransparency(metaEntityPart, MetaEntity.NONE);
} }
} }
else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted. else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted.
{ {
if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
{ {
m_AuraEntities[UnchangedPart.UUID].HideFromAll(); m_AuraEntities[UnchangedPart.UUID].HideFromAll();
m_AuraEntities.Remove(UnchangedPart.UUID); m_AuraEntities.Remove(UnchangedPart.UUID);
} }
AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
m_Entity.Scene.PrimIDAllocate(), m_Entity.Scene.PrimIDAllocate(),
UnchangedPart.GetWorldPosition(), UnchangedPart.GetWorldPosition(),
MetaEntity.TRANSLUCENT, MetaEntity.TRANSLUCENT,
new Vector3(254,0,0), new Vector3(254,0,0),
UnchangedPart.Scale UnchangedPart.Scale
); );
m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT); SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
DiffersFromSceneGroup = true; DiffersFromSceneGroup = true;
} }
} }
return changed; return changed;
} }
@ -328,8 +328,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
foreach(AuraMetaEntity group in m_AuraEntities.Values) foreach (AuraMetaEntity group in m_AuraEntities.Values)
group.SendFullUpdate(client); group.SendFullUpdate(client);
} }
} }
@ -337,8 +337,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
foreach(AuraMetaEntity group in m_AuraEntities.Values) foreach (AuraMetaEntity group in m_AuraEntities.Values)
group.SendFullUpdateToAll(); group.SendFullUpdateToAll();
} }
} }
@ -346,8 +346,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
foreach(BeamMetaEntity group in m_BeamEntities.Values) foreach (BeamMetaEntity group in m_BeamEntities.Values)
group.SendFullUpdate(client); group.SendFullUpdate(client);
} }
} }
@ -355,8 +355,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
foreach(BeamMetaEntity group in m_BeamEntities.Values) foreach (BeamMetaEntity group in m_BeamEntities.Values)
group.SendFullUpdateToAll(); group.SendFullUpdateToAll();
} }
} }
@ -365,9 +365,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
FindDifferences(); FindDifferences();
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
SendFullUpdate(client); SendFullUpdate(client);
SendFullAuraUpdate(client); SendFullAuraUpdate(client);
SendFullBeamUpdate(client); SendFullBeamUpdate(client);
} }
} }
@ -376,9 +376,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
FindDifferences(); FindDifferences();
if (DiffersFromSceneGroup) if (DiffersFromSceneGroup)
{ {
SendFullUpdateToAll(); SendFullUpdateToAll();
SendFullAuraUpdateToAll(); SendFullAuraUpdateToAll();
SendFullBeamUpdateToAll(); SendFullBeamUpdateToAll();
} }
} }

View File

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

View File

@ -88,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
string scenedir; string scenedir;
if (!Directory.Exists(m_repodir)) if (!Directory.Exists(m_repodir))
Directory.CreateDirectory(m_repodir); Directory.CreateDirectory(m_repodir);
foreach (UUID region in m_scenes.Keys) foreach (UUID region in m_scenes.Keys)
{ {
scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
if (!Directory.Exists(scenedir)) if (!Directory.Exists(scenedir))
Directory.CreateDirectory(scenedir); Directory.CreateDirectory(scenedir);
} }
} }
@ -102,10 +102,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private void SetupSerialiser() private void SetupSerialiser()
{ {
if (m_serialiser.Count == 0) if (m_serialiser.Count == 0)
foreach(UUID region in m_scenes.Keys) {
m_serialiser.Add(region, foreach (UUID region in m_scenes.Keys)
m_scenes[region].RequestModuleInterface<IRegionSerialiser>() {
); m_serialiser.Add(region,
m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
);
}
}
} }
#endregion Private Methods #endregion Private Methods
@ -120,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public string GetRegionObjectHeightMap(UUID regionid) public string GetRegionObjectHeightMap(UUID regionid)
{ {
String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
Slash.DirectorySeparatorChar + "heightmap.r32"; Slash.DirectorySeparatorChar + "heightmap.r32";
FileStream fs = new FileStream( filename, FileMode.Open); FileStream fs = new FileStream( filename, FileMode.Open);
StreamReader sr = new StreamReader(fs); StreamReader sr = new StreamReader(fs);
String result = sr.ReadToEnd(); String result = sr.ReadToEnd();
@ -132,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
public string GetRegionObjectHeightMap(UUID regionid, int revision) public string GetRegionObjectHeightMap(UUID regionid, int revision)
{ {
String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
Slash.DirectorySeparatorChar + "heightmap.r32"; Slash.DirectorySeparatorChar + "heightmap.r32";
FileStream fs = new FileStream( filename, FileMode.Open); FileStream fs = new FileStream( filename, FileMode.Open);
StreamReader sr = new StreamReader(fs); StreamReader sr = new StreamReader(fs);
String result = sr.ReadToEnd(); String result = sr.ReadToEnd();
@ -145,13 +149,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
System.Collections.ArrayList objectList = new System.Collections.ArrayList(); System.Collections.ArrayList objectList = new System.Collections.ArrayList();
string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
+ revision + Slash.DirectorySeparatorChar + "objects.xml"; + revision + Slash.DirectorySeparatorChar + "objects.xml";
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
XmlNode rootNode; XmlNode rootNode;
//int primCount = 0; //int primCount = 0;
//SceneObjectGroup obj = null; //SceneObjectGroup obj = null;
if(File.Exists(filename)) if (File.Exists(filename))
{ {
XmlTextReader reader = new XmlTextReader(filename); XmlTextReader reader = new XmlTextReader(filename);
reader.WhitespaceHandling = WhitespaceHandling.None; reader.WhitespaceHandling = WhitespaceHandling.None;
@ -160,9 +164,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
rootNode = doc.FirstChild; rootNode = doc.FirstChild;
foreach (XmlNode aPrimNode in rootNode.ChildNodes) foreach (XmlNode aPrimNode in rootNode.ChildNodes)
{ {
objectList.Add(aPrimNode.OuterXml); objectList.Add(aPrimNode.OuterXml);
} }
return objectList; return objectList;
} }
return null; return null;
} }
@ -173,16 +177,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
m_log.Info("[FSDB]: found revisions:" + revision); m_log.Info("[FSDB]: found revisions:" + revision);
System.Collections.ArrayList xmlList = new System.Collections.ArrayList(); System.Collections.ArrayList xmlList = new System.Collections.ArrayList();
string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
+ revision + Slash.DirectorySeparatorChar + "objects.xml"; + revision + Slash.DirectorySeparatorChar + "objects.xml";
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
XmlNode rootNode; XmlNode rootNode;
m_log.Info("[FSDB]: Checking if " + filename + " exists."); m_log.Info("[FSDB]: Checking if " + filename + " exists.");
if(File.Exists(filename)) if (File.Exists(filename))
{ {
Stopwatch x = new Stopwatch(); Stopwatch x = new Stopwatch();
x.Start(); x.Start();
XmlTextReader reader = new XmlTextReader(filename); XmlTextReader reader = new XmlTextReader(filename);
reader.WhitespaceHandling = WhitespaceHandling.None; reader.WhitespaceHandling = WhitespaceHandling.None;
@ -191,26 +194,28 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
rootNode = doc.FirstChild; rootNode = doc.FirstChild;
foreach (XmlNode aPrimNode in rootNode.ChildNodes) foreach (XmlNode aPrimNode in rootNode.ChildNodes)
xmlList.Add(aPrimNode.OuterXml); {
xmlList.Add(aPrimNode.OuterXml);
}
x.Stop(); x.Stop();
TimeToDownload += x.ElapsedMilliseconds; TimeToDownload += x.ElapsedMilliseconds;
m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload); m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload);
return xmlList; return xmlList;
} }
return null; return null;
} }
public void Initialise(Scene scene, string dir) public void Initialise(Scene scene, string dir)
{ {
lock(this) lock (this)
{ {
if (m_repodir == null) if (m_repodir == null)
m_repodir = dir; m_repodir = dir;
} }
lock(m_scenes) lock (m_scenes)
m_scenes.Add(scene.RegionInfo.RegionID, scene); m_scenes.Add(scene.RegionInfo.RegionID, scene);
} }
public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid) public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
@ -224,19 +229,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
StreamReader sr = null; StreamReader sr = null;
String logMessage = ""; String logMessage = "";
String logLocation = ""; 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); logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
sr = new StreamReader(fs); fs = new FileStream( logLocation, FileMode.Open);
logMessage = sr.ReadToEnd(); sr = new StreamReader(fs);
sr.Close(); logMessage = sr.ReadToEnd();
fs.Close(); sr.Close();
revisionDict.Add(revisionDir, logMessage); fs.Close();
} revisionDict.Add(revisionDir, logMessage);
catch (Exception) }
{} catch (Exception)
{
}
} }
return revisionDict; return revisionDict;
@ -255,8 +262,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
SetupSerialiser(); SetupSerialiser();
m_log.Info("[FSDB]: Creating repository in " + m_repodir + "."); m_log.Info("[FSDB]: Creating repository in " + m_repodir + ".");
CreateDirectory(); CreateDirectory();
} }
public void SaveRegion(UUID regionid, string regionName, string logMessage) public void SaveRegion(UUID regionid, string regionName, string logMessage)
@ -266,44 +273,44 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
m_log.Info("[FSDB]: checking if scene directory exists: " + scenedir); m_log.Info("[FSDB]: checking if scene directory exists: " + scenedir);
if (!Directory.Exists(scenedir)) if (!Directory.Exists(scenedir))
Directory.CreateDirectory(scenedir); Directory.CreateDirectory(scenedir);
int newRevisionNum = GetMostRecentRevision(regionid)+1; int newRevisionNum = GetMostRecentRevision(regionid)+1;
string revisiondir = scenedir + newRevisionNum + Slash.DirectorySeparatorChar; string revisiondir = scenedir + newRevisionNum + Slash.DirectorySeparatorChar;
m_log.Info("[FSDB]: checking if revision directory exists: " + revisiondir); m_log.Info("[FSDB]: checking if revision directory exists: " + revisiondir);
if (!Directory.Exists(revisiondir)) if (!Directory.Exists(revisiondir))
Directory.CreateDirectory(revisiondir); Directory.CreateDirectory(revisiondir);
try { try {
Stopwatch x = new Stopwatch(); Stopwatch x = new Stopwatch();
x.Start(); x.Start();
if (m_scenes.ContainsKey(regionid)) if (m_scenes.ContainsKey(regionid))
{ {
m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir); m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir);
} }
x.Stop(); x.Stop();
TimeToSave += x.ElapsedMilliseconds; TimeToSave += x.ElapsedMilliseconds;
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds); m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds);
m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave); m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave);
} }
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e); m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e);
return; return;
} }
try { try {
// Finish by writing log message. // Finish by writing log message.
FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite); FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite);
StreamWriter sw = new StreamWriter(file); StreamWriter sw = new StreamWriter(file);
sw.Write(logMessage); sw.Write(logMessage);
sw.Close(); sw.Close();
} }
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e); m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e);
return; return;
} }
} }

View File

@ -160,15 +160,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
{ {
//make new uuids //make new uuids
Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>(); 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); part.ResetIDs(part.LinkNum);
parts.Add(part.UUID, part); parts.Add(part.UUID, part);
} }
// make new localids // make new localids
foreach (SceneObjectPart part in m_Entity.Children.Values) foreach (SceneObjectPart part in m_Entity.Children.Values)
part.LocalId = m_Entity.Scene.PrimIDAllocate(); part.LocalId = m_Entity.Scene.PrimIDAllocate();
//finalize //finalize
m_Entity.UpdateParentIDs(); m_Entity.UpdateParentIDs();
@ -188,8 +188,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
//This deletes the group without removing from any databases. //This deletes the group without removing from any databases.
//This is important because we are not IN any database. //This is important because we are not IN any database.
//m_Entity.FakeDeleteGroup(); //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); client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
} }
/// <summary> /// <summary>
@ -197,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
/// </summary> /// </summary>
public virtual void HideFromAll() 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) m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
{ controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
); );
} }
public void SendFullUpdate(IClientAPI client) public void SendFullUpdate(IClientAPI client)
@ -239,40 +239,40 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
Color4 texcolor; Color4 texcolor;
try try
{ {
tex = part.Shape.Textures; tex = part.Shape.Textures;
texcolor = new Color4(); texcolor = new Color4();
} }
catch(Exception) catch(Exception)
{ {
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e); //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e);
return; return;
} }
for (uint i = 0; i < tex.FaceTextures.Length; i++) for (uint i = 0; i < tex.FaceTextures.Length; i++)
{ {
try { try {
if (tex.FaceTextures[i] != null) if (tex.FaceTextures[i] != null)
{ {
texcolor = tex.FaceTextures[i].RGBA; texcolor = tex.FaceTextures[i].RGBA;
texcolor.A = transparencyAmount; texcolor.A = transparencyAmount;
tex.FaceTextures[i].RGBA = texcolor; tex.FaceTextures[i].RGBA = texcolor;
} }
} }
catch (Exception) catch (Exception)
{ {
//m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e); //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e);
continue; continue;
} }
} }
try { try {
texcolor = tex.DefaultTexture.RGBA; texcolor = tex.DefaultTexture.RGBA;
texcolor.A = transparencyAmount; texcolor.A = transparencyAmount;
tex.DefaultTexture.RGBA = texcolor; tex.DefaultTexture.RGBA = texcolor;
part.Shape.TextureEntry = tex.ToBytes(); part.Shape.TextureEntry = tex.ToBytes();
} }
catch (Exception) catch (Exception)
{ {
//m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e); //m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e);
} }
} }

View File

@ -106,13 +106,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private static bool AreVectorsEquivalent(Vector3 first, Vector3 second) 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.Y, 2) == TruncateSignificant(second.Y, 2)
&& TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2) && TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
) )
return true; return true;
else else
return false; return false;
} }
// Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
private static int TruncateSignificant(float num, int digits) private static int TruncateSignificant(float num, int digits)
{ {
return (int) Math.Ceiling((Math.Truncate(num * 10 * digits)/10*digits)); return (int) Math.Ceiling((Math.Truncate(num * 10 * digits)/10*digits));
// return (int) ((num * (10*digits))/10*digits); // return (int) ((num * (10*digits))/10*digits);
} }
// Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@ -164,47 +164,47 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
Diff result = 0; Diff result = 0;
// VECTOR COMPARISONS // VECTOR COMPARISONS
if(! AreVectorsEquivalent(first.Acceleration, second.Acceleration)) if (!AreVectorsEquivalent(first.Acceleration, second.Acceleration))
result |= Diff.ACCELERATION; result |= Diff.ACCELERATION;
if(! AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition)) if (!AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
result |= Diff.POSITION; result |= Diff.POSITION;
if(! AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity)) if (!AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
result |= Diff.ANGULARVELOCITY; result |= Diff.ANGULARVELOCITY;
if(! AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition)) if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
result |= Diff.OFFSETPOSITION; result |= Diff.OFFSETPOSITION;
if(! AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity)) if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
result |= Diff.ROTATIONALVELOCITY; result |= Diff.ROTATIONALVELOCITY;
if(! AreVectorsEquivalent(first.Scale, second.Scale)) if (!AreVectorsEquivalent(first.Scale, second.Scale))
result |= Diff.SCALE; result |= Diff.SCALE;
if(! AreVectorsEquivalent(first.Velocity, second.Velocity)) if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
result |= Diff.VELOCITY; result |= Diff.VELOCITY;
// QUATERNION COMPARISONS // QUATERNION COMPARISONS
if(! AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset)) if (!AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
result |= Diff.ROTATIONOFFSET; result |= Diff.ROTATIONOFFSET;
// MISC COMPARISONS (UUID, Byte) // MISC COMPARISONS (UUID, Byte)
if(first.ClickAction != second.ClickAction) if (first.ClickAction != second.ClickAction)
result |= Diff.CLICKACTION; result |= Diff.CLICKACTION;
if(first.ObjectOwner != second.ObjectOwner) if (first.ObjectOwner != second.ObjectOwner)
result |= Diff.OBJECTOWNER; result |= Diff.OBJECTOWNER;
// STRING COMPARISONS // STRING COMPARISONS
if(first.Description != second.Description) if (first.Description != second.Description)
result |= Diff.DESCRIPTION; result |= Diff.DESCRIPTION;
if(first.Material != second.Material) if (first.Material != second.Material)
result |= Diff.MATERIAL; result |= Diff.MATERIAL;
if(first.Name != second.Name) if (first.Name != second.Name)
result |= Diff.NAME; result |= Diff.NAME;
if(first.SitName != second.SitName) if (first.SitName != second.SitName)
result |= Diff.SITNAME; result |= Diff.SITNAME;
if(first.Text != second.Text) if (first.Text != second.Text)
result |= Diff.TEXT; result |= Diff.TEXT;
if(first.TouchName != second.TouchName) if (first.TouchName != second.TouchName)
result |= Diff.TOUCHNAME; result |= Diff.TOUCHNAME;
x.Stop(); x.Stop();
TimeToDiff += x.ElapsedMilliseconds; TimeToDiff += x.ElapsedMilliseconds;

View File

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

View File

@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
get { return 0; } get { return 0; }
} }
public ulong GetGroupPowers(UUID groupID) public ulong GetGroupPowers(UUID groupID)
{ {
return 0; return 0;
} }
public virtual int NextAnimationSequenceNumber public virtual int NextAnimationSequenceNumber
{ {

View File

@ -287,10 +287,10 @@ namespace OpenSim.Region.Examples.SimpleModule
get { return 0; } get { return 0; }
} }
public ulong GetGroupPowers(UUID groupID) public ulong GetGroupPowers(UUID groupID)
{ {
return 0; return 0;
} }
public virtual int NextAnimationSequenceNumber public virtual int NextAnimationSequenceNumber
{ {

View File

@ -87,71 +87,71 @@ namespace OpenSim.Region.Physics.Meshing
//[1.0f, 1.0f, -2.4492127076447545e-016f]]; //[1.0f, 1.0f, -2.4492127076447545e-016f]];
/* /*
angles3 = [ angles3 = [
[0.0, 1.0, 0.0], [0.0, 1.0, 0.0],
[0.33333333333333331, -0.49999999999999978, 0.86602540378443871], [0.33333333333333331, -0.49999999999999978, 0.86602540378443871],
[0.66666666666666663, -0.50000000000000044, -0.86602540378443837], [0.66666666666666663, -0.50000000000000044, -0.86602540378443837],
[1.0, 1.0, -2.4492127076447545e-016]] [1.0, 1.0, -2.4492127076447545e-016]]
angles4 = [ angles4 = [
[0.0, 1.0, 0.0], [0.0, 1.0, 0.0],
[0.25, 0.0, 1.0], [0.25, 0.0, 1.0],
[0.5, -1.0, 0.0], [0.5, -1.0, 0.0],
[0.75, 0.0, -1.0], [0.75, 0.0, -1.0],
[1.0, 1.0, 0.0]] [1.0, 1.0, 0.0]]
angles24 = [ angles24 = [
[0.0, 0.5, 0.0], [0.0, 0.5, 0.0],
[0.041666666666666664, 0.48296291314453416, 0.12940952255126037], [0.041666666666666664, 0.48296291314453416, 0.12940952255126037],
[0.083333333333333329, 0.43301270189221935, 0.25], [0.083333333333333329, 0.43301270189221935, 0.25],
[0.125, 0.35355339059327379, 0.35355339059327373], [0.125, 0.35355339059327379, 0.35355339059327373],
[0.16666666666666666, 0.25, 0.4330127018922193], [0.16666666666666666, 0.25, 0.4330127018922193],
[0.20833333333333331, 0.12940952255126048, 0.4829629131445341], [0.20833333333333331, 0.12940952255126048, 0.4829629131445341],
[0.25, 0.0, 0.5], [0.25, 0.0, 0.5],
[0.29166666666666663, -0.12940952255126031, 0.48296291314453416], [0.29166666666666663, -0.12940952255126031, 0.48296291314453416],
[0.33333333333333331, -0.25, 0.43301270189221935], [0.33333333333333331, -0.25, 0.43301270189221935],
[0.375, -0.35355339059327373, 0.35355339059327379], [0.375, -0.35355339059327373, 0.35355339059327379],
[0.41666666666666663, -0.43301270189221924, 0.25], [0.41666666666666663, -0.43301270189221924, 0.25],
[0.45833333333333331, -0.4829629131445341, 0.12940952255126051], [0.45833333333333331, -0.4829629131445341, 0.12940952255126051],
[0.5, -0.5, 0.0], [0.5, -0.5, 0.0],
[0.54166666666666663, -0.48296291314453421, -0.12940952255126018], [0.54166666666666663, -0.48296291314453421, -0.12940952255126018],
[0.58333333333333326, -0.43301270189221941, -0.25], [0.58333333333333326, -0.43301270189221941, -0.25],
[0.62499999999999989, -0.35355339059327395, -0.35355339059327356], [0.62499999999999989, -0.35355339059327395, -0.35355339059327356],
[0.66666666666666663, -0.25, -0.43301270189221919], [0.66666666666666663, -0.25, -0.43301270189221919],
[0.70833333333333326, -0.12940952255126076, -0.48296291314453405], [0.70833333333333326, -0.12940952255126076, -0.48296291314453405],
[0.75, 0.0, -0.5], [0.75, 0.0, -0.5],
[0.79166666666666663, 0.12940952255126015, -0.48296291314453421], [0.79166666666666663, 0.12940952255126015, -0.48296291314453421],
[0.83333333333333326, 0.25, -0.43301270189221952], [0.83333333333333326, 0.25, -0.43301270189221952],
[0.875, 0.35355339059327368, -0.35355339059327384], [0.875, 0.35355339059327368, -0.35355339059327384],
[0.91666666666666663, 0.43301270189221919, -0.25], [0.91666666666666663, 0.43301270189221919, -0.25],
[0.95833333333333326, 0.48296291314453405, -0.12940952255126079], [0.95833333333333326, 0.48296291314453405, -0.12940952255126079],
[1.0, 0.5, 0.0]] [1.0, 0.5, 0.0]]
angles24 = [ angles24 = [
[0.0, 1.0, 0.0], [0.0, 1.0, 0.0],
[0.041666666666666664, 0.96592582628906831, 0.25881904510252074], [0.041666666666666664, 0.96592582628906831, 0.25881904510252074],
[0.083333333333333329, 0.86602540378443871, 0.5], [0.083333333333333329, 0.86602540378443871, 0.5],
[0.125, 0.70710678118654757, 0.70710678118654746], [0.125, 0.70710678118654757, 0.70710678118654746],
[0.16666666666666667, 0.5, 0.8660254037844386], [0.16666666666666667, 0.5, 0.8660254037844386],
[0.20833333333333331, 0.25881904510252096, 0.9659258262890682], [0.20833333333333331, 0.25881904510252096, 0.9659258262890682],
[0.25, 6.1230317691118863e-017, 1.0], [0.25, 6.1230317691118863e-017, 1.0],
[0.29166666666666663, -0.25881904510252063, 0.96592582628906831], [0.29166666666666663, -0.25881904510252063, 0.96592582628906831],
[0.33333333333333333, -0.5, 0.86602540378443871], [0.33333333333333333, -0.5, 0.86602540378443871],
[0.375, -0.70710678118654746, 0.70710678118654757], [0.375, -0.70710678118654746, 0.70710678118654757],
[0.41666666666666663, -0.86602540378443849, 0.5], [0.41666666666666663, -0.86602540378443849, 0.5],
[0.45833333333333331, -0.9659258262890682, 0.25881904510252102], [0.45833333333333331, -0.9659258262890682, 0.25881904510252102],
[0.5, -1.0, 1.2246063538223773e-016], [0.5, -1.0, 1.2246063538223773e-016],
[0.54166666666666663, -0.96592582628906842, -0.25881904510252035], [0.54166666666666663, -0.96592582628906842, -0.25881904510252035],
[0.58333333333333326, -0.86602540378443882, -0.5], [0.58333333333333326, -0.86602540378443882, -0.5],
[0.62499999999999989, -0.70710678118654791, -0.70710678118654713], [0.62499999999999989, -0.70710678118654791, -0.70710678118654713],
[0.66666666666666667, -0.5, -0.86602540378443837], [0.66666666666666667, -0.5, -0.86602540378443837],
[0.70833333333333326, -0.25881904510252152, -0.96592582628906809], [0.70833333333333326, -0.25881904510252152, -0.96592582628906809],
[0.75, -1.8369095307335659e-016, -1.0], [0.75, -1.8369095307335659e-016, -1.0],
[0.79166666666666663, 0.2588190451025203, -0.96592582628906842], [0.79166666666666663, 0.2588190451025203, -0.96592582628906842],
[0.83333333333333326, 0.5, -0.86602540378443904], [0.83333333333333326, 0.5, -0.86602540378443904],
[0.875, 0.70710678118654735, -0.70710678118654768], [0.875, 0.70710678118654735, -0.70710678118654768],
[0.91666666666666663, 0.86602540378443837, -0.5], [0.91666666666666663, 0.86602540378443837, -0.5],
[0.95833333333333326, 0.96592582628906809, -0.25881904510252157], [0.95833333333333326, 0.96592582628906809, -0.25881904510252157],
[1.0, 1.0, -2.4492127076447545e-016]] [1.0, 1.0, -2.4492127076447545e-016]]
*/ */
@ -161,10 +161,10 @@ angles24 = [
private Angle[] angles3 = private Angle[] angles3 =
{ {
new Angle(0.0f, 1.0f, 0.0f), new Angle(0.0f, 1.0f, 0.0f),
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f), new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f), new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
new Angle(1.0f, 1.0f, 0.0f) new Angle(1.0f, 1.0f, 0.0f)
}; };
private Angle[] angles4 = private Angle[] angles4 =
@ -179,30 +179,30 @@ angles24 = [
private Angle[] angles24 = private Angle[] angles24 =
{ {
new Angle(0.0f, 1.0f, 0.0f), new Angle(0.0f, 1.0f, 0.0f),
new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f), new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f),
new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f), new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f),
new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f), new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f),
new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f), new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f),
new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f), new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f),
new Angle(0.25f, 0.0f, 1.0f), new Angle(0.25f, 0.0f, 1.0f),
new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f), new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f),
new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f), new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f), new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f),
new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f), new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f),
new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f), new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f),
new Angle(0.5f, -1.0f, 0.0f), new Angle(0.5f, -1.0f, 0.0f),
new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f), new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f),
new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f), new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f),
new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f), new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f),
new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f), new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f), new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f),
new Angle(0.75f, 0.0f, -1.0f), new Angle(0.75f, 0.0f, -1.0f),
new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f), new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f),
new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f), new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f),
new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f), new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f),
new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f), new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f),
new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f), new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f),
new Angle(1.0f, 1.0f, 0.0f) new Angle(1.0f, 1.0f, 0.0f)
}; };
private Angle interpolatePoints(float newPoint, Angle p1, Angle p2) private Angle interpolatePoints(float newPoint, Angle p1, Angle p2)

View File

@ -7546,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// the object we are in // the object we are in
UUID objectID = m_host.ParentUUID; 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 // we need the permission first, to know which avatar we want to set the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@ -7597,7 +7597,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// the object we are in // the object we are in
UUID objectID = m_host.ParentUUID; 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 // we need the permission first, to know which avatar we want to clear the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;

View File

@ -7418,7 +7418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the object we are in // the object we are in
UUID objectID = m_host.ParentUUID; 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 // we need the permission first, to know which avatar we want to set the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@ -7469,7 +7469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// the object we are in // the object we are in
UUID objectID = m_host.ParentUUID; 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 // we need the permission first, to know which avatar we want to clear the camera for
UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 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 we're currently in an event, just tell it to save upon return
// //
if(m_InEvent) if (m_InEvent)
{ {
m_SaveState = true; m_SaveState = true;
return; return;