From 983b49c0c872e997576d7fc167319e28e6f970e3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Jan 2012 18:25:31 +0000 Subject: commented out "Prevented flyoff" log message for now as this becomes problematic with bot testing. Please uncomment if still needed. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3d1c1b5..42cd4be 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2844,7 +2844,7 @@ namespace OpenSim.Region.Framework.Scenes Velocity = Vector3.Zero; AbsolutePosition = pos; - m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition); +// m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition); AddToPhysicalScene(isFlying); } -- cgit v1.1 From 0ab2289cdcf2417964de5ba36b0d9d4b512013d0 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 3 Jan 2012 16:52:08 -0800 Subject: Access to these static methods to serialize objects are useful outside of serializer --- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 60cc788..bca49f7 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -1263,7 +1263,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString(name, flagsStr.Replace(",", "")); } - static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary options, Scene scene) + public static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary options, Scene scene) { if (tinv.Count > 0) // otherwise skip this { @@ -1317,7 +1317,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization } } - static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary options) + public static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary options) { if (shp != null) { @@ -1492,7 +1492,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization return obj; } - static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) + public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) { TaskInventoryDictionary tinv = new TaskInventoryDictionary(); @@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization /// The name of the xml element containing the shape /// true if any errors were encountered during parsing, false otherwise /// The shape parsed - static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) + public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) { errors = false; -- cgit v1.1 From fc391d4b10b5f05be4d0b44db5be0f2133b74434 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Wed, 4 Jan 2012 12:01:18 -0800 Subject: Added EventManager.OnRegionStarted which is triggered when Heartbeat is started. --- OpenSim/Region/Framework/Scenes/EventManager.cs | 24 ++++++++++++++++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 1 + 2 files changed, 25 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 4f71915..fd35c62 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -401,6 +401,9 @@ namespace OpenSim.Region.Framework.Scenes public delegate void RegionUp(GridRegion region); public event RegionUp OnRegionUp; + public delegate void RegionStarted(Scene scene); + public event RegionStarted OnRegionStarted; + public delegate void LoginsEnabled(string regionName); public event LoginsEnabled OnLoginsEnabled; @@ -2243,6 +2246,27 @@ namespace OpenSim.Region.Framework.Scenes } } + public void TriggerOnRegionStarted(Scene scene) + { + RegionStarted handler = OnRegionStarted; + + if (handler != null) + { + foreach (RegionStarted d in handler.GetInvocationList()) + { + try + { + d(scene); + } + catch (Exception e) + { + m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}", + e.Message, e.StackTrace); + } + } + } + } + public void TriggerLoginsEnabled (string regionName) { LoginsEnabled handler = OnLoginsEnabled; diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0f84da9..027ec96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1194,6 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes try { + m_eventManager.TriggerOnRegionStarted(this); while (!shuttingdown) Update(); -- cgit v1.1 From 0634c3850563fc38a4026f70a7bfd64a05198fa3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 4 Jan 2012 22:22:46 +0000 Subject: Separate out rebake request code from cache validation code AvatarFactoryModule. This allows some logic simplification and allows an external caller to manually request rebakes even if textures are uploaded (future command). --- .../Framework/Interfaces/IAvatarFactoryModule.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs index 8670229..04df9c3 100644 --- a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs @@ -61,7 +61,29 @@ namespace OpenSim.Region.Framework.Interfaces /// true if a valid agent was found, false otherwise bool SaveBakedTextures(UUID agentId); + /// + /// Validate that OpenSim can find the baked textures need to display a given avatar + /// + /// + /// + /// + /// true if all the baked textures referenced by the texture IDs exist or the appearance is only using default textures. false otherwise. + /// bool ValidateBakedTextureCache(IScenePresence sp); + + /// + /// Request a rebake of textures for an avatar. + /// + /// + /// This will send the request to the viewer, since it's there that the rebake is done. + /// + /// Avatar to rebake. + /// + /// If true, only request a rebake for the textures that are missing. + /// If false then we request a rebake of all textures for which we already have references. + /// + void RequestRebake(IScenePresence sp, bool missingTexturesOnly); + void QueueAppearanceSend(UUID agentid); void QueueAppearanceSave(UUID agentid); -- cgit v1.1 From 97ba3c93467e865d0434c0b2f0f775efdc0c354a Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 5 Jan 2012 08:11:52 +0000 Subject: Small fix to GetWorldPosition to get closer to Avination sit behavior --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index aea47e6..51d3586 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1960,19 +1960,13 @@ namespace OpenSim.Region.Framework.Scenes public Vector3 GetWorldPosition() { Quaternion parentRot = ParentGroup.RootPart.RotationOffset; - Vector3 axPos = OffsetPosition; - axPos *= parentRot; Vector3 translationOffsetPosition = axPos; - -// m_log.DebugFormat("[SCENE OBJECT PART]: Found group pos {0} for part {1}", GroupPosition, Name); - - Vector3 worldPos = GroupPosition + translationOffsetPosition; - -// m_log.DebugFormat("[SCENE OBJECT PART]: Found world pos {0} for part {1}", worldPos, Name); - - return worldPos; + if(_parentID == 0) + return GroupPosition; + else + return ParentGroup.AbsolutePosition + translationOffsetPosition; } /// -- cgit v1.1 From c201b54b8524033310c59fe353616e84616a542e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 19:40:54 +0000 Subject: Improve "app rebake" command to return a better message if no uploaded texture ids were available for the rebake request --- OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs index 04df9c3..39a760c 100644 --- a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs @@ -82,7 +82,10 @@ namespace OpenSim.Region.Framework.Interfaces /// If true, only request a rebake for the textures that are missing. /// If false then we request a rebake of all textures for which we already have references. /// - void RequestRebake(IScenePresence sp, bool missingTexturesOnly); + /// + /// Number of rebake requests made. This will depend upon whether we've previously received texture IDs. + /// + int RequestRebake(IScenePresence sp, bool missingTexturesOnly); void QueueAppearanceSend(UUID agentid); void QueueAppearanceSave(UUID agentid); -- cgit v1.1 From 5ea9740f1b2cc98601cfb15c19e190471c4c42ed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 22:40:49 +0000 Subject: Add a "j2k decode" region console command that allows a manual request for a JPEG2000 decode of an asset For debugging purposes. --- OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs index 856eb11..0964276 100644 --- a/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs +++ b/OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs @@ -35,6 +35,13 @@ namespace OpenSim.Region.Framework.Interfaces public interface IJ2KDecoder { void BeginDecode(UUID assetID, byte[] j2kData, DecodedCallback callback); - void Decode(UUID assetID, byte[] j2kData); + + /// + /// Provides a synchronous decode so that caller can be assured that this executes before the next line + /// + /// + /// + /// true if decode was successful. false otherwise. + bool Decode(UUID assetID, byte[] j2kData); } } -- cgit v1.1