a few more changes on vectors etc

This commit is contained in:
UbitUmarov
2022-01-10 02:21:17 +00:00
parent 7d78f62d49
commit 9b33ef9c8c
17 changed files with 19 additions and 19 deletions

View File

@@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes
}
PhysicsActor pa = sceneObject.RootPart.PhysActor;
if (pa != null && pa.IsPhysical && vel != Vector3.Zero)
if (pa != null && pa.IsPhysical && !vel.IsZero())
{
sceneObject.RootPart.ApplyImpulse((vel * sceneObject.GetMass()), false);
}

View File

@@ -2779,7 +2779,7 @@ namespace OpenSim.Region.Framework.Scenes
};
if(av.IsSatOnObject)
detobj.colliderType |= 0x4; //passive
else if(detobj.velVector != Vector3.Zero)
else if(!detobj.velVector.IsZero())
detobj.colliderType |= 0x2; //active
return detobj;
}

View File

@@ -3994,7 +3994,7 @@ namespace OpenSim.Region.Framework.Scenes
!vel.ApproxEquals(m_lastVelocity) ||
!m_bodyRot.ApproxEquals(m_lastRotation) ||
(vel == Vector3.Zero && m_lastVelocity != Vector3.Zero) ||
(vel.IsZero() && !m_lastVelocity.IsZero()) ||
Math.Abs(dpos.X) > POSITION_LARGETOLERANCE ||
Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE ||
@@ -6453,7 +6453,7 @@ namespace OpenSim.Region.Framework.Scenes
// Don't restrict gods, estate managers, or land owners to
// the TP point. This behaviour mimics agni.
if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
land.LandData.UserLocation != Vector3.Zero &&
!land.LandData.UserLocation.IsZero() &&
!IsViewerUIGod &&
((land.LandData.OwnerID != m_uuid &&
!m_scene.Permissions.IsGod(m_uuid) &&
@@ -6510,12 +6510,12 @@ namespace OpenSim.Region.Framework.Scenes
|| (m_teleportFlags & adicionalLandPointFlags) != 0)
{
if (land.LandData.LandingType == (byte)LandingType.LandingPoint &&
land.LandData.UserLocation != Vector3.Zero )
!land.LandData.UserLocation.IsZero() )
// &&
// land.LandData.OwnerID != m_uuid )
{
pos = land.LandData.UserLocation;
if(land.LandData.UserLookAt != Vector3.Zero)
if(!land.LandData.UserLookAt.IsZero())
lookat = land.LandData.UserLookAt;
positionChanged = true;
}
@@ -6559,7 +6559,7 @@ namespace OpenSim.Region.Framework.Scenes
if (av.IsSatOnObject)
detobj.colliderType |= 0x4; //passive
else if (detobj.velVector != Vector3.Zero)
else if (!detobj.velVector.IsZero())
detobj.colliderType |= 0x2; //active
return detobj;
}

View File

@@ -1577,7 +1577,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
WriteVector(writer, "SitTargetPosition", sop.SitTargetPosition);
WriteVector(writer, "SitTargetPositionLL", sop.SitTargetPositionLL);
WriteQuaternion(writer, "SitTargetOrientationLL", sop.SitTargetOrientationLL);
if(sop.StandOffset != Vector3.Zero)
if(!sop.StandOffset.IsZero())
WriteVector(writer, "StandTarget", sop.StandOffset);
writer.WriteElementString("ParentID", sop.ParentID.ToString());
writer.WriteElementString("CreationDate", sop.CreationDate.ToString());

View File

@@ -200,7 +200,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
if (ent is SceneObjectGroup)
{
SceneObjectGroup g = (SceneObjectGroup)ent;
if (!min.Equals(Vector3.Zero) || !max.Equals(Vector3.Zero))
if (!min.IsZero() || !max.IsZero())
{
Vector3 pos = g.RootPart.GetWorldPosition();
if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z)