diff --git a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs index d0847ad462..1f1ea5c7a5 100644 --- a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs +++ b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs @@ -101,7 +101,7 @@ namespace OpenSim.Groups //ExtendedGroupRecord group = m_GroupsService.UpdateGroup(RequestingAgentID, groupID, charter, showInList, insigniaID, membershipFee, openEnrollment, allowPublish, maturePublish); ExtendedGroupRecord group = d(); - if (group != null && !group.GroupID.IsZero()) + if (!group.GroupID.IsZero()) m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT); return true; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index fd38deeb17..670fe4d7df 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3729,7 +3729,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP reply.Data.Flags |= 0x04; Vector3 pos = land.UserLocation; - if (pos.Equals(Vector3.Zero)) + if (pos.IsZero()) { pos = (land.AABBMax + land.AABBMin) * 0.5f; } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPZeroEncoder.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPZeroEncoder.cs index 6f9718c3d4..7f670b9993 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPZeroEncoder.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPZeroEncoder.cs @@ -284,7 +284,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void AddVector4(Vector4 v) { - if (v == Vector4.Zero) + if (v.IsZero()) AddZeros(16); else { diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 872980dc65..e179865e0e 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -2903,7 +2903,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return false; } - if (newPosition != Vector3.Zero) + if (!newPosition.IsZero()) so.RootPart.GroupPosition = newPosition; if (!Scene.AddSceneObject(so)) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index af17754529..568907b076 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -695,7 +695,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver pos.X -= m_boundingOrigin.X; pos.Y -= m_boundingOrigin.Y; } - if (m_displacement != Vector3.Zero) + if (!m_displacement.IsZero()) { pos += m_displacement; if (pos.X < 0 || pos.X >= scene.RegionInfo.RegionSizeX @@ -1164,7 +1164,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver ITerrainModule terrainModule = scene.RequestModuleInterface(); using (MemoryStream ms = new MemoryStream(data)) { - if (m_displacement != Vector3.Zero || m_rotation != 0f || m_boundingBox) + if (!m_displacement.IsZero() || m_rotation != 0f || m_boundingBox) { Vector2 boundingOrigin = new Vector2(m_boundingOrigin.X, m_boundingOrigin.Y); Vector2 boundingSize = new Vector2(m_boundingSize.X, m_boundingSize.Y); diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f219fb151f..90a8fcff9c 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -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); } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 7268b40536..54ca9e1c03 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -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; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index bf605770ef..4318dcac29 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -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; } diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index fa1536c7af..f238777334 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -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()); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index 00ebec9796..48c21bafd6 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs @@ -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) diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs index 40e32747a0..fe5752aafc 100644 --- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs @@ -200,7 +200,7 @@ namespace OpenSim.Region.DataSnapshot.Providers //default location XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); Vector3 loc = parcel.UserLocation; - if (loc.Equals(Vector3.Zero)) // This test is moot at this point: the location is wrong by default + if (loc.IsZero()) // This test is moot at this point: the location is wrong by default loc = new Vector3((parcel.AABBMax.X + parcel.AABBMin.X) / 2, (parcel.AABBMax.Y + parcel.AABBMin.Y) / 2, (parcel.AABBMax.Z + parcel.AABBMin.Z) / 2); tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString(); xmlparcel.AppendChild(tpLocation); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 24e254e89f..309fefe5ba 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5012,7 +5012,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { Error("llRequestAgentData","Invalid UUID passed to llRequestAgentData."); } - return ""; + return String.Empty; } //bad if lm is HG @@ -5226,7 +5226,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume) { - if(impact_sound == "") + if(String.IsNullOrEmpty(impact_sound.m_string)) { m_host.CollisionSoundVolume = (float)impact_volume; m_host.CollisionSound = m_host.invalidCollisionSoundUUID; diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs index aa1c47085d..1c2ea744d2 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstRun.cs @@ -165,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine // of all others so the m_DetachQuantum won't run out // before attach(NULL_KEY) is executed. case ScriptEventCode.attach: - if (evt.Params[0].ToString() == UUID.ZeroString) + if (evt.Params[0].ToString().Equals(UUID.ZeroString)) { LinkedListNode lln2 = null; for(lln2 = m_EventQueue.First; lln2 != null; lln2 = lln2.Next) diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index f49190876e..00f321b070 100755 Binary files a/bin/OpenMetaverse.Rendering.Meshmerizer.dll and b/bin/OpenMetaverse.Rendering.Meshmerizer.dll differ diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index c872a29ccc..c0061e0761 100755 Binary files a/bin/OpenMetaverse.StructuredData.dll and b/bin/OpenMetaverse.StructuredData.dll differ diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 96fa2966d2..246d6f0ce2 100755 Binary files a/bin/OpenMetaverse.dll and b/bin/OpenMetaverse.dll differ diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index 26efc546b2..37ebcfa8fd 100755 Binary files a/bin/OpenMetaverseTypes.dll and b/bin/OpenMetaverseTypes.dll differ