diff options
author | Tom Grimshaw | 2010-05-19 13:49:34 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-05-19 13:49:34 -0700 |
commit | 6933b48a7e94511f1de969b28a61d834888fd2f5 (patch) | |
tree | 82fda16d046ad6d4bfa5c4b3a7aafb51baa621cc | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
download | opensim-SC_OLD-6933b48a7e94511f1de969b28a61d834888fd2f5.zip opensim-SC_OLD-6933b48a7e94511f1de969b28a61d834888fd2f5.tar.gz opensim-SC_OLD-6933b48a7e94511f1de969b28a61d834888fd2f5.tar.bz2 opensim-SC_OLD-6933b48a7e94511f1de969b28a61d834888fd2f5.tar.xz |
Fix a nullref issue in SitAltitudeCallback
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0b644b9..b6081de 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2368,12 +2368,15 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2368 | // else | 2368 | // else |
2369 | // { // single or child prim | 2369 | // { // single or child prim |
2370 | partIRot = Quaternion.Inverse(part.GetWorldRotation()); | 2370 | partIRot = Quaternion.Inverse(part.GetWorldRotation()); |
2371 | // } | 2371 | // } |
2372 | float offZ = collisionPoint.Z - m_initialSitTarget.Z; | 2372 | if (m_initialSitTarget != null) |
2373 | Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction | 2373 | { |
2374 | //Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset); | 2374 | float offZ = collisionPoint.Z - m_initialSitTarget.Z; |
2375 | m_pos += offset; | 2375 | Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction |
2376 | // ControllingClient.SendClearFollowCamProperties(part.UUID); | 2376 | //Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset); |
2377 | m_pos += offset; | ||
2378 | // ControllingClient.SendClearFollowCamProperties(part.UUID); | ||
2379 | } | ||
2377 | 2380 | ||
2378 | } | 2381 | } |
2379 | } // End SitAltitudeCallback KF. | 2382 | } // End SitAltitudeCallback KF. |