diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 24 |
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. |