diff options
author | Teravus Ovares | 2008-04-25 01:00:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-25 01:00:55 +0000 |
commit | 9468917b5f6ba6556bd9605e88227ea79e43d94e (patch) | |
tree | 7e175b228a221dfcf2f16a2d86a5f3f50f0b2a1e /OpenSim/Region/ScriptEngine/Common | |
parent | * Tuned the llMove2Target PID controller to be more reasonable and not oversh... (diff) | |
download | opensim-SC_OLD-9468917b5f6ba6556bd9605e88227ea79e43d94e.zip opensim-SC_OLD-9468917b5f6ba6556bd9605e88227ea79e43d94e.tar.gz opensim-SC_OLD-9468917b5f6ba6556bd9605e88227ea79e43d94e.tar.bz2 opensim-SC_OLD-9468917b5f6ba6556bd9605e88227ea79e43d94e.tar.xz |
* Implements llTarget, llTargetRemove, at_target(), not_at_target()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
3 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 35f8ee0..79b13cf 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -1181,14 +1181,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1181 | public int llTarget(LSL_Types.Vector3 position, double range) | 1181 | public int llTarget(LSL_Types.Vector3 position, double range) |
1182 | { | 1182 | { |
1183 | m_host.AddScriptLPS(1); | 1183 | m_host.AddScriptLPS(1); |
1184 | NotImplemented("llTarget"); | 1184 | return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); |
1185 | return 0; | 1185 | |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | public void llTargetRemove(int number) | 1188 | public void llTargetRemove(int number) |
1189 | { | 1189 | { |
1190 | m_host.AddScriptLPS(1); | 1190 | m_host.AddScriptLPS(1); |
1191 | NotImplemented("llTargetRemove"); | 1191 | m_host.unregisterTargetWaypoint(number); |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | public int llRotTarget(LSL_Types.Quaternion rot, double error) | 1194 | public int llRotTarget(LSL_Types.Quaternion rot, double error) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index d3e9948..ce9f445 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -70,6 +70,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
70 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 70 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
71 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 71 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
72 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; | 72 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; |
73 | myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target; | ||
74 | myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; | ||
75 | |||
73 | // TODO: HOOK ALL EVENTS UP TO SERVER! | 76 | // TODO: HOOK ALL EVENTS UP TO SERVER! |
74 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); | 77 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); |
75 | if(money != null) | 78 | if(money != null) |
@@ -222,14 +225,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
222 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); | 225 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); |
223 | } | 226 | } |
224 | 227 | ||
225 | public void at_target(uint localID, LLUUID itemID) | 228 | public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos) |
226 | { | 229 | { |
227 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_target", EventQueueManager.llDetectNull); | 230 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { (int)handle, new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); |
228 | } | 231 | } |
229 | 232 | ||
230 | public void not_at_target(uint localID, LLUUID itemID) | 233 | public void not_at_target(uint localID) |
231 | { | 234 | { |
232 | myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_target", EventQueueManager.llDetectNull); | 235 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull); |
233 | } | 236 | } |
234 | 237 | ||
235 | public void at_rot_target(uint localID, LLUUID itemID) | 238 | public void at_rot_target(uint localID, LLUUID itemID) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index ea17e20..1c85646 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs | |||
@@ -57,8 +57,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
57 | void control(uint localID, LLUUID itemID); | 57 | void control(uint localID, LLUUID itemID); |
58 | void money(uint LocalID, LLUUID agentID, int amount); | 58 | void money(uint LocalID, LLUUID agentID, int amount); |
59 | void email(uint localID, LLUUID itemID); | 59 | void email(uint localID, LLUUID itemID); |
60 | void at_target(uint localID, LLUUID itemID); | 60 | void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos); |
61 | void not_at_target(uint localID, LLUUID itemID); | 61 | void not_at_target(uint localID); |
62 | void at_rot_target(uint localID, LLUUID itemID); | 62 | void at_rot_target(uint localID, LLUUID itemID); |
63 | void not_at_rot_target(uint localID, LLUUID itemID); | 63 | void not_at_rot_target(uint localID, LLUUID itemID); |
64 | void run_time_permissions(uint localID, LLUUID itemID); | 64 | void run_time_permissions(uint localID, LLUUID itemID); |