diff options
author | UbitUmarov | 2015-10-20 19:00:26 +0100 |
---|---|---|
committer | UbitUmarov | 2015-10-20 19:00:26 +0100 |
commit | 0045398324debd035c6b3c362a82497852585807 (patch) | |
tree | 2fef86b777913a9cc0c1803cadb35b1e01663941 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | add axis locks to sop serializer. Now they are also saved to inventory (diff) | |
download | opensim-SC_OLD-0045398324debd035c6b3c362a82497852585807.zip opensim-SC_OLD-0045398324debd035c6b3c362a82497852585807.tar.gz opensim-SC_OLD-0045398324debd035c6b3c362a82497852585807.tar.bz2 opensim-SC_OLD-0045398324debd035c6b3c362a82497852585807.tar.xz |
move ugly convertion of axis locks 3 bit flags to a wasted vector3 down to PhysicsActor. Let engines use LockAngularMotion with either Vector3 argument or byte
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4d193ba..fed9eaf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3861,16 +3861,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
3861 | 3861 | ||
3862 | if (pa != null) | 3862 | if (pa != null) |
3863 | { | 3863 | { |
3864 | // physics should also get a byte and not a Vector3 TODO | 3864 | pa.LockAngularMotion(RotationAxisLocks); |
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); | ||
3874 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); | 3865 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); |
3875 | } | 3866 | } |
3876 | } | 3867 | } |
@@ -4882,16 +4873,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
4882 | 4873 | ||
4883 | if(LocalId == ParentGroup.RootPart.LocalId) | 4874 | if(LocalId == ParentGroup.RootPart.LocalId) |
4884 | { | 4875 | { |
4885 | // ugly code: physics should also get a byte and not a Vector3 TODO | 4876 | pa.LockAngularMotion(RotationAxisLocks); |
4886 | Vector3 lrRotationAxis = Vector3.One; | ||
4887 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) != 0 ) | ||
4888 | lrRotationAxis.X = 0f; | ||
4889 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) != 0 ) | ||
4890 | lrRotationAxis.Y = 0f; | ||
4891 | if((RotationAxisLocks & (byte)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) != 0 ) | ||
4892 | lrRotationAxis.Z = 0f; | ||
4893 | |||
4894 | pa.LockAngularMotion(lrRotationAxis); | ||
4895 | } | 4877 | } |
4896 | 4878 | ||
4897 | if (VolumeDetectActive) // change if not the default only | 4879 | if (VolumeDetectActive) // change if not the default only |