diff options
author | Melanie | 2012-08-18 13:57:50 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:57:50 +0100 |
commit | 5d43e27de29c104c3026b3c64ac3cc684f6353f2 (patch) | |
tree | 25b2e737c25fd168eb28e9b8e082f993844329c3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | refactoring for Vector3 operator & constructor tweaks (diff) | |
download | opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.zip opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.gz opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.bz2 opensim-SC_OLD-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-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 2f02f1f..321d1d8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -782,10 +782,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
782 | 782 | ||
783 | // We will launch the teleport on a new thread so that when the script threads are terminated | 783 | // We will launch the teleport on a new thread so that when the script threads are terminated |
784 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 784 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
785 | Util.FireAndForget( | 785 | Util.FireAndForget(o => World.RequestTeleportLocation( |
786 | o => World.RequestTeleportLocation(presence.ControllingClient, regionName, | 786 | presence.ControllingClient, regionName, position, |
787 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 787 | lookat, (uint)TPFlags.ViaLocation)); |
788 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
789 | 788 | ||
790 | ScriptSleep(5000); | 789 | ScriptSleep(5000); |
791 | 790 | ||
@@ -828,10 +827,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
828 | 827 | ||
829 | // We will launch the teleport on a new thread so that when the script threads are terminated | 828 | // We will launch the teleport on a new thread so that when the script threads are terminated |
830 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. | 829 | // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. |
831 | Util.FireAndForget( | 830 | Util.FireAndForget(o => World.RequestTeleportLocation( |
832 | o => World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | 831 | presence.ControllingClient, regionHandle, |
833 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 832 | position, lookat, (uint)TPFlags.ViaLocation)); |
834 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation)); | ||
835 | 833 | ||
836 | ScriptSleep(5000); | 834 | ScriptSleep(5000); |
837 | 835 | ||
@@ -2355,7 +2353,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2355 | ownerID = m_host.OwnerID; | 2353 | ownerID = m_host.OwnerID; |
2356 | UUID x = module.CreateNPC(firstname, | 2354 | UUID x = module.CreateNPC(firstname, |
2357 | lastname, | 2355 | lastname, |
2358 | new Vector3((float) position.x, (float) position.y, (float) position.z), | 2356 | position, |
2359 | ownerID, | 2357 | ownerID, |
2360 | senseAsAgent, | 2358 | senseAsAgent, |
2361 | World, | 2359 | World, |
@@ -2478,7 +2476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2478 | return new LSL_Vector(0, 0, 0); | 2476 | return new LSL_Vector(0, 0, 0); |
2479 | } | 2477 | } |
2480 | 2478 | ||
2481 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector position) | 2479 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) |
2482 | { | 2480 | { |
2483 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); | 2481 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); |
2484 | m_host.AddScriptLPS(1); | 2482 | m_host.AddScriptLPS(1); |
@@ -2493,7 +2491,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2493 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2491 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2494 | return; | 2492 | return; |
2495 | 2493 | ||
2496 | Vector3 pos = new Vector3((float) position.x, (float) position.y, (float) position.z); | ||
2497 | module.MoveToTarget(npcId, World, pos, false, true, false); | 2494 | module.MoveToTarget(npcId, World, pos, false, true, false); |
2498 | } | 2495 | } |
2499 | } | 2496 | } |
@@ -2513,11 +2510,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2513 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) | 2510 | if (!module.CheckPermissions(npcId, m_host.OwnerID)) |
2514 | return; | 2511 | return; |
2515 | 2512 | ||
2516 | Vector3 pos = new Vector3((float)target.x, (float)target.y, (float)target.z); | ||
2517 | module.MoveToTarget( | 2513 | module.MoveToTarget( |
2518 | new UUID(npc.m_string), | 2514 | new UUID(npc.m_string), |
2519 | World, | 2515 | World, |
2520 | pos, | 2516 | target, |
2521 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, | 2517 | (options & ScriptBaseClass.OS_NPC_NO_FLY) != 0, |
2522 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0, | 2518 | (options & ScriptBaseClass.OS_NPC_LAND_AT_TARGET) != 0, |
2523 | (options & ScriptBaseClass.OS_NPC_RUNNING) != 0); | 2519 | (options & ScriptBaseClass.OS_NPC_RUNNING) != 0); |