Fix a nullref issue in SitAltitudeCallback

avinationmerge
Tom Grimshaw 2010-05-19 13:49:34 -07:00
parent 71a95900fd
commit 6933b48a7e
1 changed files with 9 additions and 6 deletions

View File

@ -2368,12 +2368,15 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
// else
// { // single or child prim
partIRot = Quaternion.Inverse(part.GetWorldRotation());
// }
float offZ = collisionPoint.Z - m_initialSitTarget.Z;
Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction
//Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset);
m_pos += offset;
// ControllingClient.SendClearFollowCamProperties(part.UUID);
// }
if (m_initialSitTarget != null)
{
float offZ = collisionPoint.Z - m_initialSitTarget.Z;
Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction
//Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset);
m_pos += offset;
// ControllingClient.SendClearFollowCamProperties(part.UUID);
}
}
} // End SitAltitudeCallback KF.