diff options
author | UbitUmarov | 2015-10-20 15:37:43 +0100 |
---|---|---|
committer | UbitUmarov | 2015-10-20 15:37:43 +0100 |
commit | dfd60d6f71514f03386a0b97988a63e88001a86a (patch) | |
tree | 1a6b2dc2a2c0ad74bd4db09fa085a0d038d675d7 /OpenSim/Region/Framework/Scenes | |
parent | update ODE windows DLL libraries to a modified version 0.13.1 r1902. Linux wi... (diff) | |
download | opensim-SC-dfd60d6f71514f03386a0b97988a63e88001a86a.zip opensim-SC-dfd60d6f71514f03386a0b97988a63e88001a86a.tar.gz opensim-SC-dfd60d6f71514f03386a0b97988a63e88001a86a.tar.bz2 opensim-SC-dfd60d6f71514f03386a0b97988a63e88001a86a.tar.xz |
STATUS_ROTATE are linkset flags and not prim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 29 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 9 |
2 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a4a33a4..48fce3d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -4363,17 +4363,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4363 | 4363 | ||
4364 | internal void SetAxisRotation(int axis, int rotate10) | 4364 | internal void SetAxisRotation(int axis, int rotate10) |
4365 | { | 4365 | { |
4366 | bool setX = false; | 4366 | bool setX = ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) != 0); |
4367 | bool setY = false; | 4367 | bool setY = ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) != 0); |
4368 | bool setZ = false; | 4368 | bool setZ = ((axis & (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) != 0); |
4369 | |||
4370 | int xaxis = 2; | ||
4371 | int yaxis = 4; | ||
4372 | int zaxis = 8; | ||
4373 | |||
4374 | setX = ((axis & xaxis) != 0) ? true : false; | ||
4375 | setY = ((axis & yaxis) != 0) ? true : false; | ||
4376 | setZ = ((axis & zaxis) != 0) ? true : false; | ||
4377 | 4369 | ||
4378 | float setval = (rotate10 > 0) ? 1f : 0f; | 4370 | float setval = (rotate10 > 0) ? 1f : 0f; |
4379 | 4371 | ||
@@ -4388,6 +4380,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
4388 | RootPart.SetPhysicsAxisRotation(); | 4380 | RootPart.SetPhysicsAxisRotation(); |
4389 | } | 4381 | } |
4390 | 4382 | ||
4383 | public int GetAxisRotation(int axis) | ||
4384 | { | ||
4385 | Vector3 rotAxis = RootPart.RotationAxis; | ||
4386 | |||
4387 | // if multiple return the one with higher id | ||
4388 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) | ||
4389 | return (int)rotAxis.Z; | ||
4390 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) | ||
4391 | return (int)rotAxis.Y; | ||
4392 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) | ||
4393 | return (int)rotAxis.X; | ||
4394 | |||
4395 | return 0; | ||
4396 | } | ||
4397 | |||
4391 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) | 4398 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) |
4392 | { | 4399 | { |
4393 | scriptRotTarget waypoint = new scriptRotTarget(); | 4400 | scriptRotTarget waypoint = new scriptRotTarget(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 43d522a..0ea4ab8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2516,13 +2516,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2516 | 2516 | ||
2517 | public int GetAxisRotation(int axis) | 2517 | public int GetAxisRotation(int axis) |
2518 | { | 2518 | { |
2519 | //Cannot use ScriptBaseClass constants as no referance to it currently. | 2519 | if (!ParentGroup.IsDeleted) |
2520 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_X) | 2520 | return ParentGroup.GetAxisRotation(axis); |
2521 | return STATUS_ROTATE_X; | ||
2522 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Y) | ||
2523 | return STATUS_ROTATE_Y; | ||
2524 | if (axis == (int)SceneObjectGroup.axisSelect.STATUS_ROTATE_Z) | ||
2525 | return STATUS_ROTATE_Z; | ||
2526 | 2521 | ||
2527 | return 0; | 2522 | return 0; |
2528 | } | 2523 | } |