aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2012-06-13 01:51:22 +0100
committerUbitUmarov2012-06-13 01:51:22 +0100
commit4027c8e9c9999f1b2fbb9ee921aa02525d569318 (patch)
treea3c6f8095d595b9f351f6f80f6d48f3acb63b660 /OpenSim/Region
parent*TEST this will affect inworld sittargets by +-0.1m, so may be very BAD *. Ch... (diff)
downloadopensim-SC-4027c8e9c9999f1b2fbb9ee921aa02525d569318.zip
opensim-SC-4027c8e9c9999f1b2fbb9ee921aa02525d569318.tar.gz
opensim-SC-4027c8e9c9999f1b2fbb9ee921aa02525d569318.tar.bz2
opensim-SC-4027c8e9c9999f1b2fbb9ee921aa02525d569318.tar.xz
Fixed llGetObjectDetails(), OBJECT_ROT for sitting avatars case, plus 'cosmetics' and added some parts costs information.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
1 files changed, 23 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 891d4d6..9772c5a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11800,6 +11800,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11800 11800
11801 LSL_List ret = new LSL_List(); 11801 LSL_List ret = new LSL_List();
11802 UUID key = new UUID(); 11802 UUID key = new UUID();
11803
11804
11803 if (UUID.TryParse(id, out key)) 11805 if (UUID.TryParse(id, out key))
11804 { 11806 {
11805 ScenePresence av = World.GetScenePresence(key); 11807 ScenePresence av = World.GetScenePresence(key);
@@ -11817,13 +11819,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11817 ret.Add(new LSL_String("")); 11819 ret.Add(new LSL_String(""));
11818 break; 11820 break;
11819 case ScriptBaseClass.OBJECT_POS: 11821 case ScriptBaseClass.OBJECT_POS:
11820 ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 11822 Vector3 avpos = av.AbsolutePosition;
11823 ret.Add(new LSL_Vector((double)avpos.X, (double)avpos.Y, (double)avpos.Z));
11821 break; 11824 break;
11822 case ScriptBaseClass.OBJECT_ROT: 11825 case ScriptBaseClass.OBJECT_ROT:
11823 ret.Add(new LSL_Rotation((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W)); 11826 Quaternion avrot = av.Rotation;
11827 if(av.ParentID != 0 && av.ParentPart != null)
11828 {
11829 avrot = av.ParentPart.GetWorldRotation() * avrot;
11830 }
11831 ret.Add(new LSL_Rotation((double)avrot.X, (double)avrot.Y, (double)avrot.Z, (double)avrot.W));
11824 break; 11832 break;
11825 case ScriptBaseClass.OBJECT_VELOCITY: 11833 case ScriptBaseClass.OBJECT_VELOCITY:
11826 ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); 11834 Vector3 avvel = av.Velocity;
11835 ret.Add(new LSL_Vector((double)avvel.X, (double)avvel.Y, (double)avvel.Z));
11827 break; 11836 break;
11828 case ScriptBaseClass.OBJECT_OWNER: 11837 case ScriptBaseClass.OBJECT_OWNER:
11829 ret.Add(new LSL_String(id)); 11838 ret.Add(new LSL_String(id));
@@ -11879,17 +11888,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11879 case ScriptBaseClass.OBJECT_NAME: 11888 case ScriptBaseClass.OBJECT_NAME:
11880 ret.Add(new LSL_String(obj.Name)); 11889 ret.Add(new LSL_String(obj.Name));
11881 break; 11890 break;
11882 case ScriptBaseClass.OBJECT_DESC: 11891 case ScriptBaseClass.OBJECT_DESC:
11883 ret.Add(new LSL_String(obj.Description)); 11892 ret.Add(new LSL_String(obj.Description));
11884 break; 11893 break;
11885 case ScriptBaseClass.OBJECT_POS: 11894 case ScriptBaseClass.OBJECT_POS:
11886 ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); 11895 Vector3 opos = obj.AbsolutePosition;
11896 ret.Add(new LSL_Vector(opos.X, opos.Y, opos.Z));
11887 break; 11897 break;
11888 case ScriptBaseClass.OBJECT_ROT: 11898 case ScriptBaseClass.OBJECT_ROT:
11889 ret.Add(new LSL_Rotation(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 11899 Quaternion orot = obj.RotationOffset;
11900 ret.Add(new LSL_Rotation(orot.X, orot.Y, orot.Z, orot.W));
11890 break; 11901 break;
11891 case ScriptBaseClass.OBJECT_VELOCITY: 11902 case ScriptBaseClass.OBJECT_VELOCITY:
11892 ret.Add(new LSL_Vector(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z)); 11903 Vector3 ovel = obj.Velocity;
11904 ret.Add(new LSL_Vector(ovel.X, ovel.Y, ovel.Z));
11893 break; 11905 break;
11894 case ScriptBaseClass.OBJECT_OWNER: 11906 case ScriptBaseClass.OBJECT_OWNER:
11895 ret.Add(new LSL_String(obj.OwnerID.ToString())); 11907 ret.Add(new LSL_String(obj.OwnerID.ToString()));
@@ -11927,17 +11939,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11927 // The value returned in SL for normal prims is prim count 11939 // The value returned in SL for normal prims is prim count
11928 ret.Add(new LSL_Integer(0)); 11940 ret.Add(new LSL_Integer(0));
11929 break; 11941 break;
11942
11943 // costs below may need to be diferent for root parts, need to check
11930 case ScriptBaseClass.OBJECT_SERVER_COST: 11944 case ScriptBaseClass.OBJECT_SERVER_COST:
11931 // The value returned in SL for normal prims is prim count 11945 // The value returned in SL for normal prims is prim count
11932 ret.Add(new LSL_Float(0)); 11946 ret.Add(new LSL_Float(0));
11933 break; 11947 break;
11934 case ScriptBaseClass.OBJECT_STREAMING_COST: 11948 case ScriptBaseClass.OBJECT_STREAMING_COST:
11935 // The value returned in SL for normal prims is prim count * 0.06 11949 // The value returned in SL for normal prims is prim count * 0.06
11936 ret.Add(new LSL_Float(0)); 11950 ret.Add(new LSL_Float(obj.StreamingCost));
11937 break; 11951 break;
11938 case ScriptBaseClass.OBJECT_PHYSICS_COST: 11952 case ScriptBaseClass.OBJECT_PHYSICS_COST:
11939 // The value returned in SL for normal prims is prim count 11953 // The value returned in SL for normal prims is prim count
11940 ret.Add(new LSL_Float(0)); 11954 ret.Add(new LSL_Float(obj.PhysicsCost));
11941 break; 11955 break;
11942 default: 11956 default:
11943 // Invalid or unhandled constant. 11957 // Invalid or unhandled constant.