Fix a nullref issue in SitAltitudeCallback
parent
71a95900fd
commit
6933b48a7e
|
@ -2368,12 +2368,15 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
|
||||||
// else
|
// else
|
||||||
// { // single or child prim
|
// { // single or child prim
|
||||||
partIRot = Quaternion.Inverse(part.GetWorldRotation());
|
partIRot = Quaternion.Inverse(part.GetWorldRotation());
|
||||||
// }
|
// }
|
||||||
float offZ = collisionPoint.Z - m_initialSitTarget.Z;
|
if (m_initialSitTarget != null)
|
||||||
Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction
|
{
|
||||||
//Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset);
|
float offZ = collisionPoint.Z - m_initialSitTarget.Z;
|
||||||
m_pos += offset;
|
Vector3 offset = new Vector3(0.0f, 0.0f, offZ) * partIRot; // Altitude correction
|
||||||
// ControllingClient.SendClearFollowCamProperties(part.UUID);
|
//Console.WriteLine("sitPoint={0}, offset={1}", sitPoint, offset);
|
||||||
|
m_pos += offset;
|
||||||
|
// ControllingClient.SendClearFollowCamProperties(part.UUID);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} // End SitAltitudeCallback KF.
|
} // End SitAltitudeCallback KF.
|
||||||
|
|
Loading…
Reference in New Issue