diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5082b9d..f906d9f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3674,12 +3674,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3674 | // vec, Rotation, thisAddSpeedModifier, Name); | 3674 | // vec, Rotation, thisAddSpeedModifier, Name); |
3675 | 3675 | ||
3676 | // rotate from avatar coord space to world | 3676 | // rotate from avatar coord space to world |
3677 | // for now all controls assume this is only a rotation around Z | 3677 | Quaternion rot = Rotation; |
3678 | // if not all checks below need to be done before this rotation | 3678 | if (!Flying && PresenceType != PresenceType.Npc) |
3679 | Vector3 direc = vec * Rotation; | 3679 | { |
3680 | // force rotation to be around Z only, if not flying | ||
3681 | // needed for mouselook | ||
3682 | rot.X = 0; | ||
3683 | rot.Y = 0; | ||
3684 | } | ||
3685 | |||
3686 | Vector3 direc = vec * rot; | ||
3680 | direc.Normalize(); | 3687 | direc.Normalize(); |
3681 | 3688 | ||
3682 | // mouse look situation ? | ||
3683 | if ((vec.Z == 0f) && !Flying) | 3689 | if ((vec.Z == 0f) && !Flying) |
3684 | direc.Z = 0f; // Prevent camera WASD up. | 3690 | direc.Z = 0f; // Prevent camera WASD up. |
3685 | 3691 | ||