aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-14 23:12:58 +0000
committerJustin Clark-Casey (justincc)2013-03-14 23:12:58 +0000
commit56b333f301cc66cf6417c0e4853f1b930e54dbb0 (patch)
tree8d6d58f7af34255f7826aaeba52da086817bdab2 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentFix minor race conditions in OSSL_Api functions where a parcel could be misid... (diff)
downloadopensim-SC_OLD-56b333f301cc66cf6417c0e4853f1b930e54dbb0.zip
opensim-SC_OLD-56b333f301cc66cf6417c0e4853f1b930e54dbb0.tar.gz
opensim-SC_OLD-56b333f301cc66cf6417c0e4853f1b930e54dbb0.tar.bz2
opensim-SC_OLD-56b333f301cc66cf6417c0e4853f1b930e54dbb0.tar.xz
minor: Use more compact libomv primitive constructors in osNpcGetPos() and osNpcGetRot()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index dc03ee6..0ab2733 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2513,13 +2513,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2513 ScenePresence sp = World.GetScenePresence(npcId); 2513 ScenePresence sp = World.GetScenePresence(npcId);
2514 2514
2515 if (sp != null) 2515 if (sp != null)
2516 { 2516 return new LSL_Vector(sp.AbsolutePosition);
2517 Vector3 pos = sp.AbsolutePosition;
2518 return new LSL_Vector(pos.X, pos.Y, pos.Z);
2519 }
2520 } 2517 }
2521 2518
2522 return new LSL_Vector(0, 0, 0); 2519 return Vector3.Zero;
2523 } 2520 }
2524 2521
2525 public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) 2522 public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
@@ -2587,7 +2584,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2587 return new LSL_Rotation(sp.GetWorldRotation()); 2584 return new LSL_Rotation(sp.GetWorldRotation());
2588 } 2585 }
2589 2586
2590 return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W); 2587 return Quaternion.Identity;
2591 } 2588 }
2592 2589
2593 public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) 2590 public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation)