Merge branch 'avination' into careminster
commit
8d9bfda727
|
@ -1560,6 +1560,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_doingCamRayCast = false;
|
m_doingCamRayCast = false;
|
||||||
if (hitYN && localid != LocalId)
|
if (hitYN && localid != LocalId)
|
||||||
|
{
|
||||||
|
SceneObjectGroup group = m_scene.GetGroupByPrim(localid);
|
||||||
|
bool IsPrim = group != null;
|
||||||
|
if (IsPrim)
|
||||||
|
{
|
||||||
|
SceneObjectPart part = group.GetPart(localid);
|
||||||
|
if (part != null && !part.VolumeDetectActive)
|
||||||
{
|
{
|
||||||
CameraConstraintActive = true;
|
CameraConstraintActive = true;
|
||||||
pNormal.X = (float) Math.Round(pNormal.X, 2);
|
pNormal.X = (float) Math.Round(pNormal.X, 2);
|
||||||
|
@ -1570,9 +1577,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
|
collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
|
||||||
collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
|
collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
|
||||||
|
|
||||||
Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z, Vector3.Dot(collisionPoint, pNormal));
|
Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
|
||||||
|
Vector3.Dot(collisionPoint, pNormal));
|
||||||
UpdateCameraCollisionPlane(plane);
|
UpdateCameraCollisionPlane(plane);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CameraConstraintActive = true;
|
||||||
|
pNormal.X = (float) Math.Round(pNormal.X, 2);
|
||||||
|
pNormal.Y = (float) Math.Round(pNormal.Y, 2);
|
||||||
|
pNormal.Z = (float) Math.Round(pNormal.Z, 2);
|
||||||
|
pNormal.Normalize();
|
||||||
|
collisionPoint.X = (float) Math.Round(collisionPoint.X, 1);
|
||||||
|
collisionPoint.Y = (float) Math.Round(collisionPoint.Y, 1);
|
||||||
|
collisionPoint.Z = (float) Math.Round(collisionPoint.Z, 1);
|
||||||
|
|
||||||
|
Vector4 plane = new Vector4(pNormal.X, pNormal.Y, pNormal.Z,
|
||||||
|
Vector3.Dot(collisionPoint, pNormal));
|
||||||
|
UpdateCameraCollisionPlane(plane);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
else if (!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||||
!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE))
|
!Rotation.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -512,7 +512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
else if (o is LSL_Types.LSLFloat)
|
else if (o is LSL_Types.LSLFloat)
|
||||||
size += 8;
|
size += 8;
|
||||||
else if (o is LSL_Types.LSLString)
|
else if (o is LSL_Types.LSLString)
|
||||||
size += ((LSL_Types.LSLString)o).m_string.Length;
|
size += ((LSL_Types.LSLString)o).m_string == null ? 0 : ((LSL_Types.LSLString)o).m_string.Length;
|
||||||
else if (o is LSL_Types.key)
|
else if (o is LSL_Types.key)
|
||||||
size += ((LSL_Types.key)o).value.Length;
|
size += ((LSL_Types.key)o).value.Length;
|
||||||
else if (o is LSL_Types.Vector3)
|
else if (o is LSL_Types.Vector3)
|
||||||
|
|
Loading…
Reference in New Issue