diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 859ee93..eff1598 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -773,10 +773,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
773 | 773 | ||
774 | // We will launch the teleport on a new thread so that when the script threads are terminated | 774 | // We will launch the teleport on a new thread so that when the script threads are terminated |
775 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 775 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
776 | Util.FireAndForget( | 776 | Util.FireAndForget(o => World.RequestTeleportLocation( |
777 | o => World.RequestTeleportLocation(presence.ControllingClient, regionName, | 777 | presence.ControllingClient, regionName, position, |
778 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 778 | lookat, (uint)TPFlags.ViaLocation)); |
779 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
780 | 779 | ||
781 | ScriptSleep(5000); | 780 | ScriptSleep(5000); |
782 | 781 | ||
@@ -819,10 +818,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
819 | 818 | ||
820 | // We will launch the teleport on a new thread so that when the script threads are terminated | 819 | // We will launch the teleport on a new thread so that when the script threads are terminated |
821 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 820 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
822 | Util.FireAndForget( | 821 | Util.FireAndForget(o => World.RequestTeleportLocation( |
823 | o => World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | 822 | presence.ControllingClient, regionHandle, |
824 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 823 | position, lookat, (uint)TPFlags.ViaLocation)); |
825 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
826 | 824 | ||
827 | ScriptSleep(5000); | 825 | ScriptSleep(5000); |
828 | 826 | ||
@@ -2329,7 +2327,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2329 | ownerID = m_host.OwnerID; | 2327 | ownerID = m_host.OwnerID; |
2330 | UUID x = module.CreateNPC(firstname, | 2328 | UUID x = module.CreateNPC(firstname, |
2331 | lastname, | 2329 | lastname, |
2332 | new Vector3((float) position.x, (float) position.y, (float) position.z), | 2330 | position, |
2333 | ownerID, | 2331 | ownerID, |
2334 | senseAsAgent, | 2332 | senseAsAgent, |
2335 | World, | 2333 | World, |
@@ -2446,7 +2444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2446 | return new LSL_Vector(0, 0, 0); | 2444 | return new LSL_Vector(0, 0, 0); |
2447 | } | 2445 | } |
2448 | 2446 | ||
2449 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector position) | 2447 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) |
2450 | { | 2448 | { |
2451 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); | 2449 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); |
2452 | m_host.AddScriptLPS(1); | 2450 | m_host.AddScriptLPS(1); |
@@ -2461,7 +2459,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2461 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2459 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2462 | return; | 2460 | return; |
2463 | 2461 | ||
2464 | Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z); | ||
2465 | module.MoveToTarget(npcId, World, pos, false, true, false); | 2462 | module.MoveToTarget(npcId, World, pos, false, true, false); |
2466 | } | 2463 | } |
2467 | } | 2464 | } |
@@ -2481,11 +2478,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2481 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2478 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2482 | return; | 2479 | return; |
2483 | 2480 | ||
2484 | Vector3 pos = new Vector3((float)target.x, (float)target.y, (float)target.z); | ||
2485 | module.MoveToTarget( | 2481 | module.MoveToTarget( |
2486 | new UUID(npc.m_string), | 2482 | new UUID(npc.m_string), |
2487 | World, | 2483 | World, |
2488 | pos, | 2484 | target, |
2489 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, | 2485 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, |
2490 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0, | 2486 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0, |
2491 | (options & ScriptBaseClass.OS_NPC_RUNNING) != 0); | 2487 | (options & ScriptBaseClass.OS_NPC_RUNNING) != 0); |