aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJeff Ames2008-09-09 01:26:48 +0000
committerJeff Ames2008-09-09 01:26:48 +0000
commitfae34bb10cfa10702faf5c19d8c8517faa018cb5 (patch)
tree2001f24703b010957254dbb49ef5e222ff30b84d /OpenSim/Region
parentFix state xxx within state xxx itself triggering a state "change" to (diff)
downloadopensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.zip
opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.gz
opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.bz2
opensim-SC-fae34bb10cfa10702faf5c19d8c8517faa018cb5.tar.xz
Update svn properties, formatting cleanup.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs14
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs18
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs70
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs56
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs394
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs52
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs48
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs44
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs310
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs159
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs74
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/EntityList.cs12
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs8
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs2
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs182
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs22
32 files changed, 812 insertions, 805 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 356dee8..3c860a9 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
115 protected UUID m_activeGroupID = UUID.Zero; 115 protected UUID m_activeGroupID = UUID.Zero;
116 protected string m_activeGroupName = String.Empty; 116 protected string m_activeGroupName = String.Empty;
117 protected ulong m_activeGroupPowers = 0; 117 protected ulong m_activeGroupPowers = 0;
118 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); 118 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
119 119
120 /* Instantiated Designated Event Delegates */ 120 /* Instantiated Designated Event Delegates */
121 //- used so we don't create new objects for each incoming packet and then toss it out later */ 121 //- 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
302 get { return m_activeGroupPowers; } 302 get { return m_activeGroupPowers; }
303 } 303 }
304 304
305 public ulong GetGroupPowers(UUID groupID) 305 public ulong GetGroupPowers(UUID groupID)
306 { 306 {
307 if (m_groupPowers.ContainsKey(groupID)) 307 if (m_groupPowers.ContainsKey(groupID))
308 return m_groupPowers[groupID]; 308 return m_groupPowers[groupID];
@@ -645,7 +645,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
645 protected virtual void ClientLoop() 645 protected virtual void ClientLoop()
646 { 646 {
647 m_log.Info("[CLIENT]: Entered main packet processing loop"); 647 m_log.Info("[CLIENT]: Entered main packet processing loop");
648 648
649 while (true) 649 while (true)
650 { 650 {
651 LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue(); 651 LLQueItem nextPacket = m_PacketHandler.PacketQueue.Dequeue();
@@ -683,10 +683,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
683 if (m_PacketHandler.PacketsReceived == m_inPacketsChecked) 683 if (m_PacketHandler.PacketsReceived == m_inPacketsChecked)
684 { 684 {
685 // no packet came in since the last time we checked... 685 // no packet came in since the last time we checked...
686 686
687 m_probesWithNoIngressPackets++; 687 m_probesWithNoIngressPackets++;
688 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) // agent active 688 if ((m_probesWithNoIngressPackets > 30 && !m_clientBlocked) // agent active
689 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) // agent paused 689 || (m_probesWithNoIngressPackets > 90 && m_clientBlocked)) // agent paused
690 { 690 {
691 m_clientPingTimer.Enabled = false; 691 m_clientPingTimer.Enabled = false;
692 692
@@ -709,7 +709,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
709 { 709 {
710 // Something received in the meantime - we can reset the counters 710 // Something received in the meantime - we can reset the counters
711 m_probesWithNoIngressPackets = 0; 711 m_probesWithNoIngressPackets = 0;
712 // ... and store the current number of packets received to find out if another one got in on the next cycle 712 // ... and store the current number of packets received to find out if another one got in on the next cycle
713 m_inPacketsChecked = m_PacketHandler.PacketsReceived; 713 m_inPacketsChecked = m_PacketHandler.PacketsReceived;
714 } 714 }
715 715
@@ -749,7 +749,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
749 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(m_cirpack.m_circuitCode.m_sessionId, m_cirpack.m_circuitCode.ID, m_cirpack.m_circuitCode.Code); 749 // AuthenticateResponse sessionInfo = m_gridServer.AuthenticateSession(m_cirpack.m_circuitCode.m_sessionId, m_cirpack.m_circuitCode.ID, m_cirpack.m_circuitCode.Code);
750 AuthenticateResponse sessionInfo = 750 AuthenticateResponse sessionInfo =
751 m_authenticateSessionsHandler.AuthenticateSession(m_sessionId, m_agentId, m_circuitCode); 751 m_authenticateSessionsHandler.AuthenticateSession(m_sessionId, m_agentId, m_circuitCode);
752 752
753 if (!sessionInfo.Authorised) 753 if (!sessionInfo.Authorised)
754 { 754 {
755 //session/circuit not authorised 755 //session/circuit not authorised
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 206216e..52a74e7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -58,12 +58,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
58 protected byte[] RecvBuffer = new byte[4096]; 58 protected byte[] RecvBuffer = new byte[4096];
59 protected byte[] ZeroBuffer = new byte[8192]; 59 protected byte[] ZeroBuffer = new byte[8192];
60 protected IPEndPoint ipeSender; 60 protected IPEndPoint ipeSender;
61 61
62 /// <value> 62 /// <value>
63 /// The endpoint of a sender of a particular packet. The port is continually changed by the various socket receive methods 63 /// The endpoint of a sender of a particular packet. The port is continually changed by the various socket receive methods
64 /// </value> 64 /// </value>
65 protected EndPoint epSender; 65 protected EndPoint epSender;
66 66
67 protected EndPoint epProxy; 67 protected EndPoint epProxy;
68 protected int proxyPortOffset; 68 protected int proxyPortOffset;
69 protected AsyncCallback ReceivedData; 69 protected AsyncCallback ReceivedData;
@@ -75,7 +75,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
75 protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); 75 protected IPAddress listenIP = IPAddress.Parse("0.0.0.0");
76 protected IScene m_localScene; 76 protected IScene m_localScene;
77 protected AssetCache m_assetCache; 77 protected AssetCache m_assetCache;
78 78
79 /// <value> 79 /// <value>
80 /// Manages authentication for agent circuits 80 /// Manages authentication for agent circuits
81 /// </value> 81 /// </value>
@@ -260,12 +260,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
260 { 260 {
261 ret = clientCircuits.TryGetValue(epSender, out circuit); 261 ret = clientCircuits.TryGetValue(epSender, out circuit);
262 } 262 }
263 263
264 if (ret) 264 if (ret)
265 { 265 {
266 //if so then send packet to the packetserver 266 //if so then send packet to the packetserver
267 //m_log.DebugFormat("[UDPSERVER]: For endpoint {0} got packet {1}", epSender, packet.Type); 267 //m_log.DebugFormat("[UDPSERVER]: For endpoint {0} got packet {1}", epSender, packet.Type);
268 268
269 m_packetServer.InPacket(circuit, packet); 269 m_packetServer.InPacket(circuit, packet);
270 } 270 }
271 else if (packet.Type == PacketType.UseCircuitCode) 271 else if (packet.Type == PacketType.UseCircuitCode)
@@ -358,8 +358,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
358 return; 358 return;
359 359
360 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet; 360 UseCircuitCodePacket useCircuit = (UseCircuitCodePacket) packet;
361 361
362 m_log.DebugFormat("[CLIENT]: Adding new circuit for agent {0}, circuit code {1}", useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code); 362 m_log.DebugFormat("[CLIENT]: Adding new circuit for agent {0}, circuit code {1}", useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code);
363 363
364 lock (clientCircuits) 364 lock (clientCircuits)
365 { 365 {
@@ -386,10 +386,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
386 386
387 if (!PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_circuitManager, epProxy)) 387 if (!PacketServer.AddNewClient(epSender, useCircuit, m_assetCache, m_circuitManager, epProxy))
388 m_log.ErrorFormat( 388 m_log.ErrorFormat(
389 "[CLIENT]: A circuit already existed for agent {0}, circuit {1}", 389 "[CLIENT]: A circuit already existed for agent {0}, circuit {1}",
390 useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code); 390 useCircuit.CircuitCode.ID, useCircuit.CircuitCode.Code);
391 } 391 }
392 392
393 PacketPool.Instance.ReturnPacket(packet); 393 PacketPool.Instance.ReturnPacket(packet);
394 } 394 }
395 395
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 7b93bfb..93a1e46 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Communications.Local
265 m_log.Warn("[LOGIN]: Not found region " + currentRegion); 265 m_log.Warn("[LOGIN]: Not found region " + currentRegion);
266 return false; 266 return false;
267 } 267 }
268 268
269 return true; 269 return true;
270 } 270 }
271 271
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 2538eaf..3bd57cd 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Communications.OGS1
89 { 89 {
90 serversInfo = servers_info; 90 serversInfo = servers_info;
91 httpServer = httpServe; 91 httpServer = httpServe;
92 92
93 //Respond to Grid Services requests 93 //Respond to Grid Services requests
94 httpServer.AddXmlRPCHandler("expect_user", ExpectUser); 94 httpServer.AddXmlRPCHandler("expect_user", ExpectUser);
95 httpServer.AddXmlRPCHandler("logoff_user", LogOffUser); 95 httpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
@@ -602,7 +602,7 @@ namespace OpenSim.Region.Communications.OGS1
602 /// <param name="request"></param> 602 /// <param name="request"></param>
603 /// <returns></returns> 603 /// <returns></returns>
604 public XmlRpcResponse ExpectUser(XmlRpcRequest request) 604 public XmlRpcResponse ExpectUser(XmlRpcRequest request)
605 { 605 {
606 Hashtable requestData = (Hashtable) request.Params[0]; 606 Hashtable requestData = (Hashtable) request.Params[0];
607 AgentCircuitData agentData = new AgentCircuitData(); 607 AgentCircuitData agentData = new AgentCircuitData();
608 agentData.SessionID = new UUID((string) requestData["session_id"]); 608 agentData.SessionID = new UUID((string) requestData["session_id"]);
@@ -613,7 +613,7 @@ namespace OpenSim.Region.Communications.OGS1
613 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); 613 agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]);
614 agentData.CapsPath = (string) requestData["caps_path"]; 614 agentData.CapsPath = (string) requestData["caps_path"];
615 ulong regionHandle = Convert.ToUInt64((string) requestData["regionhandle"]); 615 ulong regionHandle = Convert.ToUInt64((string) requestData["regionhandle"]);
616 616
617 m_log.DebugFormat( 617 m_log.DebugFormat(
618 "[CLIENT]: Told by user service to prepare for a connection from {0} {1} {2}, circuit {3}", 618 "[CLIENT]: Told by user service to prepare for a connection from {0} {1} {2}, circuit {3}",
619 agentData.firstname, agentData.lastname, agentData.AgentID, agentData.circuitcode); 619 agentData.firstname, agentData.lastname, agentData.AgentID, agentData.circuitcode);
@@ -669,7 +669,7 @@ namespace OpenSim.Region.Communications.OGS1
669 respdata["success"] = "TRUE"; 669 respdata["success"] = "TRUE";
670 resp.Value = respdata; 670 resp.Value = respdata;
671 } 671 }
672 672
673 return resp; 673 return resp;
674 } 674 }
675 // Grid Request Processing 675 // Grid Request Processing
@@ -1679,7 +1679,7 @@ namespace OpenSim.Region.Communications.OGS1
1679 // this might be cached, as we probably requested it just a moment ago... 1679 // this might be cached, as we probably requested it just a moment ago...
1680 RegionInfo info = RequestNeighbourInfo(regionHandle); 1680 RegionInfo info = RequestNeighbourInfo(regionHandle);
1681 if (info != null) // just to be sure 1681 if (info != null) // just to be sure
1682 { 1682 {
1683 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 1683 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
1684 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"; 1684 string uri = "http://" + info.ExternalEndPoint.Address + ":" + info.HttpPort + "/";
1685 XmlRpcResponse response = request.Send(uri, 10000); 1685 XmlRpcResponse response = request.Send(uri, 10000);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index e1599a8..3132eb7 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
161 string message = e.Message; 161 string message = e.Message;
162 UUID fromID = e.SenderUUID; 162 UUID fromID = e.SenderUUID;
163 163
164 if(message.Length >= 1000) // libomv limit 164 if (message.Length >= 1000) // libomv limit
165 message = message.Substring(0, 1000); 165 message = message.Substring(0, 1000);
166 166
167 if (e.Sender != null) 167 if (e.Sender != null)
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index 19c193f..8b7df9e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -820,33 +820,33 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
820 string secret = (string) requestData["secret"]; 820 string secret = (string) requestData["secret"];
821 821
822 Scene userScene = GetSceneByUUID(regionId); 822 Scene userScene = GetSceneByUUID(regionId);
823 if(userScene != null) 823 if (userScene != null)
824 { 824 {
825 if (userScene.RegionInfo.regionSecret.ToString() == secret) 825 if (userScene.RegionInfo.regionSecret.ToString() == secret)
826 { 826 {
827 827
828 IClientAPI client = LocateClientObject(agentId); 828 IClientAPI client = LocateClientObject(agentId);
829 if (client != null) 829 if (client != null)
830 { 830 {
831 831
832 if (soundId != UUID.Zero) 832 if (soundId != UUID.Zero)
833 client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); 833 client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
834 834
835 client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text); 835 client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
836 836
837 retparam.Add("success", true); 837 retparam.Add("success", true);
838 } 838 }
839 else 839 else
840 { 840 {
841 retparam.Add("success", false); 841 retparam.Add("success", false);
842 } 842 }
843 } 843 }
844 else 844 else
845 { 845 {
846 retparam.Add("success", false); 846 retparam.Add("success", false);
847 } 847 }
848 } 848 }
849 849
850 ret.Value = retparam; 850 ret.Value = retparam;
851 return ret; 851 return ret;
852 } 852 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index dd592dd..aab863a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
90 public void SetAura(Vector3 color, float radius) 90 public void SetAura(Vector3 color, float radius)
91 { 91 {
92 SceneObjectPart From = m_Entity.RootPart; 92 SceneObjectPart From = m_Entity.RootPart;
93 93
94 //m_log.Debug("[META ENTITY] BEFORE: radius = " + radius); 94 //m_log.Debug("[META ENTITY] BEFORE: radius = " + radius);
95 float burstRadius = 0.1f; 95 float burstRadius = 0.1f;
96 Primitive.ParticleSystem.SourcePattern patternFlags = Primitive.ParticleSystem.SourcePattern.None; 96 Primitive.ParticleSystem.SourcePattern patternFlags = Primitive.ParticleSystem.SourcePattern.None;
@@ -98,12 +98,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
98 float burstRate = 0.4f; 98 float burstRate = 0.4f;
99 if (radius >= 8.0f) 99 if (radius >= 8.0f)
100 { 100 {
101 //float sizeOfObject = radius / 2.0f; 101 //float sizeOfObject = radius / 2.0f;
102 burstRadius = (radius - 8.0f)/3f; 102 burstRadius = (radius - 8.0f)/3f;
103 burstRate = 1.5f; 103 burstRate = 1.5f;
104 radius = 7.99f; 104 radius = 7.99f;
105 patternFlags = Primitive.ParticleSystem.SourcePattern.Explode; 105 patternFlags = Primitive.ParticleSystem.SourcePattern.Explode;
106 age = 4.0f; 106 age = 4.0f;
107 } 107 }
108 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); 108 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
109 } 109 }
@@ -111,48 +111,48 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
111 public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags) 111 public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags)
112 { 112 {
113 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 113 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
114 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 114 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
115 // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS 115 // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
116 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | 116 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
117 // Primitive.ParticleSystem.ParticleDataFlags.TargetPos; 117 // Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
118 prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR 118 prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
119 prules.PartStartColor.G = color.Y; 119 prules.PartStartColor.G = color.Y;
120 prules.PartStartColor.B = color.Z; 120 prules.PartStartColor.B = color.Z;
121 prules.PartStartColor.A = 0.5f; //PSYS_PART_START_ALPHA, transparency 121 prules.PartStartColor.A = 0.5f; //PSYS_PART_START_ALPHA, transparency
122 prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR 122 prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR
123 prules.PartEndColor.G = color.Y; 123 prules.PartEndColor.G = color.Y;
124 prules.PartEndColor.B = color.Z; 124 prules.PartEndColor.B = color.Z;
125 prules.PartEndColor.A = 0.5f; //PSYS_PART_END_ALPHA, transparency 125 prules.PartEndColor.A = 0.5f; //PSYS_PART_END_ALPHA, transparency
126 /*prules.PartStartScaleX = 0.5f; //PSYS_PART_START_SCALE 126 /*prules.PartStartScaleX = 0.5f; //PSYS_PART_START_SCALE
127 prules.PartStartScaleY = 0.5f; 127 prules.PartStartScaleY = 0.5f;
128 prules.PartEndScaleX = 0.5f; //PSYS_PART_END_SCALE 128 prules.PartEndScaleX = 0.5f; //PSYS_PART_END_SCALE
129 prules.PartEndScaleY = 0.5f; 129 prules.PartEndScaleY = 0.5f;
130 */ 130 */
131 prules.PartStartScaleX = radius; //PSYS_PART_START_SCALE 131 prules.PartStartScaleX = radius; //PSYS_PART_START_SCALE
132 prules.PartStartScaleY = radius; 132 prules.PartStartScaleY = radius;
133 prules.PartEndScaleX = radius; //PSYS_PART_END_SCALE 133 prules.PartEndScaleX = radius; //PSYS_PART_END_SCALE
134 prules.PartEndScaleY = radius; 134 prules.PartEndScaleY = radius;
135 prules.PartMaxAge = age; //PSYS_PART_MAX_AGE 135 prules.PartMaxAge = age; //PSYS_PART_MAX_AGE
136 prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL 136 prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL
137 prules.PartAcceleration.Y = 0.0f; 137 prules.PartAcceleration.Y = 0.0f;
138 prules.PartAcceleration.Z = 0.0f; 138 prules.PartAcceleration.Z = 0.0f;
139 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN 139 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN
140 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank 140 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
141 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE 141 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE
142 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT 142 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT
143 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS 143 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS
144 prules.BurstRadius = burstRadius; //PSYS_SRC_BURST_RADIUS 144 prules.BurstRadius = burstRadius; //PSYS_SRC_BURST_RADIUS
145 prules.BurstSpeedMin = 0.001f; //PSYS_SRC_BURST_SPEED_MIN 145 prules.BurstSpeedMin = 0.001f; //PSYS_SRC_BURST_SPEED_MIN
146 prules.BurstSpeedMax = 0.001f; //PSYS_SRC_BURST_SPEED_MAX 146 prules.BurstSpeedMax = 0.001f; //PSYS_SRC_BURST_SPEED_MAX
147 prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE 147 prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE
148 //prules.Target = To; //PSYS_SRC_TARGET_KEY 148 //prules.Target = To; //PSYS_SRC_TARGET_KEY
149 prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA 149 prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA
150 prules.AngularVelocity.Y = 0.0f; 150 prules.AngularVelocity.Y = 0.0f;
151 prules.AngularVelocity.Z = 0.0f; 151 prules.AngularVelocity.Z = 0.0f;
152 prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN 152 prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN
153 prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END 153 prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END
154 154
155 prules.CRC = 1; //activates the particle system?? 155 prules.CRC = 1; //activates the particle system??
156 From.AddNewParticleSystem(prules); 156 From.AddNewParticleSystem(prules);
157 } 157 }
158 158
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index 301de56..ca20ee6 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -79,15 +79,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
79 Vector3 FromPos = From.GetWorldPosition(); 79 Vector3 FromPos = From.GetWorldPosition();
80 Vector3 ToPos = From.GetWorldPosition(); 80 Vector3 ToPos = From.GetWorldPosition();
81 // UUID toUUID = To.UUID; 81 // UUID toUUID = To.UUID;
82 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + 82 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) +
83 Math.Pow(FromPos.X-ToPos.Y, 2) + 83 Math.Pow(FromPos.X-ToPos.Y, 2) +
84 Math.Pow(FromPos.X-ToPos.Z, 2) 84 Math.Pow(FromPos.X-ToPos.Z, 2)
85 ) 85 )
86 ); 86 );
87 //float rate = (float) (distance/4f); 87 //float rate = (float) (distance/4f);
88 float rate = 0.5f; 88 float rate = 0.5f;
89 float scale = (float) (distance/128f); 89 float scale = (float) (distance/128f);
90 float speed = (float) (2.0f - distance/128f); 90 float speed = (float) (2.0f - distance/128f);
91 91
92 SetBeamToUUID(From, To, color, rate, scale, speed); 92 SetBeamToUUID(From, To, color, rate, scale, speed);
93 } 93 }
@@ -95,42 +95,42 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
95 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed) 95 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed)
96 { 96 {
97 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 97 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
98 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 98 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
99 // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS 99 // Primitive.ParticleSystem.ParticleDataFlags.FollowSrc; //PSYS_PART_FLAGS
100 prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam | 100 prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Beam |
101 Primitive.ParticleSystem.ParticleDataFlags.TargetPos; 101 Primitive.ParticleSystem.ParticleDataFlags.TargetPos;
102 prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR 102 prules.PartStartColor.R = color.X; //PSYS_PART_START_COLOR
103 prules.PartStartColor.G = color.Y; 103 prules.PartStartColor.G = color.Y;
104 prules.PartStartColor.B = color.Z; 104 prules.PartStartColor.B = color.Z;
105 prules.PartStartColor.A = 1.0f; //PSYS_PART_START_ALPHA, transparency 105 prules.PartStartColor.A = 1.0f; //PSYS_PART_START_ALPHA, transparency
106 prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR 106 prules.PartEndColor.R = color.X; //PSYS_PART_END_COLOR
107 prules.PartEndColor.G = color.Y; 107 prules.PartEndColor.G = color.Y;
108 prules.PartEndColor.B = color.Z; 108 prules.PartEndColor.B = color.Z;
109 prules.PartEndColor.A = 1.0f; //PSYS_PART_END_ALPHA, transparency 109 prules.PartEndColor.A = 1.0f; //PSYS_PART_END_ALPHA, transparency
110 prules.PartStartScaleX = scale; //PSYS_PART_START_SCALE 110 prules.PartStartScaleX = scale; //PSYS_PART_START_SCALE
111 prules.PartStartScaleY = scale; 111 prules.PartStartScaleY = scale;
112 prules.PartEndScaleX = scale; //PSYS_PART_END_SCALE 112 prules.PartEndScaleX = scale; //PSYS_PART_END_SCALE
113 prules.PartEndScaleY = scale; 113 prules.PartEndScaleY = scale;
114 prules.PartMaxAge = 1.0f; //PSYS_PART_MAX_AGE 114 prules.PartMaxAge = 1.0f; //PSYS_PART_MAX_AGE
115 prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL 115 prules.PartAcceleration.X = 0.0f; //PSYS_SRC_ACCEL
116 prules.PartAcceleration.Y = 0.0f; 116 prules.PartAcceleration.Y = 0.0f;
117 prules.PartAcceleration.Z = 0.0f; 117 prules.PartAcceleration.Z = 0.0f;
118 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN 118 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN
119 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank 119 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
120 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE 120 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE
121 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT 121 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT
122 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS 122 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS
123 prules.BurstSpeedMin = speed; //PSYS_SRC_BURST_SPEED_MIN 123 prules.BurstSpeedMin = speed; //PSYS_SRC_BURST_SPEED_MIN
124 prules.BurstSpeedMax = speed; //PSYS_SRC_BURST_SPEED_MAX 124 prules.BurstSpeedMax = speed; //PSYS_SRC_BURST_SPEED_MAX
125 prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE 125 prules.MaxAge = 0.0f; //PSYS_SRC_MAX_AGE
126 prules.Target = To.UUID; //PSYS_SRC_TARGET_KEY 126 prules.Target = To.UUID; //PSYS_SRC_TARGET_KEY
127 prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA 127 prules.AngularVelocity.X = 0.0f; //PSYS_SRC_OMEGA
128 prules.AngularVelocity.Y = 0.0f; 128 prules.AngularVelocity.Y = 0.0f;
129 prules.AngularVelocity.Z = 0.0f; 129 prules.AngularVelocity.Z = 0.0f;
130 prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN 130 prules.InnerAngle = 0.0f; //PSYS_SRC_ANGLE_BEGIN
131 prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END 131 prules.OuterAngle = 0.0f; //PSYS_SRC_ANGLE_END
132 132
133 prules.CRC = 1; //activates the particle system?? 133 prules.CRC = 1; //activates the particle system??
134 From.AddNewParticleSystem(prules); 134 From.AddNewParticleSystem(prules);
135 } 135 }
136 136
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index 072de5e..cdd4f4e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -82,7 +82,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
82 CMModel m_model = null; 82 CMModel m_model = null;
83 83
84 /// <value> 84 /// <value>
85 /// A list of all the scenes that should be revisioned. Controller is the only class that keeps track of all scenes in the region. 85 /// A list of all the scenes that should be revisioned. Controller is the only class that keeps track of all scenes in the region.
86 /// </value> 86 /// </value>
87 Hashtable m_sceneList = Hashtable.Synchronized(new Hashtable()); 87 Hashtable m_sceneList = Hashtable.Synchronized(new Hashtable());
88 State m_state = State.NONE; 88 State m_state = State.NONE;
@@ -129,31 +129,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
129 /// </summary> 129 /// </summary>
130 private SceneObjectGroup GetGroupByPrim(uint localID) 130 private SceneObjectGroup GetGroupByPrim(uint localID)
131 { 131 {
132 foreach(Object currScene in m_sceneList.Values) 132 foreach (Object currScene in m_sceneList.Values)
133 { 133 {
134 foreach (EntityBase ent in ((Scene)currScene).GetEntities()) 134 foreach (EntityBase ent in ((Scene)currScene).GetEntities())
135 { 135 {
136 if (ent is SceneObjectGroup) 136 if (ent is SceneObjectGroup)
137 { 137 {
138 if (((SceneObjectGroup)ent).HasChildPrim(localID)) 138 if (((SceneObjectGroup)ent).HasChildPrim(localID))
139 return (SceneObjectGroup)ent; 139 return (SceneObjectGroup)ent;
140 } 140 }
141 } 141 }
142 } 142 }
143 return null; 143 return null;
144 } 144 }
145 145
146 private void Initialize(CMModel model, CMView view, Scene scene, int channel) 146 private void Initialize(CMModel model, CMView view, Scene scene, int channel)
147 { 147 {
148 lock(this) 148 lock (this)
149 { 149 {
150 m_estateModule = scene.RequestModuleInterface<IEstateModule>(); 150 m_estateModule = scene.RequestModuleInterface<IEstateModule>();
151 m_thread = new Thread( MainLoop ); 151 m_thread = new Thread(MainLoop);
152 m_thread.Name = "Content Management"; 152 m_thread.Name = "Content Management";
153 m_thread.IsBackground = true; 153 m_thread.IsBackground = true;
154 m_thread.Start(); 154 m_thread.Start();
155 ThreadTracker.Add(m_thread); 155 ThreadTracker.Add(m_thread);
156 m_state = State.NONE; 156 m_state = State.NONE;
157 } 157 }
158 } 158 }
159 159
@@ -164,41 +164,41 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
164 { 164 {
165 CMModel model = m_model; CMView view = m_view; int channel = m_channel; 165 CMModel model = m_model; CMView view = m_view; int channel = m_channel;
166 Work currentJob = new Work(); 166 Work currentJob = new Work();
167 while(true) 167 while (true)
168 { 168 {
169 currentJob = m_WorkQueue.Dequeue(); 169 currentJob = m_WorkQueue.Dequeue();
170 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request"); 170 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- DeQueued a request");
171 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type); 171 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Work type: " + currentJob.Type);
172 switch(currentJob.Type) 172 switch (currentJob.Type)
173 { 173 {
174 case WorkType.NONE: 174 case WorkType.NONE:
175 break; 175 break;
176 case WorkType.OBJECTATTRIBUTECHANGE: 176 case WorkType.OBJECTATTRIBUTECHANGE:
177 ObjectAttributeChanged(model, view, currentJob.LocalId); 177 ObjectAttributeChanged(model, view, currentJob.LocalId);
178 break; 178 break;
179 case WorkType.PRIMITIVEADDED: 179 case WorkType.PRIMITIVEADDED:
180 PrimitiveAdded(model, view, currentJob); 180 PrimitiveAdded(model, view, currentJob);
181 break; 181 break;
182 case WorkType.OBJECTDUPLICATED: 182 case WorkType.OBJECTDUPLICATED:
183 ObjectDuplicated(model, view, currentJob.LocalId); 183 ObjectDuplicated(model, view, currentJob.LocalId);
184 break; 184 break;
185 case WorkType.OBJECTKILLED: 185 case WorkType.OBJECTKILLED:
186 ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1); 186 ObjectKilled(model, view, (SceneObjectGroup) currentJob.Data1);
187 break; 187 break;
188 case WorkType.UNDODID: 188 case WorkType.UNDODID:
189 UndoDid(model, view, currentJob.UUID); 189 UndoDid(model, view, currentJob.UUID);
190 break; 190 break;
191 case WorkType.NEWCLIENT: 191 case WorkType.NEWCLIENT:
192 NewClient(view, (IClientAPI) currentJob.Data1); 192 NewClient(view, (IClientAPI) currentJob.Data1);
193 break; 193 break;
194 case WorkType.SIMCHAT: 194 case WorkType.SIMCHAT:
195 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message); 195 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- Message received: " + ((OSChatMessage) currentJob.Data1).Message);
196 SimChat(model, view, (OSChatMessage) currentJob.Data1, channel); 196 SimChat(model, view, (OSChatMessage) currentJob.Data1, channel);
197 break; 197 break;
198 default: 198 default:
199 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?"); 199 m_log.Debug("[CONTENT MANAGEMENT] MAIN LOOP -- uuuuuuuuuh, what?");
200 break; 200 break;
201 } 201 }
202 } 202 }
203 } 203 }
204 204
@@ -207,24 +207,24 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
207 /// </summary> 207 /// </summary>
208 private void NewClient(CMView view, IClientAPI client) 208 private void NewClient(CMView view, IClientAPI client)
209 { 209 {
210 if ((m_state & State.SHOWING_CHANGES) > 0) 210 if ((m_state & State.SHOWING_CHANGES) > 0)
211 view.SendMetaEntitiesToNewClient(client); 211 view.SendMetaEntitiesToNewClient(client);
212 } 212 }
213 213
214 /// <summary> 214 /// <summary>
215 /// Only called by the MainLoop. 215 /// Only called by the MainLoop.
216 /// </summary> 216 /// </summary>
217 private void ObjectAttributeChanged(CMModel model, CMView view, uint LocalId) 217 private void ObjectAttributeChanged(CMModel model, CMView view, uint LocalId)
218 { 218 {
219 SceneObjectGroup group = null; 219 SceneObjectGroup group = null;
220 if ((m_state & State.SHOWING_CHANGES) > 0) 220 if ((m_state & State.SHOWING_CHANGES) > 0)
221 { 221 {
222 group = GetGroupByPrim(LocalId); 222 group = GetGroupByPrim(LocalId);
223 if (group != null) 223 if (group != null)
224 { 224 {
225 view.DisplayAuras( model.UpdateNormalEntityEffects(group) ); //Might be a normal entity (green aura) 225 view.DisplayAuras(model.UpdateNormalEntityEffects(group)); //Might be a normal entity (green aura)
226 m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue aura) 226 m_view.DisplayMetaEntity(group.UUID); //Might be a meta entity (blue aura)
227 } 227 }
228 } 228 }
229 } 229 }
230 230
@@ -234,43 +234,43 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
234 private void ObjectDuplicated(CMModel model, CMView view, uint localId) 234 private void ObjectDuplicated(CMModel model, CMView view, uint localId)
235 { 235 {
236 if ((m_state & State.SHOWING_CHANGES) > 0) 236 if ((m_state & State.SHOWING_CHANGES) > 0)
237 view.DisplayAuras(model.CheckForNewEntitiesMissingAuras( GetGroupByPrim(localId).Scene )); 237 view.DisplayAuras(model.CheckForNewEntitiesMissingAuras(GetGroupByPrim(localId).Scene));
238 } 238 }
239 239
240 /// <summary> 240 /// <summary>
241 /// Only called by the MainLoop. 241 /// Only called by the MainLoop.
242 /// </summary> 242 /// </summary>
243 private void ObjectKilled(CMModel model, CMView view, SceneObjectGroup group) 243 private void ObjectKilled(CMModel model, CMView view, SceneObjectGroup group)
244 { 244 {
245 if ((m_state & State.SHOWING_CHANGES) > 0) 245 if ((m_state & State.SHOWING_CHANGES) > 0)
246 { 246 {
247 view.RemoveOrUpdateDeletedEntity(group); 247 view.RemoveOrUpdateDeletedEntity(group);
248 model.RemoveOrUpdateDeletedEntity(group); 248 model.RemoveOrUpdateDeletedEntity(group);
249 } 249 }
250 } 250 }
251 251
252 /// <summary> 252 /// <summary>
253 /// Only called by the MainLoop. 253 /// Only called by the MainLoop.
254 /// </summary> 254 /// </summary>
255 private void PrimitiveAdded(CMModel model, CMView view, Work currentJob) 255 private void PrimitiveAdded(CMModel model, CMView view, Work currentJob)
256 { 256 {
257 if ((m_state & State.SHOWING_CHANGES) > 0) 257 if ((m_state & State.SHOWING_CHANGES) > 0)
258 { 258 {
259 foreach(Object scene in m_sceneList.Values) 259 foreach (Object scene in m_sceneList.Values)
260 m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene)); 260 m_view.DisplayAuras(model.CheckForNewEntitiesMissingAuras((Scene) scene));
261 } 261 }
262 } 262 }
263 263
264 /// <summary> 264 /// <summary>
265 /// Only called by the MainLoop. 265 /// Only called by the MainLoop.
266 /// </summary> 266 /// </summary>
267 private void UndoDid(CMModel model, CMView view, UUID uuid) 267 private void UndoDid(CMModel model, CMView view, UUID uuid)
268 { 268 {
269 if ((m_state & State.SHOWING_CHANGES) > 0) 269 if ((m_state & State.SHOWING_CHANGES) > 0)
270 { 270 {
271 ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid); 271 ContentManagementEntity ent = model.FindMetaEntityAffectedByUndo(uuid);
272 if (ent != null) 272 if (ent != null)
273 view.DisplayEntity(ent); 273 view.DisplayEntity(ent);
274 } 274 }
275 } 275 }
276 276
@@ -328,38 +328,38 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
328 /// <summary> 328 /// <summary>
329 /// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument. 329 /// Takes a list of scenes and forms a new orderd list according to the proximity of scenes to the second argument.
330 /// </summary> 330 /// </summary>
331 protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity( Hashtable sceneList, Scene scene) 331 protected static System.Collections.Generic.List<Scene> ScenesInOrderOfProximity(Hashtable sceneList, Scene scene)
332 { 332 {
333 int somethingAddedToList = 1; 333 int somethingAddedToList = 1;
334 System.Collections.Generic.List<Scene> newList = new List<Scene>(); 334 System.Collections.Generic.List<Scene> newList = new List<Scene>();
335 newList.Add(scene); 335 newList.Add(scene);
336 336
337 if (! sceneList.ContainsValue(scene)) 337 if (!sceneList.ContainsValue(scene))
338 { 338 {
339 foreach(Object sceneObj in sceneList) 339 foreach (Object sceneObj in sceneList)
340 newList.Add((Scene) sceneObj); 340 newList.Add((Scene) sceneObj);
341 return newList; 341 return newList;
342 } 342 }
343 343
344 while(somethingAddedToList > 0) 344 while (somethingAddedToList > 0)
345 { 345 {
346 somethingAddedToList = 0; 346 somethingAddedToList = 0;
347 for(int i = 0; i < newList.Count; i++) 347 for (int i = 0; i < newList.Count; i++)
348 { 348 {
349 foreach(Object sceneObj in sceneList.Values) 349 foreach (Object sceneObj in sceneList.Values)
350 { 350 {
351 if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (! newList.Contains((Scene)sceneObj)) ) 351 if (newList[i].CheckNeighborRegion(((Scene)sceneObj).RegionInfo) && (!newList.Contains((Scene)sceneObj)))
352 { 352 {
353 newList.Add((Scene)sceneObj); 353 newList.Add((Scene)sceneObj);
354 somethingAddedToList++; 354 somethingAddedToList++;
355 } 355 }
356 } 356 }
357 } 357 }
358 } 358 }
359 359
360 foreach(Object sceneObj in sceneList.Values) 360 foreach (Object sceneObj in sceneList.Values)
361 if (! newList.Contains((Scene)sceneObj)) 361 if (!newList.Contains((Scene)sceneObj))
362 newList.Add((Scene)sceneObj); 362 newList.Add((Scene)sceneObj);
363 363
364 return newList; 364 return newList;
365 } 365 }
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
381 protected void StartManaging(IClientAPI client) 381 protected void StartManaging(IClientAPI client)
382 { 382 {
383 m_log.Debug("[CONTENT MANAGEMENT] Registering channel with chat services."); 383 m_log.Debug("[CONTENT MANAGEMENT] Registering channel with chat services.");
384 client.OnChatFromViewer += SimChatSent; 384 client.OnChatFromViewer += SimChatSent;
385 //init = true; 385 //init = true;
386 386
387 OnNewClient(client); 387 OnNewClient(client);
@@ -401,19 +401,19 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
401 } 401 }
402 402
403 /// <summary> 403 /// <summary>
404 /// 404 ///
405 /// </summary> 405 /// </summary>
406 protected void StopManaging(UUID clientUUID) 406 protected void StopManaging(UUID clientUUID)
407 { 407 {
408 foreach(Object sceneobj in m_sceneList.Values) 408 foreach (Object sceneobj in m_sceneList.Values)
409 { 409 {
410 ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID); 410 ScenePresence presence = ((Scene)sceneobj).GetScenePresence(clientUUID);
411 if (presence != null) 411 if (presence != null)
412 { 412 {
413 IClientAPI client = presence.ControllingClient; 413 IClientAPI client = presence.ControllingClient;
414 m_log.Debug("[CONTENT MANAGEMENT] Unregistering channel with chat services."); 414 m_log.Debug("[CONTENT MANAGEMENT] Unregistering channel with chat services.");
415 client.OnChatFromViewer -= SimChatSent; 415 client.OnChatFromViewer -= SimChatSent;
416 416
417 m_log.Debug("[CONTENT MANAGEMENT] Removing handlers to client"); 417 m_log.Debug("[CONTENT MANAGEMENT] Removing handlers to client");
418 client.OnUpdatePrimScale -= UpdateSingleScale; 418 client.OnUpdatePrimScale -= UpdateSingleScale;
419 client.OnUpdatePrimGroupScale -= UpdateMultipleScale; 419 client.OnUpdatePrimGroupScale -= UpdateMultipleScale;
@@ -427,10 +427,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
427 client.OnUndo -= OnUnDid; 427 client.OnUndo -= OnUnDid;
428 //client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation; 428 //client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation;
429 return; 429 return;
430 } 430 }
431 } 431 }
432 } 432 }
433 433
434 protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient) 434 protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
435 { 435 {
436 Work moreWork = new Work(); 436 Work moreWork = new Work();
@@ -479,7 +479,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
479 } 479 }
480 480
481 /// <summary> 481 /// <summary>
482 /// 482 ///
483 /// </summary> 483 /// </summary>
484 protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient) 484 protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
485 { 485 {
@@ -504,47 +504,47 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
504 /// </summary> 504 /// </summary>
505 protected void commit(string message, Scene scene, CMModel model, CMView view) 505 protected void commit(string message, Scene scene, CMModel model, CMView view)
506 { 506 {
507 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene); 507 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
508 508
509 string[] args = message.Split(new char[] {' '}); 509 string[] args = message.Split(new char[] {' '});
510 510
511 char[] logMessage = {' '}; 511 char[] logMessage = {' '};
512 if (args.Length > 1) 512 if (args.Length > 1)
513 { 513 {
514 logMessage = new char[message.Length - (args[0].Length)]; 514 logMessage = new char[message.Length - (args[0].Length)];
515 message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length)); 515 message.CopyTo(args[0].Length, logMessage, 0, message.Length - (args[0].Length));
516 } 516 }
517 517
518 m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region."); 518 m_log.Debug("[CONTENT MANAGEMENT] Saving terrain and objects of region.");
519 foreach(Scene currScene in proximitySceneList) 519 foreach (Scene currScene in proximitySceneList)
520 { 520 {
521 model.CommitRegion(currScene, new String(logMessage)); 521 model.CommitRegion(currScene, new String(logMessage));
522 view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName); 522 view.SendSimChatMessage(scene, "Region Saved Successfully: " + currScene.RegionInfo.RegionName);
523 } 523 }
524 524
525 view.SendSimChatMessage(scene, "Successfully saved all regions."); 525 view.SendSimChatMessage(scene, "Successfully saved all regions.");
526 m_state |= State.DIRTY; 526 m_state |= State.DIRTY;
527 527
528 if ((m_state & State.SHOWING_CHANGES) > 0) //DISPLAY NEW CHANGES INSTEAD OF OLD CHANGES 528 if ((m_state & State.SHOWING_CHANGES) > 0) //DISPLAY NEW CHANGES INSTEAD OF OLD CHANGES
529 { 529 {
530 view.SendSimChatMessage(scene, "Updating differences between new revision and current environment."); 530 view.SendSimChatMessage(scene, "Updating differences between new revision and current environment.");
531 //Hide objects from users and Forget about them 531 //Hide objects from users and Forget about them
532 view.HideAllMetaEntities(); 532 view.HideAllMetaEntities();
533 view.HideAllAuras(); 533 view.HideAllAuras();
534 model.DeleteAllMetaObjects(); 534 model.DeleteAllMetaObjects();
535 535
536 //Recreate them from backend files 536 //Recreate them from backend files
537 foreach(Scene currScene in proximitySceneList) 537 foreach (Scene currScene in proximitySceneList)
538 { 538 {
539 model.UpdateCMEntities(currScene); 539 model.UpdateCMEntities(currScene);
540 view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName); 540 view.SendSimChatMessage(scene, "Finished updating differences between current scene and last revision: " + currScene.RegionInfo.RegionName);
541 } 541 }
542 542
543 //Display new objects to users1 543 //Display new objects to users1
544 view.DisplayRecentChanges(); 544 view.DisplayRecentChanges();
545 view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE."); 545 view.SendSimChatMessage(scene, "Finished updating for DIFF-MODE.");
546 m_state &= ~(State.DIRTY); 546 m_state &= ~(State.DIRTY);
547 m_state |= State.SHOWING_CHANGES; 547 m_state |= State.SHOWING_CHANGES;
548 } 548 }
549 } 549 }
550 550
@@ -553,74 +553,74 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
553 /// </summary> 553 /// </summary>
554 protected void diffmode(Scene scene, CMModel model, CMView view) 554 protected void diffmode(Scene scene, CMModel model, CMView view)
555 { 555 {
556 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene); 556 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
557 557
558 if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF 558 if ((m_state & State.SHOWING_CHANGES) > 0) // TURN OFF
559 { 559 {
560 view.SendSimChatMessage(scene, "Hiding all meta objects."); 560 view.SendSimChatMessage(scene, "Hiding all meta objects.");
561 view.HideAllMetaEntities(); 561 view.HideAllMetaEntities();
562 view.HideAllAuras(); 562 view.HideAllAuras();
563 view.SendSimChatMessage(scene, "Diff-mode = OFF"); 563 view.SendSimChatMessage(scene, "Diff-mode = OFF");
564 564
565 m_state &= ~State.SHOWING_CHANGES; 565 m_state &= ~State.SHOWING_CHANGES;
566 return; 566 return;
567 } 567 }
568 else // TURN ON 568 else // TURN ON
569 { 569 {
570 if ((m_state & State.DIRTY) != 0 || m_state == State.NONE) 570 if ((m_state & State.DIRTY) != 0 || m_state == State.NONE)
571 { 571 {
572 view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision"); 572 view.SendSimChatMessage(scene, "Hiding meta objects and replacing with latest revision");
573 //Hide objects from users and Forget about them 573 //Hide objects from users and Forget about them
574 view.HideAllMetaEntities(); 574 view.HideAllMetaEntities();
575 view.HideAllAuras(); 575 view.HideAllAuras();
576 model.DeleteAllMetaObjects(); 576 model.DeleteAllMetaObjects();
577 //Recreate them from backend files 577 //Recreate them from backend files
578 foreach(Object currScene in m_sceneList.Values) 578 foreach (Object currScene in m_sceneList.Values)
579 model.UpdateCMEntities((Scene) currScene); 579 model.UpdateCMEntities((Scene) currScene);
580 } 580 }
581 else if ((m_state & State.DIRTY) != 0) { 581 else if ((m_state & State.DIRTY) != 0) {
582 view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision"); 582 view.SendSimChatMessage(scene, "Forming list of meta entities with latest revision");
583 foreach(Scene currScene in proximitySceneList) 583 foreach (Scene currScene in proximitySceneList)
584 model.UpdateCMEntities(currScene); 584 model.UpdateCMEntities(currScene);
585 } 585 }
586 586
587 view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment"); 587 view.SendSimChatMessage(scene, "Displaying differences between last revision and current environment");
588 foreach(Scene currScene in proximitySceneList) 588 foreach (Scene currScene in proximitySceneList)
589 model.CheckForNewEntitiesMissingAuras(currScene); 589 model.CheckForNewEntitiesMissingAuras(currScene);
590 view.DisplayRecentChanges(); 590 view.DisplayRecentChanges();
591 591
592 view.SendSimChatMessage(scene, "Diff-mode = ON"); 592 view.SendSimChatMessage(scene, "Diff-mode = ON");
593 m_state |= State.SHOWING_CHANGES; 593 m_state |= State.SHOWING_CHANGES;
594 m_state &= ~State.DIRTY; 594 m_state &= ~State.DIRTY;
595 } 595 }
596 } 596 }
597 597
598 /// <summary> 598 /// <summary>
599 /// Only called from within the SimChat method. Hides all auras and meta entities, 599 /// Only called from within the SimChat method. Hides all auras and meta entities,
600 /// retrieves the current scene object list with the most recent revision retrieved from the model for each scene, 600 /// retrieves the current scene object list with the most recent revision retrieved from the model for each scene,
601 /// then lets the view update the clients of the new objects. 601 /// then lets the view update the clients of the new objects.
602 /// </summary> 602 /// </summary>
603 protected void rollback(Scene scene, CMModel model, CMView view) 603 protected void rollback(Scene scene, CMModel model, CMView view)
604 { 604 {
605 if ((m_state & State.SHOWING_CHANGES) > 0) 605 if ((m_state & State.SHOWING_CHANGES) > 0)
606 { 606 {
607 view.HideAllAuras(); 607 view.HideAllAuras();
608 view.HideAllMetaEntities(); 608 view.HideAllMetaEntities();
609 } 609 }
610 610
611 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity( m_sceneList, scene); 611 System.Collections.Generic.List<Scene> proximitySceneList = ScenesInOrderOfProximity(m_sceneList, scene);
612 foreach(Scene currScene in proximitySceneList) 612 foreach (Scene currScene in proximitySceneList)
613 model.RollbackRegion(currScene); 613 model.RollbackRegion(currScene);
614 614
615 if ((m_state & State.DIRTY) != 0 ) 615 if ((m_state & State.DIRTY) != 0)
616 { 616 {
617 model.DeleteAllMetaObjects(); 617 model.DeleteAllMetaObjects();
618 foreach(Scene currScene in proximitySceneList) 618 foreach (Scene currScene in proximitySceneList)
619 model.UpdateCMEntities(currScene); 619 model.UpdateCMEntities(currScene);
620 } 620 }
621 621
622 if ((m_state & State.SHOWING_CHANGES) > 0) 622 if ((m_state & State.SHOWING_CHANGES) > 0)
623 view.DisplayRecentChanges(); 623 view.DisplayRecentChanges();
624 } 624 }
625 625
626 #endregion Protected Methods 626 #endregion Protected Methods
@@ -642,7 +642,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
642 642
643 scene.EventManager.OnNewClient += StartManaging; 643 scene.EventManager.OnNewClient += StartManaging;
644 scene.EventManager.OnRemovePresence += StopManaging; 644 scene.EventManager.OnRemovePresence += StopManaging;
645 // scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 645 // scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
646 scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted; 646 scene.EventManager.OnObjectBeingRemovedFromScene += GroupBeingDeleted;
647 } 647 }
648 648
@@ -652,9 +652,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
652 public void SimChat(CMModel model, CMView view, OSChatMessage e, int channel) 652 public void SimChat(CMModel model, CMView view, OSChatMessage e, int channel)
653 { 653 {
654 if (e.Channel != channel) 654 if (e.Channel != channel)
655 return; 655 return;
656 if (e.Sender == null) 656 if (e.Sender == null)
657 return; 657 return;
658 658
659 m_log.Debug("[CONTENT MANAGEMENT] Message received: " + e.Message); 659 m_log.Debug("[CONTENT MANAGEMENT] Message received: " + e.Message);
660 660
@@ -667,31 +667,31 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
667 667
668 if (!(m_estateModule.IsManager(avatar.UUID))) 668 if (!(m_estateModule.IsManager(avatar.UUID)))
669 { 669 {
670 m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring."); 670 m_log.Debug("[CONTENT MANAGEMENT] Message sent from non Estate Manager ... ignoring.");
671 view.SendSimChatMessage(scene, "You must be an estate manager to perform that action."); 671 view.SendSimChatMessage(scene, "You must be an estate manager to perform that action.");
672 return; 672 return;
673 } 673 }
674 674
675 switch(args[0]) 675 switch (args[0])
676 { 676 {
677 case "ci": 677 case "ci":
678 case "commit": 678 case "commit":
679 commit(message, scene, model, view); 679 commit(message, scene, model, view);
680 break; 680 break;
681 case "dm": 681 case "dm":
682 case "diff-mode": 682 case "diff-mode":
683 diffmode(scene, model, view); 683 diffmode(scene, model, view);
684 break; 684 break;
685 case "rb": 685 case "rb":
686 case "rollback": 686 case "rollback":
687 rollback(scene, model, view); 687 rollback(scene, model, view);
688 break; 688 break;
689 case "help": 689 case "help":
690 m_view.DisplayHelpMenu(scene); 690 m_view.DisplayHelpMenu(scene);
691 break; 691 break;
692 default: 692 default:
693 view.SendSimChatMessage(scene, "Command not found: " + args[0]); 693 view.SendSimChatMessage(scene, "Command not found: " + args[0]);
694 break; 694 break;
695 } 695 }
696 } 696 }
697 697
@@ -705,7 +705,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
705 [Flags] 705 [Flags]
706 private enum State 706 private enum State
707 { 707 {
708 NONE = 0, 708 NONE = 0,
709 DIRTY = 1, // The meta entities may not correctly represent the last revision. 709 DIRTY = 1, // The meta entities may not correctly represent the last revision.
710 SHOWING_CHANGES = 1<<1 // The meta entities are being shown to user. 710 SHOWING_CHANGES = 1<<1 // The meta entities are being shown to user.
711 } 711 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index 996badf..6bbc30c 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -58,8 +58,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
58 { 58 {
59 #region Fields 59 #region Fields
60 60
61 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
62 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or 62 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
63 // old versions of deleted SceneObjectGroups will be stored in this hash table. 63 // old versions of deleted SceneObjectGroups will be stored in this hash table.
64 // The UUID keys are from the SceneObjectGroup RootPart UUIDs 64 // The UUID keys are from the SceneObjectGroup RootPart UUIDs
65 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity 65 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
97 public bool AddAura(ContentManagementEntity aura) 97 public bool AddAura(ContentManagementEntity aura)
98 { 98 {
99 if (m_NewlyCreatedEntityAura.ContainsKey(aura.UUID)) 99 if (m_NewlyCreatedEntityAura.ContainsKey(aura.UUID))
100 return false; 100 return false;
101 m_NewlyCreatedEntityAura.Add(aura.UUID, aura); 101 m_NewlyCreatedEntityAura.Add(aura.UUID, aura);
102 return true; 102 return true;
103 } 103 }
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
105 public bool AddEntity(ContentManagementEntity ent) 105 public bool AddEntity(ContentManagementEntity ent)
106 { 106 {
107 if (m_CMEntityHash.ContainsKey(ent.UUID)) 107 if (m_CMEntityHash.ContainsKey(ent.UUID))
108 return false; 108 return false;
109 m_CMEntityHash.Add(ent.UUID, ent); 109 m_CMEntityHash.Add(ent.UUID, ent);
110 return true; 110 return true;
111 } 111 }
@@ -115,23 +115,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
115 { 115 {
116 System.Collections.ArrayList missingList = new System.Collections.ArrayList(); 116 System.Collections.ArrayList missingList = new System.Collections.ArrayList();
117 SceneObjectGroup temp = null; 117 SceneObjectGroup temp = null;
118 foreach( EntityBase currObj in currList ) 118 foreach (EntityBase currObj in currList)
119 { 119 {
120 if (! (currObj is SceneObjectGroup)) 120 if (!(currObj is SceneObjectGroup))
121 continue; 121 continue;
122 temp = (SceneObjectGroup) currObj; 122 temp = (SceneObjectGroup) currObj;
123 123
124 if (m_CMEntityHash.ContainsKey(temp.UUID)) 124 if (m_CMEntityHash.ContainsKey(temp.UUID))
125 { 125 {
126 foreach(SceneObjectPart part in temp.Children.Values) 126 foreach (SceneObjectPart part in temp.Children.Values)
127 if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID)) 127 if (!((ContentManagementEntity)m_CMEntityHash[temp.UUID]).HasChildPrim(part.UUID))
128 missingList.Add(part); 128 missingList.Add(part);
129 } 129 }
130 else //Entire group is missing from revision. (and is a new part in region) 130 else //Entire group is missing from revision. (and is a new part in region)
131 { 131 {
132 foreach(SceneObjectPart part in temp.Children.Values) 132 foreach (SceneObjectPart part in temp.Children.Values)
133 missingList.Add(part); 133 missingList.Add(part);
134 } 134 }
135 } 135 }
136 return missingList; 136 return missingList;
137 } 137 }
@@ -146,9 +146,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
146 public AuraMetaEntity CreateAuraForNewlyCreatedEntity(SceneObjectPart part) 146 public AuraMetaEntity CreateAuraForNewlyCreatedEntity(SceneObjectPart part)
147 { 147 {
148 AuraMetaEntity ent = new AuraMetaEntity(part.ParentGroup.Scene, 148 AuraMetaEntity ent = new AuraMetaEntity(part.ParentGroup.Scene,
149 part.ParentGroup.Scene.PrimIDAllocate(), 149 part.ParentGroup.Scene.PrimIDAllocate(),
150 part.GetWorldPosition(), 150 part.GetWorldPosition(),
151 MetaEntity.TRANSLUCENT, 151 MetaEntity.TRANSLUCENT,
152 new Vector3(0,254,0), 152 new Vector3(0,254,0),
153 part.Scale 153 part.Scale
154 ); 154 );
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
168 { 168 {
169 ContentManagementEntity ent = new ContentManagementEntity(xml, scene, false); 169 ContentManagementEntity ent = new ContentManagementEntity(xml, scene, false);
170 if (ent == null) 170 if (ent == null)
171 return null; 171 return null;
172 m_CMEntityHash.Add(ent.UnchangedEntity.UUID, ent); 172 m_CMEntityHash.Add(ent.UnchangedEntity.UUID, ent);
173 return ent; 173 return ent;
174 } 174 }
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
176 public bool RemoveEntity(UUID uuid) 176 public bool RemoveEntity(UUID uuid)
177 { 177 {
178 if (!m_CMEntityHash.ContainsKey(uuid)) 178 if (!m_CMEntityHash.ContainsKey(uuid))
179 return false; 179 return false;
180 m_CMEntityHash.Remove(uuid); 180 m_CMEntityHash.Remove(uuid);
181 return true; 181 return true;
182 } 182 }
@@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
184 public bool RemoveNewlyCreatedEntityAura(UUID uuid) 184 public bool RemoveNewlyCreatedEntityAura(UUID uuid)
185 { 185 {
186 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) 186 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
187 return false; 187 return false;
188 m_NewlyCreatedEntityAura.Remove(uuid); 188 m_NewlyCreatedEntityAura.Remove(uuid);
189 return true; 189 return true;
190 } 190 }
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index e1b4129..1a41c7b 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -27,8 +27,8 @@
27 27
28#region Header 28#region Header
29 29
30// CMModel.cs 30// CMModel.cs
31// User: bongiojp 31// User: bongiojp
32// 32//
33// 33//
34 34
@@ -100,13 +100,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
100 ArrayList missingList = null; 100 ArrayList missingList = null;
101 ArrayList newList = new ArrayList(); 101 ArrayList newList = new ArrayList();
102 102
103 m_log.Debug("[CONTENT MANAGEMENT] Checking for new scene object parts in scene: " + scene.RegionInfo.RegionName); 103 m_log.Debug("[CONTENT MANAGEMENT] Checking for new scene object parts in scene: " + scene.RegionInfo.RegionName);
104 104
105 //Check if the current scene has groups not included in the current list of MetaEntities 105 //Check if the current scene has groups not included in the current list of MetaEntities
106 //If so, then the current scene's parts that are new should be marked green. 106 //If so, then the current scene's parts that are new should be marked green.
107 missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities()); 107 missingList = m_MetaEntityCollection.CheckForMissingEntities(scene.GetEntities());
108 108
109 foreach(Object missingPart in missingList) 109 foreach (Object missingPart in missingList)
110 { 110 {
111 if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID)) 111 if (m_MetaEntityCollection.Auras.ContainsKey(((SceneObjectPart)missingPart).UUID))
112 continue; 112 continue;
@@ -175,16 +175,16 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
175 public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group) 175 public void RemoveOrUpdateDeletedEntity(SceneObjectGroup group)
176 { 176 {
177 // Deal with new parts not revisioned that have been deleted. 177 // Deal with new parts not revisioned that have been deleted.
178 foreach(SceneObjectPart part in group.Children.Values) 178 foreach (SceneObjectPart part in group.Children.Values)
179 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) 179 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
180 m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID); 180 m_MetaEntityCollection.RemoveNewlyCreatedEntityAura(part.UUID);
181 } 181 }
182 182
183 /// <summary> 183 /// <summary>
184 /// Retrieves the latest revision of a region in xml form, 184 /// Retrieves the latest revision of a region in xml form,
185 /// converts it to scene object groups and scene presences, 185 /// converts it to scene object groups and scene presences,
186 /// swaps the current scene's entity list with the revision's list. 186 /// swaps the current scene's entity list with the revision's list.
187 /// Note: Since deleted objects while 187 /// Note: Since deleted objects while
188 /// </summary> 188 /// </summary>
189 public void RollbackRegion(Scene scene) 189 public void RollbackRegion(Scene scene)
190 { 190 {
@@ -214,26 +214,26 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
214 try{ 214 try{
215 temp = new SceneObjectGroup(xml); 215 temp = new SceneObjectGroup(xml);
216 temp.SetScene(scene); 216 temp.SetScene(scene);
217 foreach(SceneObjectPart part in temp.Children.Values) 217 foreach (SceneObjectPart part in temp.Children.Values)
218 part.RegionHandle = scene.RegionInfo.RegionHandle; 218 part.RegionHandle = scene.RegionInfo.RegionHandle;
219 ReplacementList.Add(temp.UUID, (EntityBase)temp); 219 ReplacementList.Add(temp.UUID, (EntityBase)temp);
220 } 220 }
221 catch(Exception e) 221 catch(Exception e)
222 { 222 {
223 m_log.Info("[CMMODEL]: Error while creating replacement list for rollback: " + e); 223 m_log.Info("[CMMODEL]: Error while creating replacement list for rollback: " + e);
224 } 224 }
225 } 225 }
226 226
227 //If in scene but not in revision and not a client, remove them 227 //If in scene but not in revision and not a client, remove them
228 while (true) 228 while (true)
229 { 229 {
230 try 230 try
231 { 231 {
232 foreach(EntityBase entity in scene.GetEntities()) 232 foreach (EntityBase entity in scene.GetEntities())
233 { 233 {
234 if (entity == null) 234 if (entity == null)
235 continue; 235 continue;
236 236
237 if (entity is ScenePresence) 237 if (entity is ScenePresence)
238 { 238 {
239 ReplacementList.Add(entity.UUID, entity); 239 ReplacementList.Add(entity.UUID, entity);
@@ -253,9 +253,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
253 break; 253 break;
254 } 254 }
255 255
256 foreach(UUID uuid in deleteListUUIDs.Keys) 256 foreach (UUID uuid in deleteListUUIDs.Keys)
257 { 257 {
258 try 258 try
259 { 259 {
260 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. 260 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles.
261 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); 261 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]);
@@ -275,13 +275,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
275 scene.Entities = ReplacementList; 275 scene.Entities = ReplacementList;
276 } 276 }
277 277
278 foreach(EntityBase ent in ReplacementList.Values) 278 foreach (EntityBase ent in ReplacementList.Values)
279 { 279 {
280 try 280 try
281 { 281 {
282 if (!(ent is SceneObjectGroup)) 282 if (!(ent is SceneObjectGroup))
283 continue; 283 continue;
284 284
285 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0) 285 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0)
286 ((SceneObjectGroup)ent).ApplyPhysics(true); 286 ((SceneObjectGroup)ent).ApplyPhysics(true);
287 ((SceneObjectGroup)ent).AttachToBackup(); 287 ((SceneObjectGroup)ent).AttachToBackup();
@@ -319,15 +319,15 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
319 m_MetaEntityCollection.CreateNewEntity(xml, scene); 319 m_MetaEntityCollection.CreateNewEntity(xml, scene);
320 y.Stop(); 320 y.Stop();
321 TimeToConvertXml += y.ElapsedMilliseconds; 321 TimeToConvertXml += y.ElapsedMilliseconds;
322 m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities for " + scene.RegionInfo.RegionName + ": " + y.ElapsedMilliseconds); 322 m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities for " + scene.RegionInfo.RegionName + ": " + y.ElapsedMilliseconds);
323 m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities so far: " + TimeToConvertXml); 323 m_log.Info("[FileSystemDatabase] Time spent converting xml to metaentities so far: " + TimeToConvertXml);
324 324
325 m_log.Info("[FSDB]: checking for new scene object parts missing green auras and create the auras"); 325 m_log.Info("[FSDB]: checking for new scene object parts missing green auras and create the auras");
326 CheckForNewEntitiesMissingAuras(scene); 326 CheckForNewEntitiesMissingAuras(scene);
327 327
328 x.Stop(); 328 x.Stop();
329 TimeToUpdate += x.ElapsedMilliseconds; 329 TimeToUpdate += x.ElapsedMilliseconds;
330 m_log.Info("[FileSystemDatabase] Time spent Updating entity list for " + scene.RegionInfo.RegionName + ": " + x.ElapsedMilliseconds); 330 m_log.Info("[FileSystemDatabase] Time spent Updating entity list for " + scene.RegionInfo.RegionName + ": " + x.ElapsedMilliseconds);
331 m_log.Info("[FileSystemDatabase] Time spent Updating so far: " + TimeToUpdate); 331 m_log.Info("[FileSystemDatabase] Time spent Updating so far: " + TimeToUpdate);
332 } 332 }
333 333
@@ -340,7 +340,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
340 System.Collections.ArrayList auraList = new System.Collections.ArrayList(); 340 System.Collections.ArrayList auraList = new System.Collections.ArrayList();
341 if (group == null) 341 if (group == null)
342 return null; 342 return null;
343 foreach(SceneObjectPart part in group.Children.Values) 343 foreach (SceneObjectPart part in group.Children.Values)
344 { 344 {
345 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) 345 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
346 { 346 {
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
index 90ef6ef..88f4a67 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
@@ -78,46 +78,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
78 // Auras To 78 // Auras To
79 public void DisplayAuras(CMEntityCollection auraCollection) 79 public void DisplayAuras(CMEntityCollection auraCollection)
80 { 80 {
81 foreach( Object ent in auraCollection.Auras.Values) 81 foreach (Object ent in auraCollection.Auras.Values)
82 ((AuraMetaEntity)ent).SendFullUpdateToAll(); 82 ((AuraMetaEntity)ent).SendFullUpdateToAll();
83 } 83 }
84 84
85 // Auras To Client 85 // Auras To Client
86 public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client) 86 public void DisplayAuras(CMEntityCollection auraCollection, IClientAPI client)
87 { 87 {
88 foreach( Object ent in auraCollection.Auras.Values) 88 foreach (Object ent in auraCollection.Auras.Values)
89 ((AuraMetaEntity)ent).SendFullUpdate(client); 89 ((AuraMetaEntity)ent).SendFullUpdate(client);
90 } 90 }
91 91
92 // Auras from List To ALL 92 // Auras from List To ALL
93 public void DisplayAuras(ArrayList list) 93 public void DisplayAuras(ArrayList list)
94 { 94 {
95 foreach( Object ent in list) 95 foreach (Object ent in list)
96 { 96 {
97 m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW"); 97 m_log.Debug("[CONTENT MANAGEMENT] displaying new aura riiiiiiiiiiiight NOW");
98 ((AuraMetaEntity)ent).SendFullUpdateToAll(); 98 ((AuraMetaEntity)ent).SendFullUpdateToAll();
99 } 99 }
100 } 100 }
101 101
102 // Entities to ALL 102 // Entities to ALL
103 public void DisplayEntities(CMEntityCollection entityCollection) 103 public void DisplayEntities(CMEntityCollection entityCollection)
104 { 104 {
105 foreach( Object ent in entityCollection.Entities.Values) 105 foreach (Object ent in entityCollection.Entities.Values)
106 ((ContentManagementEntity)ent).SendFullDiffUpdateToAll(); 106 ((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
107 } 107 }
108 108
109 // Entities to Client 109 // Entities to Client
110 public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client) 110 public void DisplayEntities(CMEntityCollection entityCollection, IClientAPI client)
111 { 111 {
112 foreach( Object ent in entityCollection.Entities.Values) 112 foreach (Object ent in entityCollection.Entities.Values)
113 ((ContentManagementEntity)ent).SendFullDiffUpdate(client); 113 ((ContentManagementEntity)ent).SendFullDiffUpdate(client);
114 } 114 }
115 115
116 // Entities from List to ALL 116 // Entities from List to ALL
117 public void DisplayEntities(ArrayList list) 117 public void DisplayEntities(ArrayList list)
118 { 118 {
119 foreach( Object ent in list) 119 foreach (Object ent in list)
120 ((ContentManagementEntity)ent).SendFullDiffUpdateToAll(); 120 ((ContentManagementEntity)ent).SendFullDiffUpdateToAll();
121 } 121 }
122 122
123 // Entity to ALL 123 // Entity to ALL
@@ -138,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
138 { 138 {
139 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); 139 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
140 if (group != null) 140 if (group != null)
141 group.SendFullDiffUpdateToAll(); 141 group.SendFullDiffUpdateToAll();
142 } 142 }
143 143
144 /// <summary> 144 /// <summary>
@@ -158,14 +158,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
158 158
159 public void HideAllAuras() 159 public void HideAllAuras()
160 { 160 {
161 foreach(Object obj in m_model.MetaEntityCollection.Auras.Values) 161 foreach (Object obj in m_model.MetaEntityCollection.Auras.Values)
162 ((MetaEntity)obj).HideFromAll(); 162 ((MetaEntity)obj).HideFromAll();
163 } 163 }
164 164
165 public void HideAllMetaEntities() 165 public void HideAllMetaEntities()
166 { 166 {
167 foreach(Object obj in m_model.MetaEntityCollection.Entities.Values) 167 foreach (Object obj in m_model.MetaEntityCollection.Entities.Values)
168 ((ContentManagementEntity)obj).HideFromAll(); 168 ((ContentManagementEntity)obj).HideFromAll();
169 } 169 }
170 170
171 public void Initialise(CMModel model) 171 public void Initialise(CMModel model)
@@ -183,12 +183,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
183 { 183 {
184 // Deal with revisioned parts that have been deleted. 184 // Deal with revisioned parts that have been deleted.
185 if (m_model.MetaEntityCollection.Entities.ContainsKey(group.UUID)) 185 if (m_model.MetaEntityCollection.Entities.ContainsKey(group.UUID))
186 ((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll(); 186 ((ContentManagementEntity)m_model.MetaEntityCollection.Entities[group.UUID]).SendFullDiffUpdateToAll();
187 187
188 // Deal with new parts not revisioned that have been deleted. 188 // Deal with new parts not revisioned that have been deleted.
189 foreach(SceneObjectPart part in group.Children.Values) 189 foreach (SceneObjectPart part in group.Children.Values)
190 if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID)) 190 if (m_model.MetaEntityCollection.Auras.ContainsKey(part.UUID))
191 ((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll(); 191 ((AuraMetaEntity)m_model.MetaEntityCollection.Auras[part.UUID]).HideFromAll();
192 } 192 }
193 193
194 public void SendMetaEntitiesToNewClient(IClientAPI client) 194 public void SendMetaEntitiesToNewClient(IClientAPI client)
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index 819ff87..13f5cc0 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -104,13 +104,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
104 #region Private Methods 104 #region Private Methods
105 105
106 /// <summary> 106 /// <summary>
107 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid. 107 /// Check if an entitybase list (like that returned by scene.GetEntities()) contains a group with the rootpart uuid that matches the current uuid.
108 /// </summary> 108 /// </summary>
109 private bool ContainsKey(List<EntityBase> list, UUID uuid) 109 private bool ContainsKey(List<EntityBase> list, UUID uuid)
110 { 110 {
111 foreach( EntityBase part in list) 111 foreach (EntityBase part in list)
112 if (part.UUID == uuid) 112 if (part.UUID == uuid)
113 return true; 113 return true;
114 return false; 114 return false;
115 } 115 }
116 116
@@ -118,9 +118,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
118 { 118 {
119 foreach (EntityBase ent in list) 119 foreach (EntityBase ent in list)
120 { 120 {
121 if (ent is SceneObjectGroup) 121 if (ent is SceneObjectGroup)
122 if (ent.UUID == uuid) 122 if (ent.UUID == uuid)
123 return (SceneObjectGroup)ent; 123 return (SceneObjectGroup)ent;
124 } 124 }
125 return null; 125 return null;
126 } 126 }
@@ -138,49 +138,49 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
138 System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities(); 138 System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities();
139 DiffersFromSceneGroup = false; 139 DiffersFromSceneGroup = false;
140 // if group is not contained in scene's list 140 // if group is not contained in scene's list
141 if(!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID)) 141 if (!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID))
142 { 142 {
143 foreach(SceneObjectPart part in m_UnchangedEntity.Children.Values) 143 foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
144 { 144 {
145 // if scene list no longer contains this part, display translucent part and mark with red aura 145 // if scene list no longer contains this part, display translucent part and mark with red aura
146 if(! ContainsKey(sceneEntityList, part.UUID)) 146 if (!ContainsKey(sceneEntityList, part.UUID))
147 { 147 {
148 // if already displaying a red aura over part, make sure its red 148 // if already displaying a red aura over part, make sure its red
149 if (m_AuraEntities.ContainsKey(part.UUID)) 149 if (m_AuraEntities.ContainsKey(part.UUID))
150 { 150 {
151 m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale); 151 m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
152 } 152 }
153 else 153 else
154 { 154 {
155 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 155 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
156 m_Entity.Scene.PrimIDAllocate(), 156 m_Entity.Scene.PrimIDAllocate(),
157 part.GetWorldPosition(), 157 part.GetWorldPosition(),
158 MetaEntity.TRANSLUCENT, 158 MetaEntity.TRANSLUCENT,
159 new Vector3(254,0,0), 159 new Vector3(254,0,0),
160 part.Scale 160 part.Scale
161 ); 161 );
162 m_AuraEntities.Add(part.UUID, auraGroup); 162 m_AuraEntities.Add(part.UUID, auraGroup);
163 } 163 }
164 SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum); 164 SceneObjectPart metaPart = m_Entity.GetLinkNumPart(part.LinkNum);
165 SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT); 165 SetPartTransparency(metaPart, MetaEntity.TRANSLUCENT);
166 } 166 }
167 // otherwise, scene will not contain the part. note: a group can not remove a part without changing group id 167 // otherwise, scene will not contain the part. note: a group can not remove a part without changing group id
168 } 168 }
169 169
170 // a deleted part has no where to point a beam particle system, 170 // a deleted part has no where to point a beam particle system,
171 // if a metapart had a particle system (maybe it represented a moved part) remove it 171 // if a metapart had a particle system (maybe it represented a moved part) remove it
172 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) 172 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
173 { 173 {
174 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); 174 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
175 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); 175 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
176 } 176 }
177 177
178 DiffersFromSceneGroup = true; 178 DiffersFromSceneGroup = true;
179 } 179 }
180 // if scene list does contain group, compare each part in group for differences and display beams and auras appropriately 180 // if scene list does contain group, compare each part in group for differences and display beams and auras appropriately
181 else 181 else
182 { 182 {
183 MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID)); 183 MarkWithDifferences((SceneObjectGroup)GetGroupByUUID(sceneEntityList, m_UnchangedEntity.UUID));
184 } 184 }
185 } 185 }
186 186
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
190 public bool HasChildPrim(UUID uuid) 190 public bool HasChildPrim(UUID uuid)
191 { 191 {
192 if (m_UnchangedEntity.Children.ContainsKey(uuid)) 192 if (m_UnchangedEntity.Children.ContainsKey(uuid))
193 return true; 193 return true;
194 return false; 194 return false;
195 } 195 }
196 196
@@ -199,28 +199,28 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
199 /// </summary> 199 /// </summary>
200 public bool HasChildPrim(uint localID) 200 public bool HasChildPrim(uint localID)
201 { 201 {
202 foreach( SceneObjectPart part in m_UnchangedEntity.Children.Values) 202 foreach (SceneObjectPart part in m_UnchangedEntity.Children.Values)
203 if ( part.LocalId == localID ) 203 if (part.LocalId == localID)
204 return true; 204 return true;
205 return false; 205 return false;
206 } 206 }
207 207
208 public override void Hide(IClientAPI client) 208 public override void Hide(IClientAPI client)
209 { 209 {
210 base.Hide(client); 210 base.Hide(client);
211 foreach(MetaEntity group in m_AuraEntities.Values) 211 foreach (MetaEntity group in m_AuraEntities.Values)
212 group.Hide(client); 212 group.Hide(client);
213 foreach(MetaEntity group in m_BeamEntities.Values) 213 foreach (MetaEntity group in m_BeamEntities.Values)
214 group.Hide(client); 214 group.Hide(client);
215 } 215 }
216 216
217 public override void HideFromAll() 217 public override void HideFromAll()
218 { 218 {
219 base.HideFromAll(); 219 base.HideFromAll();
220 foreach(MetaEntity group in m_AuraEntities.Values) 220 foreach (MetaEntity group in m_AuraEntities.Values)
221 group.HideFromAll(); 221 group.HideFromAll();
222 foreach(MetaEntity group in m_BeamEntities.Values) 222 foreach (MetaEntity group in m_BeamEntities.Values)
223 group.HideFromAll(); 223 group.HideFromAll();
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
@@ -234,92 +234,92 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
234 Diff differences; 234 Diff differences;
235 bool changed = false; 235 bool changed = false;
236 236
237 // Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user 237 // Use "UnchangedEntity" to do comparisons because its text, transparency, and other attributes will be just as the user
238 // had originally saved. 238 // had originally saved.
239 // m_Entity will NOT necessarily be the same entity as the user had saved. 239 // m_Entity will NOT necessarily be the same entity as the user had saved.
240 foreach(SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values) 240 foreach (SceneObjectPart UnchangedPart in m_UnchangedEntity.Children.Values)
241 { 241 {
242 //This is the part that we use to show changes. 242 //This is the part that we use to show changes.
243 metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum); 243 metaEntityPart = m_Entity.GetLinkNumPart(UnchangedPart.LinkNum);
244 if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID)) 244 if (sceneEntityGroup.Children.ContainsKey(UnchangedPart.UUID))
245 { 245 {
246 sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID]; 246 sceneEntityPart = sceneEntityGroup.Children[UnchangedPart.UUID];
247 differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart); 247 differences = Difference.FindDifferences(UnchangedPart, sceneEntityPart);
248 if (differences != Diff.NONE) 248 if (differences != Diff.NONE)
249 metaEntityPart.Text = "CHANGE: " + differences.ToString(); 249 metaEntityPart.Text = "CHANGE: " + differences.ToString();
250 if (differences != 0) 250 if (differences != 0)
251 { 251 {
252 // Root Part that has been modified 252 // Root Part that has been modified
253 if ((differences&Diff.POSITION) > 0) 253 if ((differences&Diff.POSITION) > 0)
254 { 254 {
255 // If the position of any part has changed, make sure the RootPart of the 255 // If the position of any part has changed, make sure the RootPart of the
256 // meta entity is pointing with a beam particle system 256 // meta entity is pointing with a beam particle system
257 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) 257 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
258 { 258 {
259 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); 259 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
260 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); 260 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
261 } 261 }
262 BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene, 262 BeamMetaEntity beamGroup = new BeamMetaEntity(m_Entity.Scene,
263 m_Entity.Scene.PrimIDAllocate(), 263 m_Entity.Scene.PrimIDAllocate(),
264 m_UnchangedEntity.RootPart.GetWorldPosition(), 264 m_UnchangedEntity.RootPart.GetWorldPosition(),
265 MetaEntity.TRANSLUCENT, 265 MetaEntity.TRANSLUCENT,
266 sceneEntityPart, 266 sceneEntityPart,
267 new Vector3(0,0,254) 267 new Vector3(0,0,254)
268 ); 268 );
269 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); 269 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
270 } 270 }
271 271
272 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) 272 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
273 { 273 {
274 m_AuraEntities[UnchangedPart.UUID].HideFromAll(); 274 m_AuraEntities[UnchangedPart.UUID].HideFromAll();
275 m_AuraEntities.Remove(UnchangedPart.UUID); 275 m_AuraEntities.Remove(UnchangedPart.UUID);
276 } 276 }
277 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 277 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
278 m_Entity.Scene.PrimIDAllocate(), 278 m_Entity.Scene.PrimIDAllocate(),
279 UnchangedPart.GetWorldPosition(), 279 UnchangedPart.GetWorldPosition(),
280 MetaEntity.TRANSLUCENT, 280 MetaEntity.TRANSLUCENT,
281 new Vector3(0,0,254), 281 new Vector3(0,0,254),
282 UnchangedPart.Scale 282 UnchangedPart.Scale
283 ); 283 );
284 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 284 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
285 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT); 285 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
286 286
287 DiffersFromSceneGroup = true; 287 DiffersFromSceneGroup = true;
288 } 288 }
289 else // no differences between scene part and meta part 289 else // no differences between scene part and meta part
290 { 290 {
291 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID)) 291 if (m_BeamEntities.ContainsKey(m_UnchangedEntity.RootPart.UUID))
292 { 292 {
293 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll(); 293 m_BeamEntities[m_UnchangedEntity.RootPart.UUID].HideFromAll();
294 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID); 294 m_BeamEntities.Remove(m_UnchangedEntity.RootPart.UUID);
295 } 295 }
296 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) 296 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
297 { 297 {
298 m_AuraEntities[UnchangedPart.UUID].HideFromAll(); 298 m_AuraEntities[UnchangedPart.UUID].HideFromAll();
299 m_AuraEntities.Remove(UnchangedPart.UUID); 299 m_AuraEntities.Remove(UnchangedPart.UUID);
300 } 300 }
301 SetPartTransparency(metaEntityPart, MetaEntity.NONE); 301 SetPartTransparency(metaEntityPart, MetaEntity.NONE);
302 } 302 }
303 } 303 }
304 else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted. 304 else //The entity currently in the scene is missing parts from the metaentity saved, so mark parts red as deleted.
305 { 305 {
306 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID)) 306 if (m_AuraEntities.ContainsKey(UnchangedPart.UUID))
307 { 307 {
308 m_AuraEntities[UnchangedPart.UUID].HideFromAll(); 308 m_AuraEntities[UnchangedPart.UUID].HideFromAll();
309 m_AuraEntities.Remove(UnchangedPart.UUID); 309 m_AuraEntities.Remove(UnchangedPart.UUID);
310 } 310 }
311 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene, 311 AuraMetaEntity auraGroup = new AuraMetaEntity(m_Entity.Scene,
312 m_Entity.Scene.PrimIDAllocate(), 312 m_Entity.Scene.PrimIDAllocate(),
313 UnchangedPart.GetWorldPosition(), 313 UnchangedPart.GetWorldPosition(),
314 MetaEntity.TRANSLUCENT, 314 MetaEntity.TRANSLUCENT,
315 new Vector3(254,0,0), 315 new Vector3(254,0,0),
316 UnchangedPart.Scale 316 UnchangedPart.Scale
317 ); 317 );
318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
319 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT); 319 SetPartTransparency(metaEntityPart, MetaEntity.TRANSLUCENT);
320 320
321 DiffersFromSceneGroup = true; 321 DiffersFromSceneGroup = true;
322 } 322 }
323 } 323 }
324 return changed; 324 return changed;
325 } 325 }
@@ -328,8 +328,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
328 { 328 {
329 if (DiffersFromSceneGroup) 329 if (DiffersFromSceneGroup)
330 { 330 {
331 foreach(AuraMetaEntity group in m_AuraEntities.Values) 331 foreach (AuraMetaEntity group in m_AuraEntities.Values)
332 group.SendFullUpdate(client); 332 group.SendFullUpdate(client);
333 } 333 }
334 } 334 }
335 335
@@ -337,8 +337,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
337 { 337 {
338 if (DiffersFromSceneGroup) 338 if (DiffersFromSceneGroup)
339 { 339 {
340 foreach(AuraMetaEntity group in m_AuraEntities.Values) 340 foreach (AuraMetaEntity group in m_AuraEntities.Values)
341 group.SendFullUpdateToAll(); 341 group.SendFullUpdateToAll();
342 } 342 }
343 } 343 }
344 344
@@ -346,8 +346,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
346 { 346 {
347 if (DiffersFromSceneGroup) 347 if (DiffersFromSceneGroup)
348 { 348 {
349 foreach(BeamMetaEntity group in m_BeamEntities.Values) 349 foreach (BeamMetaEntity group in m_BeamEntities.Values)
350 group.SendFullUpdate(client); 350 group.SendFullUpdate(client);
351 } 351 }
352 } 352 }
353 353
@@ -355,8 +355,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
355 { 355 {
356 if (DiffersFromSceneGroup) 356 if (DiffersFromSceneGroup)
357 { 357 {
358 foreach(BeamMetaEntity group in m_BeamEntities.Values) 358 foreach (BeamMetaEntity group in m_BeamEntities.Values)
359 group.SendFullUpdateToAll(); 359 group.SendFullUpdateToAll();
360 } 360 }
361 } 361 }
362 362
@@ -365,9 +365,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
365 FindDifferences(); 365 FindDifferences();
366 if (DiffersFromSceneGroup) 366 if (DiffersFromSceneGroup)
367 { 367 {
368 SendFullUpdate(client); 368 SendFullUpdate(client);
369 SendFullAuraUpdate(client); 369 SendFullAuraUpdate(client);
370 SendFullBeamUpdate(client); 370 SendFullBeamUpdate(client);
371 } 371 }
372 } 372 }
373 373
@@ -376,9 +376,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
376 FindDifferences(); 376 FindDifferences();
377 if (DiffersFromSceneGroup) 377 if (DiffersFromSceneGroup)
378 { 378 {
379 SendFullUpdateToAll(); 379 SendFullUpdateToAll();
380 SendFullAuraUpdateToAll(); 380 SendFullAuraUpdateToAll();
381 SendFullBeamUpdateToAll(); 381 SendFullBeamUpdateToAll();
382 } 382 }
383 } 383 }
384 384
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
index 85eb927..f52c3b8 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
@@ -27,7 +27,7 @@
27 27
28#region Header 28#region Header
29 29
30// ContentManagementModule.cs 30// ContentManagementModule.cs
31// User: bongiojp 31// User: bongiojp
32 32
33#endregion Header 33#endregion Header
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
98 { 98 {
99 if (source.Configs["CMS"] == null) 99 if (source.Configs["CMS"] == null)
100 return; 100 return;
101 101
102 m_enabled = source.Configs["CMS"].GetBoolean("enabled", false); 102 m_enabled = source.Configs["CMS"].GetBoolean("enabled", false);
103 databaseDir = source.Configs["CMS"].GetString("directory", databaseDir); 103 databaseDir = source.Configs["CMS"].GetString("directory", databaseDir);
104 database = source.Configs["CMS"].GetString("database", database); 104 database = source.Configs["CMS"].GetString("database", database);
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
122 return; 122 return;
123 } 123 }
124 124
125 lock(this) 125 lock (this)
126 { 126 {
127 if (!initialised) //only init once 127 if (!initialised) //only init once
128 { 128 {
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
131 m_control = new CMController(m_model, m_view, scene, channel); 131 m_control = new CMController(m_model, m_view, scene, channel);
132 m_model.Initialise(database); 132 m_model.Initialise(database);
133 m_view.Initialise(m_model); 133 m_view.Initialise(m_model);
134 134
135 initialised = true; 135 initialised = true;
136 m_model.InitialiseDatabase(scene, databaseDir); 136 m_model.InitialiseDatabase(scene, databaseDir);
137 } 137 }
@@ -148,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
148 if (! m_enabled) 148 if (! m_enabled)
149 return; 149 return;
150 150
151 lock(this) 151 lock (this)
152 { 152 {
153 if (!m_posted) //only post once 153 if (!m_posted) //only post once
154 { 154 {
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index 66d279a..607f6a9 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -28,7 +28,7 @@
28#region Header 28#region Header
29 29
30// FileSystemDatabase.cs 30// FileSystemDatabase.cs
31// User: bongiojp 31// User: bongiojp
32 32
33#endregion Header 33#endregion Header
34 34
@@ -88,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
88 { 88 {
89 string scenedir; 89 string scenedir;
90 if (!Directory.Exists(m_repodir)) 90 if (!Directory.Exists(m_repodir))
91 Directory.CreateDirectory(m_repodir); 91 Directory.CreateDirectory(m_repodir);
92 92
93 foreach (UUID region in m_scenes.Keys) 93 foreach (UUID region in m_scenes.Keys)
94 { 94 {
95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; 95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
96 if (!Directory.Exists(scenedir)) 96 if (!Directory.Exists(scenedir))
97 Directory.CreateDirectory(scenedir); 97 Directory.CreateDirectory(scenedir);
98 } 98 }
99 } 99 }
100 100
@@ -102,10 +102,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
102 private void SetupSerialiser() 102 private void SetupSerialiser()
103 { 103 {
104 if (m_serialiser.Count == 0) 104 if (m_serialiser.Count == 0)
105 foreach(UUID region in m_scenes.Keys) 105 {
106 m_serialiser.Add(region, 106 foreach (UUID region in m_scenes.Keys)
107 m_scenes[region].RequestModuleInterface<IRegionSerialiser>() 107 {
108 ); 108 m_serialiser.Add(region,
109 m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
110 );
111 }
112 }
109 } 113 }
110 114
111 #endregion Private Methods 115 #endregion Private Methods
@@ -120,7 +124,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
120 public string GetRegionObjectHeightMap(UUID regionid) 124 public string GetRegionObjectHeightMap(UUID regionid)
121 { 125 {
122 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 126 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
123 Slash.DirectorySeparatorChar + "heightmap.r32"; 127 Slash.DirectorySeparatorChar + "heightmap.r32";
124 FileStream fs = new FileStream( filename, FileMode.Open); 128 FileStream fs = new FileStream( filename, FileMode.Open);
125 StreamReader sr = new StreamReader(fs); 129 StreamReader sr = new StreamReader(fs);
126 String result = sr.ReadToEnd(); 130 String result = sr.ReadToEnd();
@@ -132,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
132 public string GetRegionObjectHeightMap(UUID regionid, int revision) 136 public string GetRegionObjectHeightMap(UUID regionid, int revision)
133 { 137 {
134 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 138 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
135 Slash.DirectorySeparatorChar + "heightmap.r32"; 139 Slash.DirectorySeparatorChar + "heightmap.r32";
136 FileStream fs = new FileStream( filename, FileMode.Open); 140 FileStream fs = new FileStream( filename, FileMode.Open);
137 StreamReader sr = new StreamReader(fs); 141 StreamReader sr = new StreamReader(fs);
138 String result = sr.ReadToEnd(); 142 String result = sr.ReadToEnd();
@@ -144,14 +148,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
144 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision) 148 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
145 { 149 {
146 System.Collections.ArrayList objectList = new System.Collections.ArrayList(); 150 System.Collections.ArrayList objectList = new System.Collections.ArrayList();
147 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 151 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
148 + revision + Slash.DirectorySeparatorChar + "objects.xml"; 152 + revision + Slash.DirectorySeparatorChar + "objects.xml";
149 XmlDocument doc = new XmlDocument(); 153 XmlDocument doc = new XmlDocument();
150 XmlNode rootNode; 154 XmlNode rootNode;
151 //int primCount = 0; 155 //int primCount = 0;
152 //SceneObjectGroup obj = null; 156 //SceneObjectGroup obj = null;
153 157
154 if(File.Exists(filename)) 158 if (File.Exists(filename))
155 { 159 {
156 XmlTextReader reader = new XmlTextReader(filename); 160 XmlTextReader reader = new XmlTextReader(filename);
157 reader.WhitespaceHandling = WhitespaceHandling.None; 161 reader.WhitespaceHandling = WhitespaceHandling.None;
@@ -160,9 +164,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 rootNode = doc.FirstChild; 164 rootNode = doc.FirstChild;
161 foreach (XmlNode aPrimNode in rootNode.ChildNodes) 165 foreach (XmlNode aPrimNode in rootNode.ChildNodes)
162 { 166 {
163 objectList.Add(aPrimNode.OuterXml); 167 objectList.Add(aPrimNode.OuterXml);
164 } 168 }
165 return objectList; 169 return objectList;
166 } 170 }
167 return null; 171 return null;
168 } 172 }
@@ -172,45 +176,46 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
172 int revision = NumOfRegionRev(regionid); 176 int revision = NumOfRegionRev(regionid);
173 m_log.Info("[FSDB]: found revisions:" + revision); 177 m_log.Info("[FSDB]: found revisions:" + revision);
174 System.Collections.ArrayList xmlList = new System.Collections.ArrayList(); 178 System.Collections.ArrayList xmlList = new System.Collections.ArrayList();
175 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 179 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
176 + revision + Slash.DirectorySeparatorChar + "objects.xml"; 180 + revision + Slash.DirectorySeparatorChar + "objects.xml";
177 XmlDocument doc = new XmlDocument(); 181 XmlDocument doc = new XmlDocument();
178 XmlNode rootNode; 182 XmlNode rootNode;
179 183
180
181 m_log.Info("[FSDB]: Checking if " + filename + " exists."); 184 m_log.Info("[FSDB]: Checking if " + filename + " exists.");
182 if(File.Exists(filename)) 185 if (File.Exists(filename))
183 { 186 {
184 Stopwatch x = new Stopwatch(); 187 Stopwatch x = new Stopwatch();
185 x.Start(); 188 x.Start();
186 189
187 XmlTextReader reader = new XmlTextReader(filename); 190 XmlTextReader reader = new XmlTextReader(filename);
188 reader.WhitespaceHandling = WhitespaceHandling.None; 191 reader.WhitespaceHandling = WhitespaceHandling.None;
189 doc.Load(reader); 192 doc.Load(reader);
190 reader.Close(); 193 reader.Close();
191 rootNode = doc.FirstChild; 194 rootNode = doc.FirstChild;
192 195
193 foreach (XmlNode aPrimNode in rootNode.ChildNodes) 196 foreach (XmlNode aPrimNode in rootNode.ChildNodes)
194 xmlList.Add(aPrimNode.OuterXml); 197 {
195 198 xmlList.Add(aPrimNode.OuterXml);
196 x.Stop(); 199 }
197 TimeToDownload += x.ElapsedMilliseconds; 200
198 m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload); 201 x.Stop();
199 202 TimeToDownload += x.ElapsedMilliseconds;
200 return xmlList; 203 m_log.Info("[FileSystemDatabase] Time spent retrieving xml files so far: " + TimeToDownload);
204
205 return xmlList;
201 } 206 }
202 return null; 207 return null;
203 } 208 }
204 209
205 public void Initialise(Scene scene, string dir) 210 public void Initialise(Scene scene, string dir)
206 { 211 {
207 lock(this) 212 lock (this)
208 { 213 {
209 if (m_repodir == null) 214 if (m_repodir == null)
210 m_repodir = dir; 215 m_repodir = dir;
211 } 216 }
212 lock(m_scenes) 217 lock (m_scenes)
213 m_scenes.Add(scene.RegionInfo.RegionID, scene); 218 m_scenes.Add(scene.RegionInfo.RegionID, scene);
214 } 219 }
215 220
216 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid) 221 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
@@ -224,19 +229,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
224 StreamReader sr = null; 229 StreamReader sr = null;
225 String logMessage = ""; 230 String logMessage = "";
226 String logLocation = ""; 231 String logLocation = "";
227 foreach(string revisionDir in directories) 232 foreach (string revisionDir in directories)
228 { 233 {
229 try { 234 try
230 logLocation = revisionDir + Slash.DirectorySeparatorChar + "log"; 235 {
231 fs = new FileStream( logLocation, FileMode.Open); 236 logLocation = revisionDir + Slash.DirectorySeparatorChar + "log";
232 sr = new StreamReader(fs); 237 fs = new FileStream( logLocation, FileMode.Open);
233 logMessage = sr.ReadToEnd(); 238 sr = new StreamReader(fs);
234 sr.Close(); 239 logMessage = sr.ReadToEnd();
235 fs.Close(); 240 sr.Close();
236 revisionDict.Add(revisionDir, logMessage); 241 fs.Close();
237 } 242 revisionDict.Add(revisionDir, logMessage);
238 catch (Exception) 243 }
239 {} 244 catch (Exception)
245 {
246 }
240 } 247 }
241 248
242 return revisionDict; 249 return revisionDict;
@@ -254,9 +261,9 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
254 public void PostInitialise() 261 public void PostInitialise()
255 { 262 {
256 SetupSerialiser(); 263 SetupSerialiser();
257 264
258 m_log.Info("[FSDB]: Creating repository in " + m_repodir + "."); 265 m_log.Info("[FSDB]: Creating repository in " + m_repodir + ".");
259 CreateDirectory(); 266 CreateDirectory();
260 } 267 }
261 268
262 public void SaveRegion(UUID regionid, string regionName, string logMessage) 269 public void SaveRegion(UUID regionid, string regionName, string logMessage)
@@ -266,44 +273,44 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 273
267 m_log.Info("[FSDB]: checking if scene directory exists: " + scenedir); 274 m_log.Info("[FSDB]: checking if scene directory exists: " + scenedir);
268 if (!Directory.Exists(scenedir)) 275 if (!Directory.Exists(scenedir))
269 Directory.CreateDirectory(scenedir); 276 Directory.CreateDirectory(scenedir);
270 277
271 int newRevisionNum = GetMostRecentRevision(regionid)+1; 278 int newRevisionNum = GetMostRecentRevision(regionid)+1;
272 string revisiondir = scenedir + newRevisionNum + Slash.DirectorySeparatorChar; 279 string revisiondir = scenedir + newRevisionNum + Slash.DirectorySeparatorChar;
273 280
274 m_log.Info("[FSDB]: checking if revision directory exists: " + revisiondir); 281 m_log.Info("[FSDB]: checking if revision directory exists: " + revisiondir);
275 if (!Directory.Exists(revisiondir)) 282 if (!Directory.Exists(revisiondir))
276 Directory.CreateDirectory(revisiondir); 283 Directory.CreateDirectory(revisiondir);
277 284
278 try { 285 try {
279 Stopwatch x = new Stopwatch(); 286 Stopwatch x = new Stopwatch();
280 x.Start(); 287 x.Start();
281 if (m_scenes.ContainsKey(regionid)) 288 if (m_scenes.ContainsKey(regionid))
282 { 289 {
283 m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir); 290 m_serialiser[regionid].SerialiseRegion(m_scenes[regionid], revisiondir);
284 } 291 }
285 x.Stop(); 292 x.Stop();
286 TimeToSave += x.ElapsedMilliseconds; 293 TimeToSave += x.ElapsedMilliseconds;
287 m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds); 294 m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk for " + regionName + ": " + x.ElapsedMilliseconds);
288 m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave); 295 m_log.Info("[FileSystemDatabase] Time spent serialising regions to files on disk so far: " + TimeToSave);
289 } 296 }
290 catch (Exception e) 297 catch (Exception e)
291 { 298 {
292 m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e); 299 m_log.ErrorFormat("[FSDB]: Serialisation of region failed: " + e);
293 return; 300 return;
294 } 301 }
295 302
296 try { 303 try {
297 // Finish by writing log message. 304 // Finish by writing log message.
298 FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite); 305 FileStream file = new FileStream(revisiondir + "log", FileMode.Create, FileAccess.ReadWrite);
299 StreamWriter sw = new StreamWriter(file); 306 StreamWriter sw = new StreamWriter(file);
300 sw.Write(logMessage); 307 sw.Write(logMessage);
301 sw.Close(); 308 sw.Close();
302 } 309 }
303 catch (Exception e) 310 catch (Exception e)
304 { 311 {
305 m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e); 312 m_log.ErrorFormat("[FSDB]: Failed trying to save log file " + e);
306 return; 313 return;
307 } 314 }
308 } 315 }
309 316
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index 5a6dbc8..a494ff6 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
84 } 84 }
85 85
86 /// <summary> 86 /// <summary>
87 /// Makes a new meta entity by copying the given scene object group. 87 /// Makes a new meta entity by copying the given scene object group.
88 /// The physics boolean is just a stub right now. 88 /// The physics boolean is just a stub right now.
89 /// </summary> 89 /// </summary>
90 public MetaEntity(SceneObjectGroup orig, bool physics) 90 public MetaEntity(SceneObjectGroup orig, bool physics)
@@ -160,19 +160,19 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 { 160 {
161 //make new uuids 161 //make new uuids
162 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>(); 162 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
163 foreach(SceneObjectPart part in m_Entity.Children.Values) 163 foreach (SceneObjectPart part in m_Entity.Children.Values)
164 { 164 {
165 part.ResetIDs(part.LinkNum); 165 part.ResetIDs(part.LinkNum);
166 parts.Add(part.UUID, part); 166 parts.Add(part.UUID, part);
167 } 167 }
168 168
169 // make new localids 169 // make new localids
170 foreach (SceneObjectPart part in m_Entity.Children.Values) 170 foreach (SceneObjectPart part in m_Entity.Children.Values)
171 part.LocalId = m_Entity.Scene.PrimIDAllocate(); 171 part.LocalId = m_Entity.Scene.PrimIDAllocate();
172 172
173 //finalize 173 //finalize
174 m_Entity.UpdateParentIDs(); 174 m_Entity.UpdateParentIDs();
175 m_Entity.RootPart.PhysActor = null; 175 m_Entity.RootPart.PhysActor = null;
176 m_Entity.Children = parts; 176 m_Entity.Children = parts;
177 } 177 }
178 178
@@ -188,8 +188,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
188 //This deletes the group without removing from any databases. 188 //This deletes the group without removing from any databases.
189 //This is important because we are not IN any database. 189 //This is important because we are not IN any database.
190 //m_Entity.FakeDeleteGroup(); 190 //m_Entity.FakeDeleteGroup();
191 foreach( SceneObjectPart part in m_Entity.Children.Values) 191 foreach (SceneObjectPart part in m_Entity.Children.Values)
192 client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); 192 client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
193 } 193 }
194 194
195 /// <summary> 195 /// <summary>
@@ -197,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
197 /// </summary> 197 /// </summary>
198 public virtual void HideFromAll() 198 public virtual void HideFromAll()
199 { 199 {
200 foreach( SceneObjectPart part in m_Entity.Children.Values) 200 foreach (SceneObjectPart part in m_Entity.Children.Values)
201 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) 201 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
202 { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); } 202 { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
203 ); 203 );
204 } 204 }
205 205
206 public void SendFullUpdate(IClientAPI client) 206 public void SendFullUpdate(IClientAPI client)
@@ -239,40 +239,40 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
239 Color4 texcolor; 239 Color4 texcolor;
240 try 240 try
241 { 241 {
242 tex = part.Shape.Textures; 242 tex = part.Shape.Textures;
243 texcolor = new Color4(); 243 texcolor = new Color4();
244 } 244 }
245 catch(Exception) 245 catch(Exception)
246 { 246 {
247 //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e); 247 //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing textures of scene object: " + e);
248 return; 248 return;
249 } 249 }
250 250
251 for (uint i = 0; i < tex.FaceTextures.Length; i++) 251 for (uint i = 0; i < tex.FaceTextures.Length; i++)
252 { 252 {
253 try { 253 try {
254 if (tex.FaceTextures[i] != null) 254 if (tex.FaceTextures[i] != null)
255 { 255 {
256 texcolor = tex.FaceTextures[i].RGBA; 256 texcolor = tex.FaceTextures[i].RGBA;
257 texcolor.A = transparencyAmount; 257 texcolor.A = transparencyAmount;
258 tex.FaceTextures[i].RGBA = texcolor; 258 tex.FaceTextures[i].RGBA = texcolor;
259 } 259 }
260 } 260 }
261 catch (Exception) 261 catch (Exception)
262 { 262 {
263 //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e); 263 //m_log.ErrorFormat("[Content Management]: Exception thrown while accessing different face textures of object: " + e);
264 continue; 264 continue;
265 } 265 }
266 } 266 }
267 try { 267 try {
268 texcolor = tex.DefaultTexture.RGBA; 268 texcolor = tex.DefaultTexture.RGBA;
269 texcolor.A = transparencyAmount; 269 texcolor.A = transparencyAmount;
270 tex.DefaultTexture.RGBA = texcolor; 270 tex.DefaultTexture.RGBA = texcolor;
271 part.Shape.TextureEntry = tex.ToBytes(); 271 part.Shape.TextureEntry = tex.ToBytes();
272 } 272 }
273 catch (Exception) 273 catch (Exception)
274 { 274 {
275 //m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e); 275 //m_log.Info("[Content Management]: Exception thrown while accessing default face texture of object: " + e);
276 } 276 }
277 } 277 }
278 278
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index b0c6955..81746c5 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
89 y.UUID = uuid; 89 y.UUID = uuid;
90 90
91 y.LocalId = LocalId; 91 y.LocalId = LocalId;
92 92
93 y.Shape = PrimitiveBaseShape.CreateBox(); 93 y.Shape = PrimitiveBaseShape.CreateBox();
94 y.Scale = new Vector3(0.01f,0.01f,0.01f); 94 y.Scale = new Vector3(0.01f,0.01f,0.01f);
95 y.LastOwnerID = UUID.Zero; 95 y.LastOwnerID = UUID.Zero;
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
index ba937f5..79e970d 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
@@ -106,13 +106,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
106 106
107 private static bool AreVectorsEquivalent(Vector3 first, Vector3 second) 107 private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
108 { 108 {
109 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) 109 if (TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
110 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) 110 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
111 && TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2) 111 && TruncateSignificant(first.Z, 2) == TruncateSignificant(second.Z, 2)
112 ) 112 )
113 return true; 113 return true;
114 else 114 else
115 return false; 115 return false;
116 } 116 }
117 117
118 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs 118 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
126 private static int TruncateSignificant(float num, int digits) 126 private static int TruncateSignificant(float num, int digits)
127 { 127 {
128 return (int) Math.Ceiling((Math.Truncate(num * 10 * digits)/10*digits)); 128 return (int) Math.Ceiling((Math.Truncate(num * 10 * digits)/10*digits));
129 // return (int) ((num * (10*digits))/10*digits); 129 // return (int) ((num * (10*digits))/10*digits);
130 } 130 }
131 131
132 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs 132 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
153 #region Public Methods 153 #region Public Methods
154 154
155 /// <summary> 155 /// <summary>
156 /// Compares the attributes (Vectors, Quaternions, Strings, etc.) between two scene object parts 156 /// Compares the attributes (Vectors, Quaternions, Strings, etc.) between two scene object parts
157 /// and returns a Diff bitmask which details what the differences are. 157 /// and returns a Diff bitmask which details what the differences are.
158 /// </summary> 158 /// </summary>
159 public static Diff FindDifferences(SceneObjectPart first, SceneObjectPart second) 159 public static Diff FindDifferences(SceneObjectPart first, SceneObjectPart second)
@@ -164,47 +164,47 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
164 Diff result = 0; 164 Diff result = 0;
165 165
166 // VECTOR COMPARISONS 166 // VECTOR COMPARISONS
167 if(! AreVectorsEquivalent(first.Acceleration, second.Acceleration)) 167 if (!AreVectorsEquivalent(first.Acceleration, second.Acceleration))
168 result |= Diff.ACCELERATION; 168 result |= Diff.ACCELERATION;
169 if(! AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition)) 169 if (!AreVectorsEquivalent(first.AbsolutePosition, second.AbsolutePosition))
170 result |= Diff.POSITION; 170 result |= Diff.POSITION;
171 if(! AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity)) 171 if (!AreVectorsEquivalent(first.AngularVelocity, second.AngularVelocity))
172 result |= Diff.ANGULARVELOCITY; 172 result |= Diff.ANGULARVELOCITY;
173 if(! AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition)) 173 if (!AreVectorsEquivalent(first.OffsetPosition, second.OffsetPosition))
174 result |= Diff.OFFSETPOSITION; 174 result |= Diff.OFFSETPOSITION;
175 if(! AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity)) 175 if (!AreVectorsEquivalent(first.RotationalVelocity, second.RotationalVelocity))
176 result |= Diff.ROTATIONALVELOCITY; 176 result |= Diff.ROTATIONALVELOCITY;
177 if(! AreVectorsEquivalent(first.Scale, second.Scale)) 177 if (!AreVectorsEquivalent(first.Scale, second.Scale))
178 result |= Diff.SCALE; 178 result |= Diff.SCALE;
179 if(! AreVectorsEquivalent(first.Velocity, second.Velocity)) 179 if (!AreVectorsEquivalent(first.Velocity, second.Velocity))
180 result |= Diff.VELOCITY; 180 result |= Diff.VELOCITY;
181 181
182 182
183 // QUATERNION COMPARISONS 183 // QUATERNION COMPARISONS
184 if(! AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset)) 184 if (!AreQuaternionsEquivalent(first.RotationOffset, second.RotationOffset))
185 result |= Diff.ROTATIONOFFSET; 185 result |= Diff.ROTATIONOFFSET;
186 186
187 187
188 // MISC COMPARISONS (UUID, Byte) 188 // MISC COMPARISONS (UUID, Byte)
189 if(first.ClickAction != second.ClickAction) 189 if (first.ClickAction != second.ClickAction)
190 result |= Diff.CLICKACTION; 190 result |= Diff.CLICKACTION;
191 if(first.ObjectOwner != second.ObjectOwner) 191 if (first.ObjectOwner != second.ObjectOwner)
192 result |= Diff.OBJECTOWNER; 192 result |= Diff.OBJECTOWNER;
193 193
194 194
195 // STRING COMPARISONS 195 // STRING COMPARISONS
196 if(first.Description != second.Description) 196 if (first.Description != second.Description)
197 result |= Diff.DESCRIPTION; 197 result |= Diff.DESCRIPTION;
198 if(first.Material != second.Material) 198 if (first.Material != second.Material)
199 result |= Diff.MATERIAL; 199 result |= Diff.MATERIAL;
200 if(first.Name != second.Name) 200 if (first.Name != second.Name)
201 result |= Diff.NAME; 201 result |= Diff.NAME;
202 if(first.SitName != second.SitName) 202 if (first.SitName != second.SitName)
203 result |= Diff.SITNAME; 203 result |= Diff.SITNAME;
204 if(first.Text != second.Text) 204 if (first.Text != second.Text)
205 result |= Diff.TEXT; 205 result |= Diff.TEXT;
206 if(first.TouchName != second.TouchName) 206 if (first.TouchName != second.TouchName)
207 result |= Diff.TOUCHNAME; 207 result |= Diff.TOUCHNAME;
208 208
209 x.Stop(); 209 x.Stop();
210 TimeToDiff += x.ElapsedMilliseconds; 210 TimeToDiff += x.ElapsedMilliseconds;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index a59148b..4a51398 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -176,8 +176,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
176 /// within this object). 176 /// within this object).
177 /// </summary> 177 /// </summary>
178 /// <param name="sceneObject"></param> 178 /// <param name="sceneObject"></param>
179 /// <param name="assetUuids"></param> 179 /// <param name="assetUuids"></param>
180 protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, int> assetUuids) 180 protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, int> assetUuids)
181 { 181 {
182 AssetBase objectAsset = GetAsset(sceneObjectUuid); 182 AssetBase objectAsset = GetAsset(sceneObjectUuid);
183 183
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 976a634..bec1300 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
121 121
122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture) 122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
123 { 123 {
124 if(texture == UUID.Zero) 124 if (texture == UUID.Zero)
125 return; 125 return;
126 126
127 switch (corner) 127 switch (corner)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 541ca18..8bf0d96 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
388 get { return 0; } 388 get { return 0; }
389 } 389 }
390 390
391 public ulong GetGroupPowers(UUID groupID) 391 public ulong GetGroupPowers(UUID groupID)
392 { 392 {
393 return 0; 393 return 0;
394 } 394 }
395 395
396 public virtual int NextAnimationSequenceNumber 396 public virtual int NextAnimationSequenceNumber
397 { 397 {
diff --git a/OpenSim/Region/Environment/Scenes/EntityList.cs b/OpenSim/Region/Environment/Scenes/EntityList.cs
index 09eb84f..cd59f2a 100644
--- a/OpenSim/Region/Environment/Scenes/EntityList.cs
+++ b/OpenSim/Region/Environment/Scenes/EntityList.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes
71 // FindObject(UUID) 71 // FindObject(UUID)
72 // FindObject(int) 72 // FindObject(int)
73 // FindPresence(UUID) 73 // FindPresence(UUID)
74 74
75 public void Add(SceneObjectGroup obj) 75 public void Add(SceneObjectGroup obj)
76 { 76 {
77 m_obj_by_uuid[obj.UUID] = obj; 77 m_obj_by_uuid[obj.UUID] = obj;
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes
86 public SceneObjectGroup RemoveObject(UUID uuid) 86 public SceneObjectGroup RemoveObject(UUID uuid)
87 { 87 {
88 SceneObjectGroup sog = null; 88 SceneObjectGroup sog = null;
89 try 89 try
90 { 90 {
91 sog = (SceneObjectGroup)m_obj_by_uuid[uuid]; 91 sog = (SceneObjectGroup)m_obj_by_uuid[uuid];
92 m_obj_by_uuid.Remove(uuid); 92 m_obj_by_uuid.Remove(uuid);
@@ -99,11 +99,11 @@ namespace OpenSim.Region.Environment.Scenes
99 } 99 }
100 return sog; 100 return sog;
101 } 101 }
102 102
103 public ScenePresence RemovePresence(UUID uuid) 103 public ScenePresence RemovePresence(UUID uuid)
104 { 104 {
105 ScenePresence sp = null; 105 ScenePresence sp = null;
106 try 106 try
107 { 107 {
108 sp = (ScenePresence)m_pres_by_uuid[uuid]; 108 sp = (ScenePresence)m_pres_by_uuid[uuid];
109 m_pres_by_uuid.Remove(uuid); 109 m_pres_by_uuid.Remove(uuid);
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Environment.Scenes
113 m_log.ErrorFormat("RemovePresence failed for {0}", uuid, e); 113 m_log.ErrorFormat("RemovePresence failed for {0}", uuid, e);
114 sp = null; 114 sp = null;
115 } 115 }
116 return sp; 116 return sp;
117 } 117 }
118 118
119 public SceneObjectGroup FindObject(UUID uuid) 119 public SceneObjectGroup FindObject(UUID uuid)
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Scenes
132 132
133 public SceneObjectGroup FindObject(int local) 133 public SceneObjectGroup FindObject(int local)
134 { 134 {
135 try 135 try
136 { 136 {
137 UUID uuid = (UUID)m_obj_by_local[local]; 137 UUID uuid = (UUID)m_obj_by_local[local];
138 SceneObjectGroup sog = (SceneObjectGroup)m_obj_by_uuid[uuid]; 138 SceneObjectGroup sog = (SceneObjectGroup)m_obj_by_uuid[uuid];
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 53b0a38..bfe6832 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Scenes
140 List<EntityBase> updateEntities = GetEntities(); 140 List<EntityBase> updateEntities = GetEntities();
141 141
142 foreach (EntityBase entity in updateEntities) 142 foreach (EntityBase entity in updateEntities)
143 { 143 {
144 entity.Update(); 144 entity.Update();
145 } 145 }
146 } 146 }
@@ -325,7 +325,7 @@ namespace OpenSim.Region.Environment.Scenes
325 // Don't abort the whole update if one entity happens to give us an exception. 325 // Don't abort the whole update if one entity happens to give us an exception.
326 try 326 try
327 { 327 {
328 m_updateList[i].Update(); 328 m_updateList[i].Update();
329 } 329 }
330 catch (Exception e) 330 catch (Exception e)
331 { 331 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 3c34f73..c049e86 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1581,7 +1581,7 @@ namespace OpenSim.Region.Environment.Scenes
1581 /// Schedule a terse update for this scene object 1581 /// Schedule a terse update for this scene object
1582 /// </summary> 1582 /// </summary>
1583 public void ScheduleGroupForTerseUpdate() 1583 public void ScheduleGroupForTerseUpdate()
1584 { 1584 {
1585 lock (m_parts) 1585 lock (m_parts)
1586 { 1586 {
1587 foreach (SceneObjectPart part in m_parts.Values) 1587 foreach (SceneObjectPart part in m_parts.Values)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 17c5f04..352de27 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1321,7 +1321,7 @@ namespace OpenSim.Region.Environment.Scenes
1321 public static SceneObjectPart FromXml(XmlReader xmlReader) 1321 public static SceneObjectPart FromXml(XmlReader xmlReader)
1322 { 1322 {
1323 // It's not necessary to persist this 1323 // It's not necessary to persist this
1324 1324
1325 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); 1325 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
1326 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); 1326 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader);
1327 return newobject; 1327 return newobject;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 8f579bd..149126c 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -287,10 +287,10 @@ namespace OpenSim.Region.Examples.SimpleModule
287 get { return 0; } 287 get { return 0; }
288 } 288 }
289 289
290 public ulong GetGroupPowers(UUID groupID) 290 public ulong GetGroupPowers(UUID groupID)
291 { 291 {
292 return 0; 292 return 0;
293 } 293 }
294 294
295 public virtual int NextAnimationSequenceNumber 295 public virtual int NextAnimationSequenceNumber
296 { 296 {
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index f955c52..a7514b6 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -1990,7 +1990,7 @@ namespace OpenSim.Region.Physics.Meshing
1990 Face f = faces[i]; 1990 Face f = faces[i];
1991 mesh.triangles.Add(new Triangle(vertices[f.v1], vertices[f.v2], vertices[f.v3])); 1991 mesh.triangles.Add(new Triangle(vertices[f.v1], vertices[f.v2], vertices[f.v3]));
1992 } 1992 }
1993 1993
1994 //for (int i = 0; i < numFaces; i++) 1994 //for (int i = 0; i < numFaces; i++)
1995 //{ 1995 //{
1996 // Face f = primMesh.faces[i]; 1996 // Face f = primMesh.faces[i];
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index 08b2d10..63f2b10 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -87,71 +87,71 @@ namespace OpenSim.Region.Physics.Meshing
87 //[1.0f, 1.0f, -2.4492127076447545e-016f]]; 87 //[1.0f, 1.0f, -2.4492127076447545e-016f]];
88 /* 88 /*
89angles3 = [ 89angles3 = [
90 [0.0, 1.0, 0.0], 90 [0.0, 1.0, 0.0],
91 [0.33333333333333331, -0.49999999999999978, 0.86602540378443871], 91 [0.33333333333333331, -0.49999999999999978, 0.86602540378443871],
92 [0.66666666666666663, -0.50000000000000044, -0.86602540378443837], 92 [0.66666666666666663, -0.50000000000000044, -0.86602540378443837],
93 [1.0, 1.0, -2.4492127076447545e-016]] 93 [1.0, 1.0, -2.4492127076447545e-016]]
94 94
95angles4 = [ 95angles4 = [
96 [0.0, 1.0, 0.0], 96 [0.0, 1.0, 0.0],
97 [0.25, 0.0, 1.0], 97 [0.25, 0.0, 1.0],
98 [0.5, -1.0, 0.0], 98 [0.5, -1.0, 0.0],
99 [0.75, 0.0, -1.0], 99 [0.75, 0.0, -1.0],
100 [1.0, 1.0, 0.0]] 100 [1.0, 1.0, 0.0]]
101 101
102angles24 = [ 102angles24 = [
103 [0.0, 0.5, 0.0], 103 [0.0, 0.5, 0.0],
104 [0.041666666666666664, 0.48296291314453416, 0.12940952255126037], 104 [0.041666666666666664, 0.48296291314453416, 0.12940952255126037],
105 [0.083333333333333329, 0.43301270189221935, 0.25], 105 [0.083333333333333329, 0.43301270189221935, 0.25],
106 [0.125, 0.35355339059327379, 0.35355339059327373], 106 [0.125, 0.35355339059327379, 0.35355339059327373],
107 [0.16666666666666666, 0.25, 0.4330127018922193], 107 [0.16666666666666666, 0.25, 0.4330127018922193],
108 [0.20833333333333331, 0.12940952255126048, 0.4829629131445341], 108 [0.20833333333333331, 0.12940952255126048, 0.4829629131445341],
109 [0.25, 0.0, 0.5], 109 [0.25, 0.0, 0.5],
110 [0.29166666666666663, -0.12940952255126031, 0.48296291314453416], 110 [0.29166666666666663, -0.12940952255126031, 0.48296291314453416],
111 [0.33333333333333331, -0.25, 0.43301270189221935], 111 [0.33333333333333331, -0.25, 0.43301270189221935],
112 [0.375, -0.35355339059327373, 0.35355339059327379], 112 [0.375, -0.35355339059327373, 0.35355339059327379],
113 [0.41666666666666663, -0.43301270189221924, 0.25], 113 [0.41666666666666663, -0.43301270189221924, 0.25],
114 [0.45833333333333331, -0.4829629131445341, 0.12940952255126051], 114 [0.45833333333333331, -0.4829629131445341, 0.12940952255126051],
115 [0.5, -0.5, 0.0], 115 [0.5, -0.5, 0.0],
116 [0.54166666666666663, -0.48296291314453421, -0.12940952255126018], 116 [0.54166666666666663, -0.48296291314453421, -0.12940952255126018],
117 [0.58333333333333326, -0.43301270189221941, -0.25], 117 [0.58333333333333326, -0.43301270189221941, -0.25],
118 [0.62499999999999989, -0.35355339059327395, -0.35355339059327356], 118 [0.62499999999999989, -0.35355339059327395, -0.35355339059327356],
119 [0.66666666666666663, -0.25, -0.43301270189221919], 119 [0.66666666666666663, -0.25, -0.43301270189221919],
120 [0.70833333333333326, -0.12940952255126076, -0.48296291314453405], 120 [0.70833333333333326, -0.12940952255126076, -0.48296291314453405],
121 [0.75, 0.0, -0.5], 121 [0.75, 0.0, -0.5],
122 [0.79166666666666663, 0.12940952255126015, -0.48296291314453421], 122 [0.79166666666666663, 0.12940952255126015, -0.48296291314453421],
123 [0.83333333333333326, 0.25, -0.43301270189221952], 123 [0.83333333333333326, 0.25, -0.43301270189221952],
124 [0.875, 0.35355339059327368, -0.35355339059327384], 124 [0.875, 0.35355339059327368, -0.35355339059327384],
125 [0.91666666666666663, 0.43301270189221919, -0.25], 125 [0.91666666666666663, 0.43301270189221919, -0.25],
126 [0.95833333333333326, 0.48296291314453405, -0.12940952255126079], 126 [0.95833333333333326, 0.48296291314453405, -0.12940952255126079],
127 [1.0, 0.5, 0.0]] 127 [1.0, 0.5, 0.0]]
128 128
129angles24 = [ 129angles24 = [
130 [0.0, 1.0, 0.0], 130 [0.0, 1.0, 0.0],
131 [0.041666666666666664, 0.96592582628906831, 0.25881904510252074], 131 [0.041666666666666664, 0.96592582628906831, 0.25881904510252074],
132 [0.083333333333333329, 0.86602540378443871, 0.5], 132 [0.083333333333333329, 0.86602540378443871, 0.5],
133 [0.125, 0.70710678118654757, 0.70710678118654746], 133 [0.125, 0.70710678118654757, 0.70710678118654746],
134 [0.16666666666666667, 0.5, 0.8660254037844386], 134 [0.16666666666666667, 0.5, 0.8660254037844386],
135 [0.20833333333333331, 0.25881904510252096, 0.9659258262890682], 135 [0.20833333333333331, 0.25881904510252096, 0.9659258262890682],
136 [0.25, 6.1230317691118863e-017, 1.0], 136 [0.25, 6.1230317691118863e-017, 1.0],
137 [0.29166666666666663, -0.25881904510252063, 0.96592582628906831], 137 [0.29166666666666663, -0.25881904510252063, 0.96592582628906831],
138 [0.33333333333333333, -0.5, 0.86602540378443871], 138 [0.33333333333333333, -0.5, 0.86602540378443871],
139 [0.375, -0.70710678118654746, 0.70710678118654757], 139 [0.375, -0.70710678118654746, 0.70710678118654757],
140 [0.41666666666666663, -0.86602540378443849, 0.5], 140 [0.41666666666666663, -0.86602540378443849, 0.5],
141 [0.45833333333333331, -0.9659258262890682, 0.25881904510252102], 141 [0.45833333333333331, -0.9659258262890682, 0.25881904510252102],
142 [0.5, -1.0, 1.2246063538223773e-016], 142 [0.5, -1.0, 1.2246063538223773e-016],
143 [0.54166666666666663, -0.96592582628906842, -0.25881904510252035], 143 [0.54166666666666663, -0.96592582628906842, -0.25881904510252035],
144 [0.58333333333333326, -0.86602540378443882, -0.5], 144 [0.58333333333333326, -0.86602540378443882, -0.5],
145 [0.62499999999999989, -0.70710678118654791, -0.70710678118654713], 145 [0.62499999999999989, -0.70710678118654791, -0.70710678118654713],
146 [0.66666666666666667, -0.5, -0.86602540378443837], 146 [0.66666666666666667, -0.5, -0.86602540378443837],
147 [0.70833333333333326, -0.25881904510252152, -0.96592582628906809], 147 [0.70833333333333326, -0.25881904510252152, -0.96592582628906809],
148 [0.75, -1.8369095307335659e-016, -1.0], 148 [0.75, -1.8369095307335659e-016, -1.0],
149 [0.79166666666666663, 0.2588190451025203, -0.96592582628906842], 149 [0.79166666666666663, 0.2588190451025203, -0.96592582628906842],
150 [0.83333333333333326, 0.5, -0.86602540378443904], 150 [0.83333333333333326, 0.5, -0.86602540378443904],
151 [0.875, 0.70710678118654735, -0.70710678118654768], 151 [0.875, 0.70710678118654735, -0.70710678118654768],
152 [0.91666666666666663, 0.86602540378443837, -0.5], 152 [0.91666666666666663, 0.86602540378443837, -0.5],
153 [0.95833333333333326, 0.96592582628906809, -0.25881904510252157], 153 [0.95833333333333326, 0.96592582628906809, -0.25881904510252157],
154 [1.0, 1.0, -2.4492127076447545e-016]] 154 [1.0, 1.0, -2.4492127076447545e-016]]
155 155
156 */ 156 */
157 157
@@ -159,15 +159,15 @@ angles24 = [
159 { 159 {
160 private float iX, iY; // intersection point 160 private float iX, iY; // intersection point
161 161
162 private Angle[] angles3 = 162 private Angle[] angles3 =
163 { 163 {
164 new Angle(0.0f, 1.0f, 0.0f), 164 new Angle(0.0f, 1.0f, 0.0f),
165 new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f), 165 new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
166 new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f), 166 new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
167 new Angle(1.0f, 1.0f, 0.0f) 167 new Angle(1.0f, 1.0f, 0.0f)
168 }; 168 };
169 169
170 private Angle[] angles4 = 170 private Angle[] angles4 =
171 { 171 {
172 new Angle(0.0f, 1.0f, 0.0f), 172 new Angle(0.0f, 1.0f, 0.0f),
173 new Angle(0.25f, 0.0f, 1.0f), 173 new Angle(0.25f, 0.0f, 1.0f),
@@ -179,30 +179,30 @@ angles24 = [
179 private Angle[] angles24 = 179 private Angle[] angles24 =
180 { 180 {
181 new Angle(0.0f, 1.0f, 0.0f), 181 new Angle(0.0f, 1.0f, 0.0f),
182 new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f), 182 new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f),
183 new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f), 183 new Angle(0.083333333333333329f, 0.86602540378443871f, 0.5f),
184 new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f), 184 new Angle(0.125f, 0.70710678118654757f, 0.70710678118654746f),
185 new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f), 185 new Angle(0.16666666666666667f, 0.5f, 0.8660254037844386f),
186 new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f), 186 new Angle(0.20833333333333331f, 0.25881904510252096f, 0.9659258262890682f),
187 new Angle(0.25f, 0.0f, 1.0f), 187 new Angle(0.25f, 0.0f, 1.0f),
188 new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f), 188 new Angle(0.29166666666666663f, -0.25881904510252063f, 0.96592582628906831f),
189 new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f), 189 new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f),
190 new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f), 190 new Angle(0.375f, -0.70710678118654746f, 0.70710678118654757f),
191 new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f), 191 new Angle(0.41666666666666663f, -0.86602540378443849f, 0.5f),
192 new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f), 192 new Angle(0.45833333333333331f, -0.9659258262890682f, 0.25881904510252102f),
193 new Angle(0.5f, -1.0f, 0.0f), 193 new Angle(0.5f, -1.0f, 0.0f),
194 new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f), 194 new Angle(0.54166666666666663f, -0.96592582628906842f, -0.25881904510252035f),
195 new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f), 195 new Angle(0.58333333333333326f, -0.86602540378443882f, -0.5f),
196 new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f), 196 new Angle(0.62499999999999989f, -0.70710678118654791f, -0.70710678118654713f),
197 new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f), 197 new Angle(0.66666666666666667f, -0.5f, -0.86602540378443837f),
198 new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f), 198 new Angle(0.70833333333333326f, -0.25881904510252152f, -0.96592582628906809f),
199 new Angle(0.75f, 0.0f, -1.0f), 199 new Angle(0.75f, 0.0f, -1.0f),
200 new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f), 200 new Angle(0.79166666666666663f, 0.2588190451025203f, -0.96592582628906842f),
201 new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f), 201 new Angle(0.83333333333333326f, 0.5f, -0.86602540378443904f),
202 new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f), 202 new Angle(0.875f, 0.70710678118654735f, -0.70710678118654768f),
203 new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f), 203 new Angle(0.91666666666666663f, 0.86602540378443837f, -0.5f),
204 new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f), 204 new Angle(0.95833333333333326f, 0.96592582628906809f, -0.25881904510252157f),
205 new Angle(1.0f, 1.0f, 0.0f) 205 new Angle(1.0f, 1.0f, 0.0f)
206 }; 206 };
207 207
208 private Angle interpolatePoints(float newPoint, Angle p1, Angle p2) 208 private Angle interpolatePoints(float newPoint, Angle p1, Angle p2)
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index ebf2a15..9405198 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -7546,7 +7546,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7546 7546
7547 // the object we are in 7547 // the object we are in
7548 UUID objectID = m_host.ParentUUID; 7548 UUID objectID = m_host.ParentUUID;
7549 if(objectID == UUID.Zero) return; 7549 if (objectID == UUID.Zero) return;
7550 7550
7551 // we need the permission first, to know which avatar we want to set the camera for 7551 // we need the permission first, to know which avatar we want to set the camera for
7552 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7552 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@@ -7597,7 +7597,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7597 7597
7598 // the object we are in 7598 // the object we are in
7599 UUID objectID = m_host.ParentUUID; 7599 UUID objectID = m_host.ParentUUID;
7600 if(objectID == UUID.Zero) return; 7600 if (objectID == UUID.Zero) return;
7601 7601
7602 // we need the permission first, to know which avatar we want to clear the camera for 7602 // we need the permission first, to know which avatar we want to clear the camera for
7603 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7603 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ae775f7..4b70ec8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7418,7 +7418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7418 7418
7419 // the object we are in 7419 // the object we are in
7420 UUID objectID = m_host.ParentUUID; 7420 UUID objectID = m_host.ParentUUID;
7421 if(objectID == UUID.Zero) return; 7421 if (objectID == UUID.Zero) return;
7422 7422
7423 // we need the permission first, to know which avatar we want to set the camera for 7423 // we need the permission first, to know which avatar we want to set the camera for
7424 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7424 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
@@ -7469,7 +7469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7469 7469
7470 // the object we are in 7470 // the object we are in
7471 UUID objectID = m_host.ParentUUID; 7471 UUID objectID = m_host.ParentUUID;
7472 if(objectID == UUID.Zero) return; 7472 if (objectID == UUID.Zero) return;
7473 7473
7474 // we need the permission first, to know which avatar we want to clear the camera for 7474 // we need the permission first, to know which avatar we want to clear the camera for
7475 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7475 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 97c79b5..1ee6f77 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -686,7 +686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
686 { 686 {
687 // If we're currently in an event, just tell it to save upon return 687 // If we're currently in an event, just tell it to save upon return
688 // 688 //
689 if(m_InEvent) 689 if (m_InEvent)
690 { 690 {
691 m_SaveState = true; 691 m_SaveState = true;
692 return; 692 return;
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index bb08a60..6582686 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -216,13 +216,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
216 216
217 if (sleepTime > 0) 217 if (sleepTime > 0)
218 { 218 {
219 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance), 219 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance),
220 new Object[]{ sleepTime }); 220 new Object[]{ sleepTime });
221 } 221 }
222 222
223 if (saveTime > 0) 223 if (saveTime > 0)
224 { 224 {
225 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup), 225 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup),
226 new Object[] { saveTime }); 226 new Object[] { saveTime });
227 } 227 }
228 228
@@ -278,7 +278,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
278 instances.Clear(); 278 instances.Clear();
279 279
280 if (saveTime > 0) 280 if (saveTime > 0)
281 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup), 281 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup),
282 new Object[] { saveTime }); 282 new Object[] { saveTime });
283 283
284 return 0; 284 return 0;
@@ -301,7 +301,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
301 301
302 System.Threading.Thread.Sleep(sleepTime); 302 System.Threading.Thread.Sleep(sleepTime);
303 303
304 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance), 304 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance),
305 new Object[]{ sleepTime }); 305 new Object[]{ sleepTime });
306 306
307 return 0; 307 return 0;
@@ -331,13 +331,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine
331 { 331 {
332 m_firstStart = false; 332 m_firstStart = false;
333 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 333 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
334 new WorkItemCallback(this.DoScriptWait), 334 new WorkItemCallback(this.DoScriptWait),
335 new Object[0]); 335 new Object[0]);
336 return; 336 return;
337 } 337 }
338 338
339 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 339 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
340 new WorkItemCallback(this.DoOnRezScriptQueue), 340 new WorkItemCallback(this.DoOnRezScriptQueue),
341 new Object[0]); 341 new Object[0]);
342 } 342 }
343 } 343 }
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
352 if (m_CompileQueue.Count > 0) 352 if (m_CompileQueue.Count > 0)
353 { 353 {
354 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 354 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
355 new WorkItemCallback(this.DoOnRezScriptQueue), 355 new WorkItemCallback(this.DoOnRezScriptQueue),
356 new Object[0]); 356 new Object[0]);
357 } 357 }
358 else 358 else
@@ -383,7 +383,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
383 if (m_CompileQueue.Count > 0) 383 if (m_CompileQueue.Count > 0)
384 { 384 {
385 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 385 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
386 new WorkItemCallback(this.DoOnRezScriptQueue), 386 new WorkItemCallback(this.DoOnRezScriptQueue),
387 new Object[0]); 387 new Object[0]);
388 } 388 }
389 else 389 else
@@ -493,7 +493,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
493 } 493 }
494 m_DomainScripts[appDomain].Add(itemID); 494 m_DomainScripts[appDomain].Add(itemID);
495 495
496 ScriptInstance instance = 496 ScriptInstance instance =
497 new ScriptInstance(this,localID, 497 new ScriptInstance(this,localID,
498 part.UUID, itemID, assetID, assembly, 498 part.UUID, itemID, assetID, assembly,
499 m_AppDomains[appDomain], 499 m_AppDomains[appDomain],
@@ -657,7 +657,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
657 public IScriptWorkItem QueueEventHandler(object parms) 657 public IScriptWorkItem QueueEventHandler(object parms)
658 { 658 {
659 return new XWorkItem(m_ThreadPool.QueueWorkItem( 659 return new XWorkItem(m_ThreadPool.QueueWorkItem(
660 new WorkItemCallback(this.ProcessEventHandler), 660 new WorkItemCallback(this.ProcessEventHandler),
661 parms)); 661 parms));
662 } 662 }
663 663
@@ -723,7 +723,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
723 string[] pathList = new string[] {"bin", "ScriptEngines", 723 string[] pathList = new string[] {"bin", "ScriptEngines",
724 Path.Combine("ScriptEngines", 724 Path.Combine("ScriptEngines",
725 m_Scene.RegionInfo.RegionID.ToString())}; 725 m_Scene.RegionInfo.RegionID.ToString())};
726 726
727 string assemblyName = args.Name; 727 string assemblyName = args.Name;
728 if (assemblyName.IndexOf(",") != -1) 728 if (assemblyName.IndexOf(",") != -1)
729 assemblyName = args.Name.Substring(0, args.Name.IndexOf(",")); 729 assemblyName = args.Name.Substring(0, args.Name.IndexOf(","));