diff options
Implement CHANGED_REGION_(RE)START and also fix various CHANGED_* constants which had the wrong values (checked using LSL in SL). This addresses mantis #217 and mantis #53.
Diffstat (limited to '')
4 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 702a1e2..b847d87 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
130 | anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) | 130 | anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) |
131 | { | 131 | { |
132 | // 16384 is CHANGED_ANIMATION | 132 | // 16384 is CHANGED_ANIMATION |
133 | m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 }); | 133 | m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { (int)Changed.ANIMATION}); |
134 | SendAnimPack(); | 134 | SendAnimPack(); |
135 | } | 135 | } |
136 | } | 136 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 032fbe8..a0fabff 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -56,9 +56,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
56 | LINK = 32, | 56 | LINK = 32, |
57 | ALLOWED_DROP = 64, | 57 | ALLOWED_DROP = 64, |
58 | OWNER = 128, | 58 | OWNER = 128, |
59 | REGION_RESTART = 256, | 59 | REGION = 256, |
60 | REGION = 512, | 60 | TELEPORT = 512, |
61 | TELEPORT = 1024 | 61 | REGION_RESTART = 1024, |
62 | ANIMATION = 16384 | ||
62 | } | 63 | } |
63 | 64 | ||
64 | // I don't really know where to put this except here. | 65 | // I don't really know where to put this except here. |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 8b4f0ed..4f80a7e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -321,6 +321,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
321 | StoreScriptErrors(item.ItemID, null); | 321 | StoreScriptErrors(item.ItemID, null); |
322 | m_part.ParentGroup.AddActiveScriptCount(1); | 322 | m_part.ParentGroup.AddActiveScriptCount(1); |
323 | m_part.ScheduleFullUpdate(); | 323 | m_part.ScheduleFullUpdate(); |
324 | |||
325 | //This should play nice with XEngine since XEngine loads scripts /after/ the region starts | ||
326 | if (stateSource == 0 && m_part.ParentGroup.Scene.LoginsDisabled == true) | ||
327 | { | ||
328 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | ||
329 | if (engines != null) | ||
330 | { | ||
331 | foreach (IScriptModule xengine in engines) | ||
332 | { | ||
333 | if (xengine != null) | ||
334 | { | ||
335 | xengine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.REGION_RESTART }); | ||
336 | } | ||
337 | } | ||
338 | } | ||
339 | } | ||
324 | } | 340 | } |
325 | } | 341 | } |
326 | } | 342 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d857a1c..5fcd1c2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3939,7 +3939,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
3939 | if (m == null) // No script engine loaded | 3939 | if (m == null) // No script engine loaded |
3940 | continue; | 3940 | continue; |
3941 | 3941 | ||
3942 | m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { 16384 }); | 3942 | m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { (int)Changed.ANIMATION }); |
3943 | } | 3943 | } |
3944 | } | 3944 | } |
3945 | } | 3945 | } |