diff options
author | UbitUmarov | 2015-10-20 16:55:18 +0100 |
---|---|---|
committer | UbitUmarov | 2015-10-20 16:55:18 +0100 |
commit | 52860a7d154a17c5035702d9a390b219e1aaba03 (patch) | |
tree | 4104059a81608e20e6b409301af65e2e01fb3567 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | STATUS_ROTATE are linkset flags and not prim (diff) | |
download | opensim-SC-52860a7d154a17c5035702d9a390b219e1aaba03.zip opensim-SC-52860a7d154a17c5035702d9a390b219e1aaba03.tar.gz opensim-SC-52860a7d154a17c5035702d9a390b219e1aaba03.tar.bz2 opensim-SC-52860a7d154a17c5035702d9a390b219e1aaba03.tar.xz |
stop using a Vector3 to store 3bits
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0ea4ab8..6e7b568 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -254,11 +254,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
254 | public Quaternion AttachRotation = Quaternion.Identity; | 254 | public Quaternion AttachRotation = Quaternion.Identity; |
255 | 255 | ||
256 | [XmlIgnore] | 256 | [XmlIgnore] |
257 | public int STATUS_ROTATE_X; | 257 | public int STATUS_ROTATE_X; // this should not be used |
258 | 258 | ||
259 | public int STATUS_ROTATE_Y; | 259 | [XmlIgnore] |
260 | public int STATUS_ROTATE_Y; // this should not be used | ||
260 | 261 | ||
261 | public int STATUS_ROTATE_Z; | 262 | [XmlIgnore] |
263 | public int STATUS_ROTATE_Z; // this should not be used | ||
262 | 264 | ||
263 | private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); | 265 | private Dictionary<int, string> m_CollisionFilter = new Dictionary<int, string>(); |
264 | 266 | ||
@@ -278,7 +280,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
278 | 280 | ||
279 | public Vector3 AttachedPos; | 281 | public Vector3 AttachedPos; |
280 | 282 | ||
281 | public Vector3 RotationAxis = Vector3.One; | 283 | // rotation locks on local X,Y and or Z axis bit flags |
284 | // bits are as in llSetStatus defined in SceneObjectGroup.axisSelect enum | ||
285 | // but reversed logic: bit cleared means free to rotate | ||
286 | public byte RotationAxisLocks = 0; | ||
282 | 287 | ||
283 | public bool VolumeDetectActive; | 288 | public bool VolumeDetectActive; |
284 | 289 | ||
@@ -778,9 +783,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
778 | set { m_damage = value; } | 783 | set { m_damage = value; } |
779 | } | 784 | } |
780 | 785 | ||
781 | |||
782 | |||
783 | |||
784 | public void setGroupPosition(Vector3 pos) | 786 | public void setGroupPosition(Vector3 pos) |
785 | { | 787 | { |
786 | m_groupPosition = pos; | 788 | m_groupPosition = pos; |
@@ -791,7 +793,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
791 | /// </summary> | 793 | /// </summary> |
792 | /// | 794 | /// |
793 | 795 | ||
794 | |||
795 | public Vector3 GroupPosition | 796 | public Vector3 GroupPosition |
796 | { | 797 | { |
797 | get | 798 | get |
@@ -3860,7 +3861,16 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3860 | 3861 | ||
3861 | if (pa != null) | 3862 | if (pa != null) |
3862 | { | 3863 | { |
3863 | pa.LockAngularMotion(RotationAxis); | 3864 | // physics should also get a byte and not a Vector3 TODO |
3865 | Vector3 lrRotationAxis = Vector3.One; | ||
3866 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) != 0 ) | ||
3867 | lrRotationAxis.X = 0f; | ||
3868 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) != 0 ) | ||
3869 | lrRotationAxis.Y = 0f; | ||
3870 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) != 0 ) | ||
3871 | lrRotationAxis.Z = 0f; | ||
3872 | |||
3873 | pa.LockAngularMotion(lrRotationAxis); | ||
3864 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); | 3874 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); |
3865 | } | 3875 | } |
3866 | } | 3876 | } |