minor: Use more compact libomv primitive constructors in osNpcGetPos() and osNpcGetRot()

0.7.4-extended
Justin Clark-Casey (justincc) 2013-03-14 23:12:58 +00:00
parent 785abe070d
commit 60060e7be9
1 changed files with 3 additions and 6 deletions

View File

@ -2446,13 +2446,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScenePresence sp = World.GetScenePresence(npcId); ScenePresence sp = World.GetScenePresence(npcId);
if (sp != null) if (sp != null)
{ return new LSL_Vector(sp.AbsolutePosition);
Vector3 pos = sp.AbsolutePosition;
return new LSL_Vector(pos.X, pos.Y, pos.Z);
}
} }
return new LSL_Vector(0, 0, 0); return Vector3.Zero;
} }
public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
@ -2523,7 +2520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
} }
return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W); return Quaternion.Identity;
} }
public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation)