Merge branch 'master' into careminster
commit
8f949513fd
|
@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
m_module.Scene.RegionInfo.RegionSettings.Save();
|
m_module.Scene.RegionInfo.RegionSettings.Save();
|
||||||
m_module.TriggerRegionInfoChange();
|
m_module.TriggerRegionInfoChange();
|
||||||
m_module.sendRegionInfoPacketToAll();
|
m_module.sendRegionHandshakeToAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,6 +550,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public event ScriptControlEvent OnScriptControlEvent;
|
public event ScriptControlEvent OnScriptControlEvent;
|
||||||
|
|
||||||
|
public delegate void ScriptMovingStartEvent(uint localID);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TODO: Should be triggered when a physics object starts moving.
|
||||||
|
/// </summary>
|
||||||
|
public event ScriptMovingStartEvent OnScriptMovingStartEvent;
|
||||||
|
|
||||||
|
public delegate void ScriptMovingEndEvent(uint localID);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TODO: Should be triggered when a physics object stops moving.
|
||||||
|
/// </summary>
|
||||||
|
public event ScriptMovingEndEvent OnScriptMovingEndEvent;
|
||||||
|
|
||||||
public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
|
public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -2238,6 +2252,48 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TriggerMovingStartEvent(uint localID)
|
||||||
|
{
|
||||||
|
ScriptMovingStartEvent handlerScriptMovingStartEvent = OnScriptMovingStartEvent;
|
||||||
|
if (handlerScriptMovingStartEvent != null)
|
||||||
|
{
|
||||||
|
foreach (ScriptMovingStartEvent d in handlerScriptMovingStartEvent.GetInvocationList())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
d(localID);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[EVENT MANAGER]: Delegate for TriggerMovingStartEvent failed - continuing. {0} {1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TriggerMovingEndEvent(uint localID)
|
||||||
|
{
|
||||||
|
ScriptMovingEndEvent handlerScriptMovingEndEvent = OnScriptMovingEndEvent;
|
||||||
|
if (handlerScriptMovingEndEvent != null)
|
||||||
|
{
|
||||||
|
foreach (ScriptMovingEndEvent d in handlerScriptMovingEndEvent.GetInvocationList())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
d(localID);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[EVENT MANAGER]: Delegate for TriggerMovingEndEvent failed - continuing. {0} {1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void TriggerRequestChangeWaterHeight(float height)
|
public void TriggerRequestChangeWaterHeight(float height)
|
||||||
{
|
{
|
||||||
if (height < 0)
|
if (height < 0)
|
||||||
|
|
|
@ -1907,11 +1907,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
part.Shape.FlexiForceX = (float)Force.x;
|
part.Shape.FlexiForceX = (float)Force.x;
|
||||||
part.Shape.FlexiForceY = (float)Force.y;
|
part.Shape.FlexiForceY = (float)Force.y;
|
||||||
part.Shape.FlexiForceZ = (float)Force.z;
|
part.Shape.FlexiForceZ = (float)Force.z;
|
||||||
part.Shape.PathCurve = 0x80;
|
part.Shape.PathCurve = (byte)Extrusion.Flexible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Other values not set, they do not seem to be sent to the viewer
|
||||||
|
// Setting PathCurve appears to be what actually toggles the check box and turns Flexi on and off
|
||||||
|
part.Shape.PathCurve = (byte)Extrusion.Straight;
|
||||||
|
part.Shape.FlexiEntry = false;
|
||||||
|
}
|
||||||
part.ParentGroup.HasGroupChanged = true;
|
part.ParentGroup.HasGroupChanged = true;
|
||||||
part.ScheduleFullUpdate();
|
part.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set a light point on a part
|
/// Set a light point on a part
|
||||||
|
|
|
@ -62,6 +62,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target;
|
myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target;
|
||||||
myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target;
|
myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target;
|
||||||
myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target;
|
myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target;
|
||||||
|
myScriptEngine.World.EventManager.OnScriptMovingStartEvent += moving_start;
|
||||||
|
myScriptEngine.World.EventManager.OnScriptMovingEndEvent += moving_end;
|
||||||
myScriptEngine.World.EventManager.OnScriptControlEvent += control;
|
myScriptEngine.World.EventManager.OnScriptControlEvent += control;
|
||||||
myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
|
myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
|
||||||
myScriptEngine.World.EventManager.OnScriptColliding += collision;
|
myScriptEngine.World.EventManager.OnScriptColliding += collision;
|
||||||
|
@ -419,14 +421,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
// dataserver: not handled here
|
// dataserver: not handled here
|
||||||
// link_message: not handled here
|
// link_message: not handled here
|
||||||
|
|
||||||
public void moving_start(uint localID, UUID itemID)
|
public void moving_start(uint localID)
|
||||||
{
|
{
|
||||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||||
"moving_start",new object[0],
|
"moving_start",new object[0],
|
||||||
new DetectParams[0]));
|
new DetectParams[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moving_end(uint localID, UUID itemID)
|
public void moving_end(uint localID)
|
||||||
{
|
{
|
||||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||||
"moving_end",new object[0],
|
"moving_end",new object[0],
|
||||||
|
|
Loading…
Reference in New Issue