aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs80
1 files changed, 80 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 85017373..d1b87db 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4532,6 +4532,86 @@ namespace OpenSim.Region.ScriptEngine.Common
4532 return src; 4532 return src;
4533 } 4533 }
4534 4534
4535 public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args)
4536 {
4537 LSL_Types.list ret = new LSL_Types.list();
4538 LLUUID key = new LLUUID();
4539 if (LLUUID.TryParse(id, out key))
4540 {
4541 if (World.m_innerScene.ScenePresences.ContainsKey(key))
4542 {
4543 ScenePresence av = World.m_innerScene.ScenePresences[key];
4544 foreach(object o in args.Data)
4545 {
4546 switch(o.ToString())
4547 {
4548 case "1":
4549 ret.Add(av.Firstname + " " + av.Lastname);
4550 break;
4551 case "2":
4552 ret.Add("");
4553 break;
4554 case "3":
4555 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
4556 break;
4557 case "4":
4558 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w));
4559 break;
4560 case "5":
4561 ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z));
4562 break;
4563 case "6":
4564 ret.Add(id);
4565 break;
4566 case "7":
4567 ret.Add(LLUUID.Zero.ToString());
4568 break;
4569 case "8":
4570 ret.Add(LLUUID.Zero.ToString());
4571 break;
4572 }
4573 }
4574 return ret;
4575 }
4576 SceneObjectPart obj = World.GetSceneObjectPart(key);
4577 if (obj != null)
4578 {
4579 foreach(object o in args.Data)
4580 {
4581 switch(o.ToString())
4582 {
4583 case "1":
4584 ret.Add(obj.Name);
4585 break;
4586 case "2":
4587 ret.Add(obj.Description);
4588 break;
4589 case "3":
4590 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z));
4591 break;
4592 case "4":
4593 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
4594 break;
4595 case "5":
4596 ret.Add(new LSL_Types.Vector3(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z));
4597 break;
4598 case "6":
4599 ret.Add(obj.OwnerID.ToString());
4600 break;
4601 case "7":
4602 ret.Add(obj.GroupID.ToString());
4603 break;
4604 case "8":
4605 ret.Add(obj.CreatorID.ToString());
4606 break;
4607 }
4608 }
4609 return ret;
4610 }
4611 }
4612 return new LSL_Types.list();
4613 }
4614
4535 // 4615 //
4536 // OpenSim functions 4616 // OpenSim functions
4537 // 4617 //