diff options
author | SignpostMarv | 2012-07-14 01:41:51 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-14 01:45:34 +0100 |
commit | 84b7ae25738c15737e70a680d1992cfbeb6cc806 (patch) | |
tree | 9697890aadb7ef56d3bf36ae1d9d436a504411ad /OpenSim/Region | |
parent | acting on feedback from justincc (diff) | |
download | opensim-SC-84b7ae25738c15737e70a680d1992cfbeb6cc806.zip opensim-SC-84b7ae25738c15737e70a680d1992cfbeb6cc806.tar.gz opensim-SC-84b7ae25738c15737e70a680d1992cfbeb6cc806.tar.bz2 opensim-SC-84b7ae25738c15737e70a680d1992cfbeb6cc806.tar.xz |
acting on feedback from justincc
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cfcbae3..f88338d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -421,7 +421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
421 | return LSL_Vector.Norm(v); | 421 | return LSL_Vector.Norm(v); |
422 | } | 422 | } |
423 | 423 | ||
424 | private double vecDist(LSL_Vector a, LSL_Vector b) | 424 | private double VecDist(LSL_Vector a, LSL_Vector b) |
425 | { | 425 | { |
426 | double dx = a.x - b.x; | 426 | double dx = a.x - b.x; |
427 | double dy = a.y - b.y; | 427 | double dy = a.y - b.y; |
@@ -432,7 +432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
432 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) | 432 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) |
433 | { | 433 | { |
434 | m_host.AddScriptLPS(1); | 434 | m_host.AddScriptLPS(1); |
435 | return vecDist(a, b); | 435 | return VecDist(a, b); |
436 | } | 436 | } |
437 | 437 | ||
438 | //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke | 438 | //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke |
@@ -1247,7 +1247,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1247 | } | 1247 | } |
1248 | } | 1248 | } |
1249 | 1249 | ||
1250 | private bool isPhysical(){ | 1250 | private bool IsPhysical() |
1251 | { | ||
1251 | return ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics); | 1252 | return ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics); |
1252 | } | 1253 | } |
1253 | 1254 | ||
@@ -1258,7 +1259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1258 | switch (status) | 1259 | switch (status) |
1259 | { | 1260 | { |
1260 | case ScriptBaseClass.STATUS_PHYSICS: | 1261 | case ScriptBaseClass.STATUS_PHYSICS: |
1261 | return isPhysical() ? 1 : 0; | 1262 | return IsPhysical() ? 1 : 0; |
1262 | 1263 | ||
1263 | case ScriptBaseClass.STATUS_PHANTOM: | 1264 | case ScriptBaseClass.STATUS_PHANTOM: |
1264 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom) | 1265 | if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom) |
@@ -1949,7 +1950,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1949 | } | 1950 | } |
1950 | // END WORK AROUND | 1951 | // END WORK AROUND |
1951 | else if ( // this is not part of the workaround if-block because it's not related to the workaround. | 1952 | else if ( // this is not part of the workaround if-block because it's not related to the workaround. |
1952 | isPhysical() || | 1953 | IsPhysical() || |
1953 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment | 1954 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment |
1954 | ( | 1955 | ( |
1955 | pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. | 1956 | pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. |
@@ -1981,7 +1982,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1981 | 1982 | ||
1982 | SetPos(m_host.ParentGroup.RootPart, pos, false); | 1983 | SetPos(m_host.ParentGroup.RootPart, pos, false); |
1983 | 1984 | ||
1984 | return vecDist(pos, llGetRootPosition()) <= 0.1 ? 1 : 0; | 1985 | return VecDist(pos, llGetRootPosition()) <= 0.1 ? 1 : 0; |
1985 | } | 1986 | } |
1986 | 1987 | ||
1987 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) | 1988 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) |