aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-12-18 14:59:41 -0800
committerRobert Adams2012-12-18 19:25:40 -0800
commitd15bfcf61404914c3d64c965db9e66295655bea5 (patch)
treebe0ffafac781c1952cc1bf7cbaf35179ffce988a /OpenSim
parentDisable UDPPacketBuffer pooling for now to resolve an issue on Windows of int... (diff)
downloadopensim-SC_OLD-d15bfcf61404914c3d64c965db9e66295655bea5.zip
opensim-SC_OLD-d15bfcf61404914c3d64c965db9e66295655bea5.tar.gz
opensim-SC_OLD-d15bfcf61404914c3d64c965db9e66295655bea5.tar.bz2
opensim-SC_OLD-d15bfcf61404914c3d64c965db9e66295655bea5.tar.xz
Replace axis rotation numeric constants (STATUS_ROTATE_XYZ) with symbols. Also made it so llSetStatus() can individually enable disable rotation axi using the bitmask of flags.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
3 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 64a5811..35e7c45 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -99,6 +99,15 @@ namespace OpenSim.Region.Framework.Scenes
99 /// </summary> 99 /// </summary>
100 public partial class SceneObjectGroup : EntityBase, ISceneObject 100 public partial class SceneObjectGroup : EntityBase, ISceneObject
101 { 101 {
102 // Axis selection bitmask used by SetAxisRotation()
103 // Just happen to be the same bits used by llSetStatus() and defined in ScriptBaseClass.
104 public enum axisSelect : int
105 {
106 STATUS_ROTATE_X = 0x002,
107 STATUS_ROTATE_Y = 0x004,
108 STATUS_ROTATE_Z = 0x008,
109 }
110
102 // private PrimCountTaintedDelegate handlerPrimCountTainted = null; 111 // private PrimCountTaintedDelegate handlerPrimCountTainted = null;
103 112
104 /// <summary> 113 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index af7fae3..7a97e5f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1918,11 +1918,11 @@ namespace OpenSim.Region.Framework.Scenes
1918 public int GetAxisRotation(int axis) 1918 public int GetAxisRotation(int axis)
1919 { 1919 {
1920 //Cannot use ScriptBaseClass constants as no referance to it currently. 1920 //Cannot use ScriptBaseClass constants as no referance to it currently.
1921 if (axis == 2)//STATUS_ROTATE_X 1921 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X)
1922 return STATUS_ROTATE_X; 1922 return STATUS_ROTATE_X;
1923 if (axis == 4)//STATUS_ROTATE_Y 1923 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y)
1924 return STATUS_ROTATE_Y; 1924 return STATUS_ROTATE_Y;
1925 if (axis == 8)//STATUS_ROTATE_Z 1925 if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z)
1926 return STATUS_ROTATE_Z; 1926 return STATUS_ROTATE_Z;
1927 1927
1928 return 0; 1928 return 0;
@@ -2671,13 +2671,13 @@ namespace OpenSim.Region.Framework.Scenes
2671 ParentGroup.SetAxisRotation(axis, rotate); 2671 ParentGroup.SetAxisRotation(axis, rotate);
2672 2672
2673 //Cannot use ScriptBaseClass constants as no referance to it currently. 2673 //Cannot use ScriptBaseClass constants as no referance to it currently.
2674 if (axis == 2)//STATUS_ROTATE_X 2674 if ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) != 0)
2675 STATUS_ROTATE_X = rotate; 2675 STATUS_ROTATE_X = rotate;
2676 2676
2677 if (axis == 4)//STATUS_ROTATE_Y 2677 if ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) != 0)
2678 STATUS_ROTATE_Y = rotate; 2678 STATUS_ROTATE_Y = rotate;
2679 2679
2680 if (axis == 8)//STATUS_ROTATE_Z 2680 if ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) != 0)
2681 STATUS_ROTATE_Z = rotate; 2681 STATUS_ROTATE_Z = rotate;
2682 } 2682 }
2683 2683
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 4108588..837779d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1334,19 +1334,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1334 return 0; 1334 return 0;
1335 1335
1336 case ScriptBaseClass.STATUS_ROTATE_X: 1336 case ScriptBaseClass.STATUS_ROTATE_X:
1337 if (m_host.GetAxisRotation(2) == 2) 1337 // if (m_host.GetAxisRotation(2) != 0)
1338 if (m_host.GetAxisRotation((int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) != 0)
1338 return 1; 1339 return 1;
1339 else 1340 else
1340 return 0; 1341 return 0;
1341 1342
1342 case ScriptBaseClass.STATUS_ROTATE_Y: 1343 case ScriptBaseClass.STATUS_ROTATE_Y:
1343 if (m_host.GetAxisRotation(4) == 4) 1344 if (m_host.GetAxisRotation((int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) != 0)
1344 return 1; 1345 return 1;
1345 else 1346 else
1346 return 0; 1347 return 0;
1347 1348
1348 case ScriptBaseClass.STATUS_ROTATE_Z: 1349 case ScriptBaseClass.STATUS_ROTATE_Z:
1349 if (m_host.GetAxisRotation(8) == 8) 1350 if (m_host.GetAxisRotation((int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) != 0)
1350 return 1; 1351 return 1;
1351 else 1352 else
1352 return 0; 1353 return 0;