diff options
Diffstat (limited to 'OpenSim')
6 files changed, 54 insertions, 28 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 8e800cb..00af175 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -707,32 +707,43 @@ namespace OpenSim.Region.CoreModules.Asset | |||
707 | { | 707 | { |
708 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); | 708 | UuidGatherer gatherer = new UuidGatherer(m_AssetService); |
709 | 709 | ||
710 | HashSet<UUID> uniqueUuids = new HashSet<UUID>(); | ||
710 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); | 711 | Dictionary<UUID, AssetType> assets = new Dictionary<UUID, AssetType>(); |
712 | |||
711 | foreach (Scene s in m_Scenes) | 713 | foreach (Scene s in m_Scenes) |
712 | { | 714 | { |
713 | StampRegionStatusFile(s.RegionInfo.RegionID); | 715 | StampRegionStatusFile(s.RegionInfo.RegionID); |
714 | 716 | ||
715 | s.ForEachSOG(delegate(SceneObjectGroup e) | 717 | s.ForEachSOG(delegate(SceneObjectGroup e) |
716 | { | 718 | { |
717 | gatherer.GatherAssetUuids(e, assets); | 719 | gatherer.GatherAssetUuids(e, assets); |
718 | }); | ||
719 | } | ||
720 | 720 | ||
721 | foreach (UUID assetID in assets.Keys) | 721 | foreach (UUID assetID in assets.Keys) |
722 | { | 722 | { |
723 | string filename = GetFileName(assetID.ToString()); | 723 | uniqueUuids.Add(assetID); |
724 | 724 | ||
725 | if (File.Exists(filename)) | 725 | string filename = GetFileName(assetID.ToString()); |
726 | { | 726 | |
727 | File.SetLastAccessTime(filename, DateTime.Now); | 727 | if (File.Exists(filename)) |
728 | } | 728 | { |
729 | else if (storeUncached) | 729 | File.SetLastAccessTime(filename, DateTime.Now); |
730 | { | 730 | } |
731 | m_AssetService.Get(assetID.ToString()); | 731 | else if (storeUncached) |
732 | } | 732 | { |
733 | AssetBase cachedAsset = m_AssetService.Get(assetID.ToString()); | ||
734 | if (cachedAsset == null && assets[assetID] != AssetType.Unknown) | ||
735 | m_log.DebugFormat( | ||
736 | "[FLOTSAM ASSET CACHE]: Could not find asset {0}, type {1} referenced by object {2} at {3} in scene {4} when pre-caching all scene assets", | ||
737 | assetID, assets[assetID], e.Name, e.AbsolutePosition, s.Name); | ||
738 | } | ||
739 | } | ||
740 | |||
741 | assets.Clear(); | ||
742 | }); | ||
733 | } | 743 | } |
734 | 744 | ||
735 | return assets.Keys.Count; | 745 | |
746 | return uniqueUuids.Count; | ||
736 | } | 747 | } |
737 | 748 | ||
738 | /// <summary> | 749 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index a839086..26d22b8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
75 | public void Close() { } | 75 | public void Close() { } |
76 | public void PostInitialise() { } | 76 | public void PostInitialise() { } |
77 | 77 | ||
78 | |||
79 | ///<summary> | 78 | ///<summary> |
80 | /// | 79 | /// |
81 | ///</summary> | 80 | ///</summary> |
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
133 | ///</summary> | 132 | ///</summary> |
134 | public void AddRegion(Scene scene) | 133 | public void AddRegion(Scene scene) |
135 | { | 134 | { |
136 | if (! m_enabled) | 135 | if (!m_enabled) |
137 | return; | 136 | return; |
138 | 137 | ||
139 | // Every shared region module has to maintain an indepedent list of | 138 | // Every shared region module has to maintain an indepedent list of |
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
206 | 205 | ||
207 | using (Image mapTile = tileGenerator.CreateMapTile()) | 206 | using (Image mapTile = tileGenerator.CreateMapTile()) |
208 | { | 207 | { |
208 | // XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there | ||
209 | // is no static map tile. | ||
210 | if (mapTile == null) | ||
211 | return; | ||
212 | |||
209 | using (MemoryStream stream = new MemoryStream()) | 213 | using (MemoryStream stream = new MemoryStream()) |
210 | { | 214 | { |
211 | mapTile.Save(stream, ImageFormat.Jpeg); | 215 | mapTile.Save(stream, ImageFormat.Jpeg); |
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs index d412efc..e7065dc 100644 --- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs | |||
@@ -113,7 +113,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
113 | //t = System.Environment.TickCount - t; | 113 | //t = System.Environment.TickCount - t; |
114 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); | 114 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); |
115 | 115 | ||
116 | |||
117 | if (drawPrimVolume) | 116 | if (drawPrimVolume) |
118 | { | 117 | { |
119 | DrawObjectVolume(m_scene, mapbmp); | 118 | DrawObjectVolume(m_scene, mapbmp); |
@@ -121,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
121 | } | 120 | } |
122 | else | 121 | else |
123 | { | 122 | { |
124 | mapbmp = fetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); | 123 | mapbmp = FetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); |
125 | } | 124 | } |
126 | return mapbmp; | 125 | return mapbmp; |
127 | } | 126 | } |
@@ -232,11 +231,19 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap | |||
232 | // } | 231 | // } |
233 | // } | 232 | // } |
234 | 233 | ||
235 | private Bitmap fetchTexture(UUID id) | 234 | private Bitmap FetchTexture(UUID id) |
236 | { | 235 | { |
237 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); | 236 | AssetBase asset = m_scene.AssetService.Get(id.ToString()); |
238 | m_log.DebugFormat("[MAPTILE]: Fetched static texture {0}, found: {1}", id, asset != null); | 237 | |
239 | if (asset == null) return null; | 238 | if (asset != null) |
239 | { | ||
240 | m_log.DebugFormat("[MAPTILE]: Static map image texture {0} found for {1}", id, m_scene.Name); | ||
241 | } | ||
242 | else | ||
243 | { | ||
244 | m_log.WarnFormat("[MAPTILE]: Static map image texture {0} not found for {1}", id, m_scene.Name); | ||
245 | return null; | ||
246 | } | ||
240 | 247 | ||
241 | ManagedImage managedImage; | 248 | ManagedImage managedImage; |
242 | Image image; | 249 | Image image; |
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index e238d01..ad33607 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -131,7 +131,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
131 | /// within this object). | 131 | /// within this object). |
132 | /// </remarks> | 132 | /// </remarks> |
133 | /// <param name="sceneObject">The scene object for which to gather assets</param> | 133 | /// <param name="sceneObject">The scene object for which to gather assets</param> |
134 | /// <param name="assetUuids">The assets gathered</param> | 134 | /// <param name="assetUuids"> |
135 | /// A dictionary which is populated with the asset UUIDs gathered and the type of that asset. | ||
136 | /// For assets where the type is not clear (e.g. UUIDs extracted from LSL and notecards), the type is Unknown. | ||
137 | /// </param> | ||
135 | public void GatherAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, AssetType> assetUuids) | 138 | public void GatherAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, AssetType> assetUuids) |
136 | { | 139 | { |
137 | // m_log.DebugFormat( | 140 | // m_log.DebugFormat( |
@@ -261,8 +264,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
261 | UUID uuid = new UUID(uuidMatch.Value); | 264 | UUID uuid = new UUID(uuidMatch.Value); |
262 | // m_log.DebugFormat("[ARCHIVER]: Recording {0} in text", uuid); | 265 | // m_log.DebugFormat("[ARCHIVER]: Recording {0} in text", uuid); |
263 | 266 | ||
264 | // Assume AssetIDs embedded are textures. | 267 | // Embedded asset references (if not false positives) could be for many types of asset, so we will |
265 | assetUuids[uuid] = AssetType.Texture; | 268 | // label these as unknown. |
269 | assetUuids[uuid] = AssetType.Unknown; | ||
266 | } | 270 | } |
267 | } | 271 | } |
268 | } | 272 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 96a9ff7..c4d7ef3 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Physics.Manager | |||
43 | public delegate void JointDeactivated(PhysicsJoint joint); | 43 | public delegate void JointDeactivated(PhysicsJoint joint); |
44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" | 44 | public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" |
45 | 45 | ||
46 | public enum RayFilterFlags:ushort | 46 | public enum RayFilterFlags : ushort |
47 | { | 47 | { |
48 | // the flags | 48 | // the flags |
49 | water = 0x01, | 49 | water = 0x01, |
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Physics.Manager | |||
60 | ClosestHit = 0x8000, | 60 | ClosestHit = 0x8000, |
61 | 61 | ||
62 | // some combinations | 62 | // some combinations |
63 | LSLPhanton = phantom | volumedtc, | 63 | LSLPhantom = phantom | volumedtc, |
64 | PrimsNonPhantom = nonphysical | physical, | 64 | PrimsNonPhantom = nonphysical | physical, |
65 | PrimsNonPhantomAgents = nonphysical | physical | agent, | 65 | PrimsNonPhantomAgents = nonphysical | physical | agent, |
66 | 66 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 81de9ab..0db6fe3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11381,7 +11381,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11381 | if (checkNonPhysical) | 11381 | if (checkNonPhysical) |
11382 | rayfilter |= RayFilterFlags.nonphysical; | 11382 | rayfilter |= RayFilterFlags.nonphysical; |
11383 | if (detectPhantom) | 11383 | if (detectPhantom) |
11384 | rayfilter |= RayFilterFlags.LSLPhanton; | 11384 | rayfilter |= RayFilterFlags.LSLPhantom; |
11385 | 11385 | ||
11386 | Vector3 direction = dir * ( 1/dist); | 11386 | Vector3 direction = dir * ( 1/dist); |
11387 | 11387 | ||