diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/IMesher.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Mesh.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 45 |
8 files changed, 49 insertions, 31 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 4041b63..5ca4178 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -730,7 +730,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
730 | int fileCount = GetFileCacheCount(m_CacheDirectory); | 730 | int fileCount = GetFileCacheCount(m_CacheDirectory); |
731 | m_log.InfoFormat("[FLOTSAM ASSET CACHE] File Cache : {0} assets", fileCount); | 731 | m_log.InfoFormat("[FLOTSAM ASSET CACHE] File Cache : {0} assets", fileCount); |
732 | 732 | ||
733 | foreach ( string s in Directory.GetFiles(m_CacheDirectory, "*.fac" ) ) | 733 | foreach (string s in Directory.GetFiles(m_CacheDirectory, "*.fac")) |
734 | { | 734 | { |
735 | m_log.Info("[FLOTSAM ASSET CACHE] Deep Scans were performed on the following regions:"); | 735 | m_log.Info("[FLOTSAM ASSET CACHE] Deep Scans were performed on the following regions:"); |
736 | 736 | ||
@@ -770,7 +770,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
770 | int assetsCached = CacheScenes(); | 770 | int assetsCached = CacheScenes(); |
771 | m_log.InfoFormat("[FLOTSAM ASSET CACHE] Completed Scene Caching, {0} assets found.", assetsCached); | 771 | m_log.InfoFormat("[FLOTSAM ASSET CACHE] Completed Scene Caching, {0} assets found.", assetsCached); |
772 | 772 | ||
773 | }); | 773 | }); |
774 | 774 | ||
775 | break; | 775 | break; |
776 | 776 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4f3cc98..2dbc090 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1152,13 +1152,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1152 | 1152 | ||
1153 | public void AddGroupTarget(SceneObjectGroup grp) | 1153 | public void AddGroupTarget(SceneObjectGroup grp) |
1154 | { | 1154 | { |
1155 | lock(m_groupsWithTargets) | 1155 | lock (m_groupsWithTargets) |
1156 | m_groupsWithTargets[grp.UUID] = grp; | 1156 | m_groupsWithTargets[grp.UUID] = grp; |
1157 | } | 1157 | } |
1158 | 1158 | ||
1159 | public void RemoveGroupTarget(SceneObjectGroup grp) | 1159 | public void RemoveGroupTarget(SceneObjectGroup grp) |
1160 | { | 1160 | { |
1161 | lock(m_groupsWithTargets) | 1161 | lock (m_groupsWithTargets) |
1162 | m_groupsWithTargets.Remove(grp.UUID); | 1162 | m_groupsWithTargets.Remove(grp.UUID); |
1163 | } | 1163 | } |
1164 | 1164 | ||
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index ac14292..1a8c948 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Physics.Manager | |||
48 | int[] getIndexListAsIntLocked(); | 48 | int[] getIndexListAsIntLocked(); |
49 | float[] getVertexListAsFloatLocked(); | 49 | float[] getVertexListAsFloatLocked(); |
50 | void getIndexListAsPtrToIntArray(out IntPtr indices, out int triStride, out int indexCount); | 50 | void getIndexListAsPtrToIntArray(out IntPtr indices, out int triStride, out int indexCount); |
51 | void getVertexListAsPtrToFloatArray( out IntPtr vertexList, out int vertexStride, out int vertexCount ); | 51 | void getVertexListAsPtrToFloatArray(out IntPtr vertexList, out int vertexStride, out int vertexCount); |
52 | void releaseSourceMeshData(); | 52 | void releaseSourceMeshData(); |
53 | void releasePinned(); | 53 | void releasePinned(); |
54 | void Append(IMesh newMesh); | 54 | void Append(IMesh newMesh); |
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs index 94d926a..4c3cf33 100644 --- a/OpenSim/Region/Physics/Meshing/Mesh.cs +++ b/OpenSim/Region/Physics/Meshing/Mesh.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
70 | throw new NotSupportedException("Attempt to Add to a pinned Mesh"); | 70 | throw new NotSupportedException("Attempt to Add to a pinned Mesh"); |
71 | // If a vertex of the triangle is not yet in the vertices list, | 71 | // If a vertex of the triangle is not yet in the vertices list, |
72 | // add it and set its index to the current index count | 72 | // add it and set its index to the current index count |
73 | if( !m_vertices.ContainsKey(triangle.v1) ) | 73 | if (!m_vertices.ContainsKey(triangle.v1)) |
74 | m_vertices[triangle.v1] = m_vertices.Count; | 74 | m_vertices[triangle.v1] = m_vertices.Count; |
75 | if (!m_vertices.ContainsKey(triangle.v2)) | 75 | if (!m_vertices.ContainsKey(triangle.v2)) |
76 | m_vertices[triangle.v2] = m_vertices.Count; | 76 | m_vertices[triangle.v2] = m_vertices.Count; |
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
153 | 153 | ||
154 | private float[] getVertexListAsFloat() | 154 | private float[] getVertexListAsFloat() |
155 | { | 155 | { |
156 | if(m_vertices == null) | 156 | if (m_vertices == null) |
157 | throw new NotSupportedException(); | 157 | throw new NotSupportedException(); |
158 | float[] result = new float[m_vertices.Count * 3]; | 158 | float[] result = new float[m_vertices.Count * 3]; |
159 | foreach (KeyValuePair<Vertex, int> kvp in m_vertices) | 159 | foreach (KeyValuePair<Vertex, int> kvp in m_vertices) |
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
169 | 169 | ||
170 | public float[] getVertexListAsFloatLocked() | 170 | public float[] getVertexListAsFloatLocked() |
171 | { | 171 | { |
172 | if( m_pinnedVertexes.IsAllocated ) | 172 | if (m_pinnedVertexes.IsAllocated) |
173 | return (float[])(m_pinnedVertexes.Target); | 173 | return (float[])(m_pinnedVertexes.Target); |
174 | 174 | ||
175 | float[] result = getVertexListAsFloat(); | 175 | float[] result = getVertexListAsFloat(); |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 496e097..63bfc90 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -816,8 +816,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
816 | IntPtr vertices, indices; | 816 | IntPtr vertices, indices; |
817 | int vertexCount, indexCount; | 817 | int vertexCount, indexCount; |
818 | int vertexStride, triStride; | 818 | int vertexStride, triStride; |
819 | mesh.getVertexListAsPtrToFloatArray( out vertices, out vertexStride, out vertexCount ); // Note, that vertices are fixed in unmanaged heap | 819 | mesh.getVertexListAsPtrToFloatArray(out vertices, out vertexStride, out vertexCount); // Note, that vertices are fixed in unmanaged heap |
820 | mesh.getIndexListAsPtrToIntArray( out indices, out triStride, out indexCount ); // Also fixed, needs release after usage | 820 | mesh.getIndexListAsPtrToIntArray(out indices, out triStride, out indexCount); // Also fixed, needs release after usage |
821 | 821 | ||
822 | mesh.releaseSourceMeshData(); // free up the original mesh data to save memory | 822 | mesh.releaseSourceMeshData(); // free up the original mesh data to save memory |
823 | 823 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 7187fbe..0c94fb6 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -3805,7 +3805,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
3805 | } | 3805 | } |
3806 | 3806 | ||
3807 | public void start(int unused) | 3807 | public void start(int unused) |
3808 | { | 3808 | { |
3809 | ds.SetViewpoint(ref xyz, ref hpr); | 3809 | ds.SetViewpoint(ref xyz, ref hpr); |
3810 | } | 3810 | } |
3811 | #endif | 3811 | #endif |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 97166cf..2b858ec 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -353,15 +353,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
353 | // m_log.ErrorFormat("[Script] Unable to load script state from xml: {0}\n"+e.ToString(), xml); | 353 | // m_log.ErrorFormat("[Script] Unable to load script state from xml: {0}\n"+e.ToString(), xml); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | else | 356 | // else |
357 | { | 357 | // { |
358 | ScenePresence presence = m_Engine.World.GetScenePresence(part.OwnerID); | 358 | // ScenePresence presence = m_Engine.World.GetScenePresence(part.OwnerID); |
359 | 359 | ||
360 | if (presence != null && (!postOnRez)) | 360 | // if (presence != null && (!postOnRez)) |
361 | presence.ControllingClient.SendAgentAlertMessage("Compile successful", false); | 361 | // presence.ControllingClient.SendAgentAlertMessage("Compile successful", false); |
362 | 362 | ||
363 | // // m_log.ErrorFormat("[Script] Unable to load script state, file not found"); | 363 | // } |
364 | } | ||
365 | } | 364 | } |
366 | 365 | ||
367 | public void Init() | 366 | public void Init() |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 847da8c..7b19ce3 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -604,9 +604,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
604 | 604 | ||
605 | if (warnings != null && warnings.Length != 0) | 605 | if (warnings != null && warnings.Length != 0) |
606 | { | 606 | { |
607 | if (presence != null && (!postOnRez)) | ||
608 | presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false); | ||
609 | |||
610 | foreach (string warning in warnings) | 607 | foreach (string warning in warnings) |
611 | { | 608 | { |
612 | try | 609 | try |
@@ -615,10 +612,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
615 | string text = "Warning:\n" + warning; | 612 | string text = "Warning:\n" + warning; |
616 | if (text.Length > 1000) | 613 | if (text.Length > 1000) |
617 | text = text.Substring(0, 1000); | 614 | text = text.Substring(0, 1000); |
618 | World.SimChat(Utils.StringToBytes(text), | 615 | if (!ShowScriptSaveResponse(item.OwnerID, |
619 | ChatTypeEnum.DebugChannel, 2147483647, | 616 | assetID, text, true)) |
620 | part.AbsolutePosition, | 617 | { |
621 | part.Name, part.UUID, false); | 618 | if (presence != null && (!postOnRez)) |
619 | presence.ControllingClient.SendAgentAlertMessage("Script saved with warnings, check debug window!", false); | ||
620 | |||
621 | World.SimChat(Utils.StringToBytes(text), | ||
622 | ChatTypeEnum.DebugChannel, 2147483647, | ||
623 | part.AbsolutePosition, | ||
624 | part.Name, part.UUID, false); | ||
625 | } | ||
622 | } | 626 | } |
623 | catch (Exception e2) // LEGIT: User Scripting | 627 | catch (Exception e2) // LEGIT: User Scripting |
624 | { | 628 | { |
@@ -634,8 +638,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
634 | } | 638 | } |
635 | catch (Exception e) | 639 | catch (Exception e) |
636 | { | 640 | { |
637 | if (presence != null && (!postOnRez)) | ||
638 | presence.ControllingClient.SendAgentAlertMessage("Script saved with errors, check debug window!", false); | ||
639 | try | 641 | try |
640 | { | 642 | { |
641 | // DISPLAY ERROR INWORLD | 643 | // DISPLAY ERROR INWORLD |
@@ -645,10 +647,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
645 | string text = "Error compiling script '" + item.Name + "':\n" + e.Message.ToString(); | 647 | string text = "Error compiling script '" + item.Name + "':\n" + e.Message.ToString(); |
646 | if (text.Length > 1000) | 648 | if (text.Length > 1000) |
647 | text = text.Substring(0, 1000); | 649 | text = text.Substring(0, 1000); |
648 | World.SimChat(Utils.StringToBytes(text), | 650 | if (!ShowScriptSaveResponse(item.OwnerID, |
649 | ChatTypeEnum.DebugChannel, 2147483647, | 651 | assetID, text, false)) |
650 | part.AbsolutePosition, | 652 | { |
651 | part.Name, part.UUID, false); | 653 | if (presence != null && (!postOnRez)) |
654 | presence.ControllingClient.SendAgentAlertMessage("Script saved with errors, check debug window!", false); | ||
655 | World.SimChat(Utils.StringToBytes(text), | ||
656 | ChatTypeEnum.DebugChannel, 2147483647, | ||
657 | part.AbsolutePosition, | ||
658 | part.Name, part.UUID, false); | ||
659 | } | ||
652 | } | 660 | } |
653 | catch (Exception e2) // LEGIT: User Scripting | 661 | catch (Exception e2) // LEGIT: User Scripting |
654 | { | 662 | { |
@@ -732,6 +740,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
732 | m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}", | 740 | m_log.DebugFormat("[XEngine] Loaded script {0}.{1}, script UUID {2}, prim UUID {3} @ {4}", |
733 | part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString()); | 741 | part.ParentGroup.RootPart.Name, item.Name, assetID, part.UUID, part.ParentGroup.RootPart.AbsolutePosition.ToString()); |
734 | 742 | ||
743 | if (presence != null) | ||
744 | { | ||
745 | ShowScriptSaveResponse(item.OwnerID, | ||
746 | assetID, "Compile successful", true); | ||
747 | } | ||
748 | |||
735 | instance.AppDomain = appDomain; | 749 | instance.AppDomain = appDomain; |
736 | instance.LineMap = linemap; | 750 | instance.LineMap = linemap; |
737 | 751 | ||
@@ -1250,5 +1264,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1250 | 1264 | ||
1251 | return instance.CanBeDeleted(); | 1265 | return instance.CanBeDeleted(); |
1252 | } | 1266 | } |
1267 | |||
1268 | private bool ShowScriptSaveResponse(UUID ownerID, UUID assetID, string text, bool compiled) | ||
1269 | { | ||
1270 | return false; | ||
1271 | } | ||
1253 | } | 1272 | } |
1254 | } | 1273 | } |