aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2016-06-26 14:40:26 +0100
committerUbitUmarov2016-06-26 14:40:26 +0100
commitbc4e5d81b9d9943595891b04b3a1198cc7c7a345 (patch)
treea64592768fa5b2929d0ee2aed0b71130d8b926b3 /OpenSim
parentlet llPlaySound() in HUDs send sound to owner without parcel restriction (diff)
downloadopensim-SC-bc4e5d81b9d9943595891b04b3a1198cc7c7a345.zip
opensim-SC-bc4e5d81b9d9943595891b04b3a1198cc7c7a345.tar.gz
opensim-SC-bc4e5d81b9d9943595891b04b3a1198cc7c7a345.tar.bz2
opensim-SC-bc4e5d81b9d9943595891b04b3a1198cc7c7a345.tar.xz
add PRIM_OMEGA to llGet(LINK)PrimitiveParams. This will not return same values as spec, because the way our targetomega works. ( only did minor testing)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index fac361f..32b3bb7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11132,6 +11132,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11132 0 11132 0
11133 )); 11133 ));
11134 break; 11134 break;
11135
11136 case (int)ScriptBaseClass.PRIM_OMEGA:
11137 // this may return values diferent from SL since we don't handle set the same way
11138 float gain = 1.0f; // we don't use gain and don't store it
11139 Vector3 axis = part.AngularVelocity;
11140 float spin = axis.Length();
11141 if(spin < 1.0e-6)
11142 {
11143 axis = Vector3.Zero;
11144 gain = 0.0f;
11145 spin = 0.0f;
11146 }
11147 else
11148 {
11149 axis = axis * (1.0f/spin);
11150 }
11151
11152 res.Add(new LSL_Vector(axis.X,
11153 axis.Y,
11154 axis.Z));
11155 res.Add(new LSL_Float(spin));
11156 res.Add(new LSL_Float(gain));
11157 break;
11158
11135 case (int)ScriptBaseClass.PRIM_LINK_TARGET: 11159 case (int)ScriptBaseClass.PRIM_LINK_TARGET:
11136 11160
11137 // TODO: Should be issuing a runtime script warning in this case. 11161 // TODO: Should be issuing a runtime script warning in this case.