aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorRevolution2010-01-10 20:20:00 -0600
committerMelanie2010-01-11 02:00:40 +0000
commita0859754c03324be9a4a2b9c9f26928e64cb5a6f (patch)
treede452818c3a8bae329760d3012e07c467479845b /OpenSim/Region/ScriptEngine
parentClean CRs from previous patch (diff)
downloadopensim-SC_OLD-a0859754c03324be9a4a2b9c9f26928e64cb5a6f.zip
opensim-SC_OLD-a0859754c03324be9a4a2b9c9f26928e64cb5a6f.tar.gz
opensim-SC_OLD-a0859754c03324be9a4a2b9c9f26928e64cb5a6f.tar.bz2
opensim-SC_OLD-a0859754c03324be9a4a2b9c9f26928e64cb5a6f.tar.xz
Adds llRotTarget and the events at_rot_target and not_at_rot_target.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs22
3 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 39b597e..856f8b6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2108,15 +2108,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2108 2108
2109 public LSL_Integer llRotTarget(LSL_Rotation rot, double error) 2109 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
2110 { 2110 {
2111 m_host.AddScriptLPS(1); 2111 m_host.AddScriptLPS(1);
2112 NotImplemented("llRotTarget"); 2112 return m_host.registerRotTargetWaypoint(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error);
2113 return 0;
2114 } 2113 }
2115 2114
2116 public void llRotTargetRemove(int number) 2115 public void llRotTargetRemove(int number)
2117 { 2116 {
2118 m_host.AddScriptLPS(1); 2117 m_host.AddScriptLPS(1);
2119 NotImplemented("llRotTargetRemove"); 2118 m_host.unregisterRotTargetWaypoint(number);
2120 } 2119 }
2121 2120
2122 public void llMoveToTarget(LSL_Vector target, double tau) 2121 public void llMoveToTarget(LSL_Vector target, double tau)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
index 7f67599..fb86850 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
@@ -61,7 +61,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
61 land_collision = 2048, 61 land_collision = 2048,
62 land_collision_end = 4096, 62 land_collision_end = 4096,
63 land_collision_start = 8192, 63 land_collision_start = 8192,
64 at_target = 16384, 64 at_target = 16384,
65 at_rot_target = 16777216,
65 listen = 32768, 66 listen = 32768,
66 money = 65536, 67 money = 65536,
67 moving_end = 131072, 68 moving_end = 131072,
@@ -202,8 +203,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
202 return; 203 return;
203 } 204 }
204 205
205 m_eventFlagsMap.Add("attach", scriptEvents.attach); 206 m_eventFlagsMap.Add("attach", scriptEvents.attach);
206 // m_eventFlagsMap.Add("at_rot_target",(long)scriptEvents.at_rot_target); 207 m_eventFlagsMap.Add("at_rot_target", scriptEvents.at_rot_target);
207 m_eventFlagsMap.Add("at_target", scriptEvents.at_target); 208 m_eventFlagsMap.Add("at_target", scriptEvents.at_target);
208 // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed); 209 // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed);
209 m_eventFlagsMap.Add("collision", scriptEvents.collision); 210 m_eventFlagsMap.Add("collision", scriptEvents.collision);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index b2eab45..ce22ba5 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -58,7 +58,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
58 myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end; 58 myScriptEngine.World.EventManager.OnObjectDeGrab += touch_end;
59 myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; 59 myScriptEngine.World.EventManager.OnScriptChangedEvent += changed;
60 myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target; 60 myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target;
61 myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; 61 myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target;
62 myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target;
63 myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target;
62 myScriptEngine.World.EventManager.OnScriptControlEvent += control; 64 myScriptEngine.World.EventManager.OnScriptControlEvent += control;
63 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; 65 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
64 myScriptEngine.World.EventManager.OnScriptColliding += collision; 66 myScriptEngine.World.EventManager.OnScriptColliding += collision;
@@ -388,16 +390,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
388 myScriptEngine.PostObjectEvent(localID, new EventParams( 390 myScriptEngine.PostObjectEvent(localID, new EventParams(
389 "not_at_target",new object[0], 391 "not_at_target",new object[0],
390 new DetectParams[0])); 392 new DetectParams[0]));
391 } 393 }
392 394
393 public void at_rot_target(uint localID, UUID itemID) 395 public void at_rot_target(uint localID, uint handle, Quaternion targetrot,
394 { 396 Quaternion atrot)
395 myScriptEngine.PostObjectEvent(localID, new EventParams( 397 {
396 "at_rot_target",new object[0], 398 myScriptEngine.PostObjectEvent(localID, new EventParams(
399 "at_rot_target", new object[] {
400 new LSL_Types.LSLInteger(handle),
401 new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W),
402 new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) },
397 new DetectParams[0])); 403 new DetectParams[0]));
398 } 404 }
399 405
400 public void not_at_rot_target(uint localID, UUID itemID) 406 public void not_at_rot_target(uint localID)
401 { 407 {
402 myScriptEngine.PostObjectEvent(localID, new EventParams( 408 myScriptEngine.PostObjectEvent(localID, new EventParams(
403 "not_at_rot_target",new object[0], 409 "not_at_rot_target",new object[0],