mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
those events are per script not per part
This commit is contained in:
@@ -3035,7 +3035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public LSL_Integer llTarget(LSL_Vector position, double range)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
return m_host.ParentGroup.registerTargetWaypoint(m_host.LocalId, position, (float)range);
|
||||
return m_host.ParentGroup.registerTargetWaypoint(m_item.ItemID, position, (float)range);
|
||||
}
|
||||
|
||||
public void llTargetRemove(int number)
|
||||
@@ -3047,7 +3047,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
return m_host.ParentGroup.registerRotTargetWaypoint(m_host.LocalId, rot, (float)error);
|
||||
return m_host.ParentGroup.registerRotTargetWaypoint(m_item.ItemID, rot, (float)error);
|
||||
}
|
||||
|
||||
public void llRotTargetRemove(int number)
|
||||
|
||||
@@ -380,10 +380,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
public void at_target(uint localID, uint handle, Vector3 targetpos,
|
||||
public void at_target(UUID itemID, uint handle, Vector3 targetpos,
|
||||
Vector3 atpos)
|
||||
{
|
||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||
myScriptEngine.PostScriptEvent(itemID, new EventParams(
|
||||
"at_target", new object[] {
|
||||
new LSL_Types.LSLInteger(handle),
|
||||
new LSL_Types.Vector3(targetpos),
|
||||
@@ -391,17 +391,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
public void not_at_target(uint localID)
|
||||
public void not_at_target(UUID itemID)
|
||||
{
|
||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||
myScriptEngine.PostScriptEvent(itemID, new EventParams(
|
||||
"not_at_target",new object[0],
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
public void at_rot_target(uint localID, uint handle, Quaternion targetrot,
|
||||
public void at_rot_target(UUID itemID, uint handle, Quaternion targetrot,
|
||||
Quaternion atrot)
|
||||
{
|
||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||
myScriptEngine.PostScriptEvent(itemID, new EventParams(
|
||||
"at_rot_target", new object[] {
|
||||
new LSL_Types.LSLInteger(handle),
|
||||
new LSL_Types.Quaternion(targetrot),
|
||||
@@ -409,9 +409,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
public void not_at_rot_target(uint localID)
|
||||
public void not_at_rot_target(UUID itemID)
|
||||
{
|
||||
myScriptEngine.PostObjectEvent(localID, new EventParams(
|
||||
myScriptEngine.PostScriptEvent(itemID, new EventParams(
|
||||
"not_at_rot_target",new object[0],
|
||||
new DetectParams[0]));
|
||||
}
|
||||
|
||||
@@ -309,10 +309,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
zeroDetectParams));
|
||||
}
|
||||
|
||||
public void at_target(uint localID, uint handle, Vector3 targetpos,
|
||||
Vector3 atpos)
|
||||
public void at_target(UUID scriptID, uint handle, Vector3 targetpos, Vector3 atpos)
|
||||
{
|
||||
this.PostObjectEvent(localID, new EventParams(
|
||||
PostScriptEvent(scriptID, new EventParams(
|
||||
"at_target", new object[] {
|
||||
(int)handle,
|
||||
new LSL_Vector(targetpos.X,targetpos.Y,targetpos.Z),
|
||||
@@ -320,32 +319,28 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
zeroDetectParams));
|
||||
}
|
||||
|
||||
public void not_at_target(uint localID)
|
||||
public void not_at_target(UUID scriptID)
|
||||
{
|
||||
this.PostObjectEvent(localID, new EventParams(
|
||||
PostScriptEvent(scriptID, new EventParams(
|
||||
"not_at_target", zeroObjectArray,
|
||||
zeroDetectParams));
|
||||
}
|
||||
|
||||
public void at_rot_target(uint localID, uint handle, OpenMetaverse.Quaternion targetrot, OpenMetaverse.Quaternion atrot)
|
||||
public void at_rot_target(UUID scriptID, uint handle, OpenMetaverse.Quaternion targetrot, OpenMetaverse.Quaternion atrot)
|
||||
{
|
||||
this.PostObjectEvent(
|
||||
localID,
|
||||
new EventParams(
|
||||
PostScriptEvent(scriptID, new EventParams(
|
||||
"at_rot_target",
|
||||
new object[] {
|
||||
new LSL_Integer(handle),
|
||||
new LSL_Rotation(targetrot.X, targetrot.Y, targetrot.Z, targetrot.W),
|
||||
new LSL_Rotation(atrot.X, atrot.Y, atrot.Z, atrot.W)
|
||||
},
|
||||
zeroDetectParams
|
||||
)
|
||||
);
|
||||
zeroDetectParams));
|
||||
}
|
||||
|
||||
public void not_at_rot_target(uint localID)
|
||||
public void not_at_rot_target(UUID scriptID)
|
||||
{
|
||||
this.PostObjectEvent(localID, new EventParams(
|
||||
PostScriptEvent(scriptID, new EventParams(
|
||||
"not_at_rot_target", zeroObjectArray,
|
||||
zeroDetectParams));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user