aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs25
-rw-r--r--OpenSim/Region/Framework/Interfaces/IJ2KDecoder.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs8
7 files changed, 67 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
index 8670229..39a760c 100644
--- a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
@@ -61,7 +61,32 @@ namespace OpenSim.Region.Framework.Interfaces
61 /// <returns>true if a valid agent was found, false otherwise</returns> 61 /// <returns>true if a valid agent was found, false otherwise</returns>
62 bool SaveBakedTextures(UUID agentId); 62 bool SaveBakedTextures(UUID agentId);
63 63
64 /// <summary>
65 /// Validate that OpenSim can find the baked textures need to display a given avatar
66 /// </summary>
67 /// <param name="client"></param>
68 /// <param name="checkonly"></param>
69 /// <returns>
70 /// true if all the baked textures referenced by the texture IDs exist or the appearance is only using default textures. false otherwise.
71 /// </returns>
64 bool ValidateBakedTextureCache(IScenePresence sp); 72 bool ValidateBakedTextureCache(IScenePresence sp);
73
74 /// <summary>
75 /// Request a rebake of textures for an avatar.
76 /// </summary>
77 /// <remarks>
78 /// This will send the request to the viewer, since it's there that the rebake is done.
79 /// </remarks>
80 /// <param name="sp">Avatar to rebake.</param>
81 /// <param name="missingTexturesOnly">
82 /// If true, only request a rebake for the textures that are missing.
83 /// If false then we request a rebake of all textures for which we already have references.
84 /// </param>
85 /// <returns>
86 /// Number of rebake requests made. This will depend upon whether we've previously received texture IDs.
87 /// </returns>
88 int RequestRebake(IScenePresence sp, bool missingTexturesOnly);
89
65 void QueueAppearanceSend(UUID agentid); 90 void QueueAppearanceSend(UUID agentid);
66 void QueueAppearanceSave(UUID agentid); 91 void QueueAppearanceSave(UUID agentid);
67 92
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
35 public interface IJ2KDecoder 35 public interface IJ2KDecoder
36 { 36 {
37 void BeginDecode(UUID assetID, byte[] j2kData, DecodedCallback callback); 37 void BeginDecode(UUID assetID, byte[] j2kData, DecodedCallback callback);
38 void Decode(UUID assetID, byte[] j2kData); 38
39 /// <summary>
40 /// Provides a synchronous decode so that caller can be assured that this executes before the next line
41 /// </summary>
42 /// <param name="assetID"></param>
43 /// <param name="j2kData"></param>
44 /// <returns>true if decode was successful. false otherwise.</returns>
45 bool Decode(UUID assetID, byte[] j2kData);
39 } 46 }
40} 47}
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
401 public delegate void RegionUp(GridRegion region); 401 public delegate void RegionUp(GridRegion region);
402 public event RegionUp OnRegionUp; 402 public event RegionUp OnRegionUp;
403 403
404 public delegate void RegionStarted(Scene scene);
405 public event RegionStarted OnRegionStarted;
406
404 public delegate void LoginsEnabled(string regionName); 407 public delegate void LoginsEnabled(string regionName);
405 public event LoginsEnabled OnLoginsEnabled; 408 public event LoginsEnabled OnLoginsEnabled;
406 409
@@ -2243,6 +2246,27 @@ namespace OpenSim.Region.Framework.Scenes
2243 } 2246 }
2244 } 2247 }
2245 2248
2249 public void TriggerOnRegionStarted(Scene scene)
2250 {
2251 RegionStarted handler = OnRegionStarted;
2252
2253 if (handler != null)
2254 {
2255 foreach (RegionStarted d in handler.GetInvocationList())
2256 {
2257 try
2258 {
2259 d(scene);
2260 }
2261 catch (Exception e)
2262 {
2263 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}",
2264 e.Message, e.StackTrace);
2265 }
2266 }
2267 }
2268 }
2269
2246 public void TriggerLoginsEnabled (string regionName) 2270 public void TriggerLoginsEnabled (string regionName)
2247 { 2271 {
2248 LoginsEnabled handler = OnLoginsEnabled; 2272 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
1194 1194
1195 try 1195 try
1196 { 1196 {
1197 m_eventManager.TriggerOnRegionStarted(this);
1197 while (!shuttingdown) 1198 while (!shuttingdown)
1198 Update(); 1199 Update();
1199 1200
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
1960 public Vector3 GetWorldPosition() 1960 public Vector3 GetWorldPosition()
1961 { 1961 {
1962 Quaternion parentRot = ParentGroup.RootPart.RotationOffset; 1962 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
1963
1964 Vector3 axPos = OffsetPosition; 1963 Vector3 axPos = OffsetPosition;
1965
1966 axPos *= parentRot; 1964 axPos *= parentRot;
1967 Vector3 translationOffsetPosition = axPos; 1965 Vector3 translationOffsetPosition = axPos;
1968 1966 if(_parentID == 0)
1969// m_log.DebugFormat("[SCENE OBJECT PART]: Found group pos {0} for part {1}", GroupPosition, Name); 1967 return GroupPosition;
1970 1968 else
1971 Vector3 worldPos = GroupPosition + translationOffsetPosition; 1969 return ParentGroup.AbsolutePosition + translationOffsetPosition;
1972
1973// m_log.DebugFormat("[SCENE OBJECT PART]: Found world pos {0} for part {1}", worldPos, Name);
1974
1975 return worldPos;
1976 } 1970 }
1977 1971
1978 /// <summary> 1972 /// <summary>
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
2844 Velocity = Vector3.Zero; 2844 Velocity = Vector3.Zero;
2845 AbsolutePosition = pos; 2845 AbsolutePosition = pos;
2846 2846
2847 m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition); 2847// m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition);
2848 2848
2849 AddToPhysicalScene(isFlying); 2849 AddToPhysicalScene(isFlying);
2850 } 2850 }
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
1263 writer.WriteElementString(name, flagsStr.Replace(",", "")); 1263 writer.WriteElementString(name, flagsStr.Replace(",", ""));
1264 } 1264 }
1265 1265
1266 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene) 1266 public static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene)
1267 { 1267 {
1268 if (tinv.Count > 0) // otherwise skip this 1268 if (tinv.Count > 0) // otherwise skip this
1269 { 1269 {
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1317 } 1317 }
1318 } 1318 }
1319 1319
1320 static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary<string, object> options) 1320 public static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary<string, object> options)
1321 { 1321 {
1322 if (shp != null) 1322 if (shp != null)
1323 { 1323 {
@@ -1492,7 +1492,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1492 return obj; 1492 return obj;
1493 } 1493 }
1494 1494
1495 static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) 1495 public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name)
1496 { 1496 {
1497 TaskInventoryDictionary tinv = new TaskInventoryDictionary(); 1497 TaskInventoryDictionary tinv = new TaskInventoryDictionary();
1498 1498
@@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1538 /// <param name="name">The name of the xml element containing the shape</param> 1538 /// <param name="name">The name of the xml element containing the shape</param>
1539 /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param> 1539 /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param>
1540 /// <returns>The shape parsed</returns> 1540 /// <returns>The shape parsed</returns>
1541 static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) 1541 public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors)
1542 { 1542 {
1543 errors = false; 1543 errors = false;
1544 1544