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.
parent
0eda6714f3
commit
c5c6627adb
|
@ -130,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID))
|
anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID))
|
||||||
{
|
{
|
||||||
// 16384 is CHANGED_ANIMATION
|
// 16384 is CHANGED_ANIMATION
|
||||||
m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 });
|
m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { (int)Changed.ANIMATION});
|
||||||
SendAnimPack();
|
SendAnimPack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
LINK = 32,
|
LINK = 32,
|
||||||
ALLOWED_DROP = 64,
|
ALLOWED_DROP = 64,
|
||||||
OWNER = 128,
|
OWNER = 128,
|
||||||
REGION_RESTART = 256,
|
REGION = 256,
|
||||||
REGION = 512,
|
TELEPORT = 512,
|
||||||
TELEPORT = 1024
|
REGION_RESTART = 1024,
|
||||||
|
ANIMATION = 16384
|
||||||
}
|
}
|
||||||
|
|
||||||
// I don't really know where to put this except here.
|
// I don't really know where to put this except here.
|
||||||
|
|
|
@ -321,6 +321,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
StoreScriptErrors(item.ItemID, null);
|
StoreScriptErrors(item.ItemID, null);
|
||||||
m_part.ParentGroup.AddActiveScriptCount(1);
|
m_part.ParentGroup.AddActiveScriptCount(1);
|
||||||
m_part.ScheduleFullUpdate();
|
m_part.ScheduleFullUpdate();
|
||||||
|
|
||||||
|
//This should play nice with XEngine since XEngine loads scripts /after/ the region starts
|
||||||
|
if (stateSource == 0 && m_part.ParentGroup.Scene.LoginsDisabled == true)
|
||||||
|
{
|
||||||
|
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
|
||||||
|
if (engines != null)
|
||||||
|
{
|
||||||
|
foreach (IScriptModule xengine in engines)
|
||||||
|
{
|
||||||
|
if (xengine != null)
|
||||||
|
{
|
||||||
|
xengine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.REGION_RESTART });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3939,7 +3939,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
|
||||||
if (m == null) // No script engine loaded
|
if (m == null) // No script engine loaded
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { 16384 });
|
m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { (int)Changed.ANIMATION });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,10 +273,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int CHANGED_LINK = 32;
|
public const int CHANGED_LINK = 32;
|
||||||
public const int CHANGED_ALLOWED_DROP = 64;
|
public const int CHANGED_ALLOWED_DROP = 64;
|
||||||
public const int CHANGED_OWNER = 128;
|
public const int CHANGED_OWNER = 128;
|
||||||
public const int CHANGED_REGION_RESTART = 256;
|
public const int CHANGED_REGION = 256;
|
||||||
public const int CHANGED_REGION_START = 256; //LL Changed the constant from CHANGED_REGION_RESTART
|
public const int CHANGED_TELEPORT = 512;
|
||||||
public const int CHANGED_REGION = 512;
|
public const int CHANGED_REGION_RESTART = 1024;
|
||||||
public const int CHANGED_TELEPORT = 1024;
|
public const int CHANGED_REGION_START = 1024; //LL Changed the constant from CHANGED_REGION_RESTART
|
||||||
public const int CHANGED_ANIMATION = 16384;
|
public const int CHANGED_ANIMATION = 16384;
|
||||||
public const int TYPE_INVALID = 0;
|
public const int TYPE_INVALID = 0;
|
||||||
public const int TYPE_INTEGER = 1;
|
public const int TYPE_INTEGER = 1;
|
||||||
|
|
|
@ -392,13 +392,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
{
|
{
|
||||||
// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
|
// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
|
||||||
PostEvent(new EventParams("changed",
|
PostEvent(new EventParams("changed",
|
||||||
new Object[] {new LSL_Types.LSLInteger(256)}, new DetectParams[0]));
|
new Object[] { (int)Changed.REGION_RESTART }, new DetectParams[0]));
|
||||||
}
|
}
|
||||||
else if (m_stateSource == StateSource.PrimCrossing)
|
else if (m_stateSource == StateSource.PrimCrossing)
|
||||||
{
|
{
|
||||||
// CHANGED_REGION
|
// CHANGED_REGION
|
||||||
PostEvent(new EventParams("changed",
|
PostEvent(new EventParams("changed",
|
||||||
new Object[] {new LSL_Types.LSLInteger(512)}, new DetectParams[0]));
|
new Object[] { (int)Changed.REGION }, new DetectParams[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue