Revert "Trigger changed event with CHANGED_TELEPORT when teleporting to another region."
This reverts commit 2827deffe8
.
Pulling out a bad core commit that broke attachment teleporting for us
avinationmerge
parent
342dc532ec
commit
6c01ebb875
|
@ -2392,13 +2392,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return false;
|
||||
}
|
||||
|
||||
newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
|
||||
newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2);
|
||||
|
||||
newObject.ResumeScripts();
|
||||
|
||||
// Do this as late as possible so that listeners have full access to the incoming object
|
||||
EventManager.TriggerOnIncomingSceneObject(newObject);
|
||||
|
||||
TriggerChangedTeleport(newObject);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2525,7 +2527,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return true;
|
||||
}
|
||||
|
||||
private int GetStateSource(SceneObjectGroup sog)
|
||||
private void TriggerChangedTeleport(SceneObjectGroup sog)
|
||||
{
|
||||
ScenePresence sp = GetScenePresence(sog.OwnerID);
|
||||
|
||||
|
@ -2536,12 +2538,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default))
|
||||
{
|
||||
// This will get your attention
|
||||
//m_log.Error("[XXX] Triggering CHANGED_TELEPORT");
|
||||
//m_log.Error("[XXX] Triggering ");
|
||||
|
||||
return 5; // StateSource.Teleporting
|
||||
// Trigger CHANGED_TELEPORT
|
||||
sp.Scene.EventManager.TriggerOnScriptChangedEvent(sog.LocalId, (uint)Changed.TELEPORT);
|
||||
}
|
||||
|
||||
}
|
||||
return 2; // StateSource.PrimCrossing
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -42,8 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
NewRez = 1,
|
||||
PrimCrossing = 2,
|
||||
ScriptedRez = 3,
|
||||
AttachedRez = 4,
|
||||
Teleporting = 5
|
||||
AttachedRez = 4
|
||||
}
|
||||
|
||||
public interface IScriptWorkItem
|
||||
|
|
|
@ -393,18 +393,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
|||
{
|
||||
// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
|
||||
PostEvent(new EventParams("changed",
|
||||
new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) }, new DetectParams[0]));
|
||||
new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) },
|
||||
new DetectParams[0]));
|
||||
}
|
||||
else if (m_stateSource == StateSource.PrimCrossing || m_stateSource == StateSource.Teleporting)
|
||||
else if (m_stateSource == StateSource.PrimCrossing)
|
||||
{
|
||||
// CHANGED_REGION
|
||||
PostEvent(new EventParams("changed",
|
||||
new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) }, new DetectParams[0]));
|
||||
|
||||
// CHANGED_TELEPORT
|
||||
if (m_stateSource == StateSource.Teleporting)
|
||||
PostEvent(new EventParams("changed",
|
||||
new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0]));
|
||||
new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) },
|
||||
new DetectParams[0]));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue