diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
5 files changed, 33 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 209a0a6..74d9e60 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -405,6 +405,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
405 | public delegate void RegionUp(GridRegion region); | 405 | public delegate void RegionUp(GridRegion region); |
406 | public event RegionUp OnRegionUp; | 406 | public event RegionUp OnRegionUp; |
407 | 407 | ||
408 | public delegate void RegionStarted(Scene scene); | ||
409 | public event RegionStarted OnRegionStarted; | ||
410 | |||
408 | public delegate void LoginsEnabled(string regionName); | 411 | public delegate void LoginsEnabled(string regionName); |
409 | public event LoginsEnabled OnLoginsEnabled; | 412 | public event LoginsEnabled OnLoginsEnabled; |
410 | 413 | ||
@@ -2267,6 +2270,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2267 | } | 2270 | } |
2268 | } | 2271 | } |
2269 | 2272 | ||
2273 | public void TriggerOnRegionStarted(Scene scene) | ||
2274 | { | ||
2275 | RegionStarted handler = OnRegionStarted; | ||
2276 | |||
2277 | if (handler != null) | ||
2278 | { | ||
2279 | foreach (RegionStarted d in handler.GetInvocationList()) | ||
2280 | { | ||
2281 | try | ||
2282 | { | ||
2283 | d(scene); | ||
2284 | } | ||
2285 | catch (Exception e) | ||
2286 | { | ||
2287 | m_log.ErrorFormat("[EVENT MANAGER]: Delegate for RegionStarted failed - continuing {0} - {1}", | ||
2288 | e.Message, e.StackTrace); | ||
2289 | } | ||
2290 | } | ||
2291 | } | ||
2292 | } | ||
2293 | |||
2270 | public void TriggerLoginsEnabled (string regionName) | 2294 | public void TriggerLoginsEnabled (string regionName) |
2271 | { | 2295 | { |
2272 | LoginsEnabled handler = OnLoginsEnabled; | 2296 | LoginsEnabled handler = OnLoginsEnabled; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 26f915b..d2e0ab0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1236,6 +1236,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1236 | 1236 | ||
1237 | try | 1237 | try |
1238 | { | 1238 | { |
1239 | m_eventManager.TriggerOnRegionStarted(this); | ||
1239 | while (!shuttingdown) | 1240 | while (!shuttingdown) |
1240 | Update(); | 1241 | Update(); |
1241 | } | 1242 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index fa8b1c0..c45cfb8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2015,13 +2015,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2015 | axPos *= parentRot; | 2015 | axPos *= parentRot; |
2016 | Vector3 translationOffsetPosition = axPos; | 2016 | Vector3 translationOffsetPosition = axPos; |
2017 | if(_parentID == 0) | 2017 | if(_parentID == 0) |
2018 | { | 2018 | return GroupPosition; |
2019 | return GroupPosition; | 2019 | else |
2020 | } | 2020 | return ParentGroup.AbsolutePosition + translationOffsetPosition; |
2021 | else | ||
2022 | { | ||
2023 | return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position | ||
2024 | } | ||
2025 | } | 2021 | } |
2026 | 2022 | ||
2027 | /// <summary> | 2023 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 845553a..a301ccb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2855,7 +2855,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2855 | Velocity = Vector3.Zero; | 2855 | Velocity = Vector3.Zero; |
2856 | AbsolutePosition = pos; | 2856 | AbsolutePosition = pos; |
2857 | 2857 | ||
2858 | m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition); | 2858 | // m_log.DebugFormat("[SCENE PRESENCE]: Prevented flyoff for {0} at {1}", Name, AbsolutePosition); |
2859 | 2859 | ||
2860 | AddToPhysicalScene(isFlying); | 2860 | AddToPhysicalScene(isFlying); |
2861 | } | 2861 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 5f2f7d8..3f24991 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1279,7 +1279,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1279 | writer.WriteElementString(name, flagsStr.Replace(",", "")); | 1279 | writer.WriteElementString(name, flagsStr.Replace(",", "")); |
1280 | } | 1280 | } |
1281 | 1281 | ||
1282 | static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene) | 1282 | public static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options, Scene scene) |
1283 | { | 1283 | { |
1284 | if (tinv.Count > 0) // otherwise skip this | 1284 | if (tinv.Count > 0) // otherwise skip this |
1285 | { | 1285 | { |
@@ -1333,7 +1333,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1333 | } | 1333 | } |
1334 | } | 1334 | } |
1335 | 1335 | ||
1336 | static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary<string, object> options) | 1336 | public static void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary<string, object> options) |
1337 | { | 1337 | { |
1338 | if (shp != null) | 1338 | if (shp != null) |
1339 | { | 1339 | { |
@@ -1508,7 +1508,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1508 | return obj; | 1508 | return obj; |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) | 1511 | public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) |
1512 | { | 1512 | { |
1513 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); | 1513 | TaskInventoryDictionary tinv = new TaskInventoryDictionary(); |
1514 | 1514 | ||
@@ -1548,7 +1548,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1548 | /// <param name="name">The name of the xml element containing the shape</param> | 1548 | /// <param name="name">The name of the xml element containing the shape</param> |
1549 | /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param> | 1549 | /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param> |
1550 | /// <returns>The shape parsed</returns> | 1550 | /// <returns>The shape parsed</returns> |
1551 | static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) | 1551 | public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) |
1552 | { | 1552 | { |
1553 | errors = false; | 1553 | errors = false; |
1554 | 1554 | ||