aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorubit2012-12-07 14:51:06 +0100
committerubit2012-12-07 14:51:06 +0100
commit155060548f3315e4497f89f4fa4cc8ec32f16864 (patch)
tree74e4893827cbb84d004f24abb2ce74226e1fd21a /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parent*TEST* add some avatar skeleton information and use it to calculate avatar (diff)
downloadopensim-SC-155060548f3315e4497f89f4fa4cc8ec32f16864.zip
opensim-SC-155060548f3315e4497f89f4fa4cc8ec32f16864.tar.gz
opensim-SC-155060548f3315e4497f89f4fa4cc8ec32f16864.tar.bz2
opensim-SC-155060548f3315e4497f89f4fa4cc8ec32f16864.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs29
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6b63d94..7593395 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3013,7 +3013,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3013 } 3013 }
3014 3014
3015 bool result = money.ObjectGiveMoney( 3015 bool result = money.ObjectGiveMoney(
3016 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, UUID.Zero); 3016 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount);
3017 3017
3018 if (result) 3018 if (result)
3019 return 1; 3019 return 1;
@@ -6384,7 +6384,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6384 } 6384 }
6385 else 6385 else
6386 { 6386 {
6387 agentSize = new LSL_Vector(0.45, 0.6, avatar.Appearance.AvatarHeight); 6387// agentSize = new LSL_Vector(0.45f, 0.6f, avatar.Appearance.AvatarHeight);
6388 Vector3 s = avatar.Appearance.AvatarSize;
6389 agentSize = new LSL_Vector(s.X, s.Y, s.Z);
6388 } 6390 }
6389 return agentSize; 6391 return agentSize;
6390 } 6392 }
@@ -8591,8 +8593,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8591 // and standing avatar since server 1.36 8593 // and standing avatar since server 1.36
8592 LSL_Vector lower; 8594 LSL_Vector lower;
8593 LSL_Vector upper; 8595 LSL_Vector upper;
8596
8597 Vector3 box = presence.Appearance.AvatarBoxSize * 0.5f;
8598
8594 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID 8599 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID
8595 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 8600 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
8601/*
8596 { 8602 {
8597 // This is for ground sitting avatars 8603 // This is for ground sitting avatars
8598 float height = presence.Appearance.AvatarHeight / 2.66666667f; 8604 float height = presence.Appearance.AvatarHeight / 2.66666667f;
@@ -8610,6 +8616,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8610 // Adjust to the documented error offsets (see LSL Wiki) 8616 // Adjust to the documented error offsets (see LSL Wiki)
8611 lower += new LSL_Vector(0.05f, 0.05f, 0.05f); 8617 lower += new LSL_Vector(0.05f, 0.05f, 0.05f);
8612 upper -= new LSL_Vector(0.05f, 0.05f, 0.05f); 8618 upper -= new LSL_Vector(0.05f, 0.05f, 0.05f);
8619*/
8620 {
8621 // This is for ground sitting avatars TODO!
8622 lower = new LSL_Vector(-box.X - 0.1125, -box.Y, box.Z * -1.0f);
8623 upper = new LSL_Vector(box.X + 0.1125, box.Y, box.Z * -1.0f);
8624 }
8625 else
8626 {
8627 // This is for standing/flying avatars
8628 lower = new LSL_Vector(-box.X, -box.Y, -box.Z);
8629 upper = new LSL_Vector(box.X, box.Y, box.Z);
8630 }
8613 8631
8614 if (lower.x > upper.x) 8632 if (lower.x > upper.x)
8615 lower.x = upper.x; 8633 lower.x = upper.x;
@@ -12529,7 +12547,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12529 } 12547 }
12530 12548
12531 bool result = money.ObjectGiveMoney( 12549 bool result = money.ObjectGiveMoney(
12532 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn); 12550 m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount);
12533 12551
12534 if (result) 12552 if (result)
12535 { 12553 {
@@ -12931,7 +12949,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12931 12949
12932 case (int)ScriptBaseClass.PRIM_SIZE: 12950 case (int)ScriptBaseClass.PRIM_SIZE:
12933 // as in llGetAgentSize above 12951 // as in llGetAgentSize above
12934 res.Add(new LSL_Vector(0.45f, 0.6f, avatar.Appearance.AvatarHeight)); 12952// res.Add(new LSL_Vector(0.45f, 0.6f, avatar.Appearance.AvatarHeight));
12953 Vector3 s = avatar.Appearance.AvatarSize;
12954 res.Add(new LSL_Vector(s.X, s.Y, s.Z));
12955
12935 break; 12956 break;
12936 12957
12937 case (int)ScriptBaseClass.PRIM_ROTATION: 12958 case (int)ScriptBaseClass.PRIM_ROTATION: