diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 2 |
2 files changed, 10 insertions, 6 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 | ||
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index f642699..410463c 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | |||
@@ -2267,8 +2267,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde | |||
2267 | 2267 | ||
2268 | IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); | 2268 | IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); |
2269 | 2269 | ||
2270 | GC.Collect(1); | ||
2271 | |||
2272 | TerrainHeightFieldHeightsHandler = GCHandle.Alloc(_heightmap, GCHandleType.Pinned); | 2270 | TerrainHeightFieldHeightsHandler = GCHandle.Alloc(_heightmap, GCHandleType.Pinned); |
2273 | 2271 | ||
2274 | d.GeomHeightfieldDataBuildSingle(HeightmapData, TerrainHeightFieldHeightsHandler.AddrOfPinnedObject(), 0, | 2272 | d.GeomHeightfieldDataBuildSingle(HeightmapData, TerrainHeightFieldHeightsHandler.AddrOfPinnedObject(), 0, |