mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
!= UUID.Zero is slow
This commit is contained in:
@@ -189,7 +189,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
sequenceNums = new int[defaultSize];
|
||||
objectIDs = new UUID[defaultSize];
|
||||
|
||||
if (m_defaultAnimation.AnimID != UUID.Zero)
|
||||
if (!m_defaultAnimation.AnimID.IsZero())
|
||||
{
|
||||
animIDs[0] = m_defaultAnimation.AnimID;
|
||||
sequenceNums[0] = m_defaultAnimation.SequenceNum;
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
if (m_scenePresence.IsChildAgent)
|
||||
return;
|
||||
|
||||
if (animID != UUID.Zero)
|
||||
if (!animID.IsZero())
|
||||
{
|
||||
if (addRemove)
|
||||
m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero);
|
||||
@@ -201,14 +201,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
// "[SCENE PRESENCE ANIMATOR]: Setting movement animation {0} for {1}",
|
||||
// anim, m_scenePresence.Name);
|
||||
|
||||
if (aoSitGndAnim != UUID.Zero)
|
||||
if (!aoSitGndAnim.IsZero())
|
||||
{
|
||||
avnChangeAnim(aoSitGndAnim, false, true);
|
||||
aoSitGndAnim = UUID.Zero;
|
||||
}
|
||||
|
||||
UUID overridenAnim = m_scenePresence.Overrides.GetOverriddenAnimation(anim);
|
||||
if (overridenAnim != UUID.Zero)
|
||||
if (!overridenAnim.IsZero())
|
||||
{
|
||||
if (anim == "SITGROUND")
|
||||
{
|
||||
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
currentControlState = motionControlStates.sitted;
|
||||
return "SITGROUND";
|
||||
}
|
||||
if (m_scenePresence.ParentID != 0 || m_scenePresence.ParentUUID != UUID.Zero)
|
||||
if (m_scenePresence.ParentID != 0 || !m_scenePresence.ParentUUID.IsZero())
|
||||
{
|
||||
currentControlState = motionControlStates.sitted;
|
||||
return "SIT";
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="item"></param>
|
||||
public bool AddInventoryItem(InventoryItemBase item, bool trigger)
|
||||
{
|
||||
if (item.Folder != UUID.Zero && InventoryService.AddItem(item))
|
||||
if (!item.Folder.IsZero() && InventoryService.AddItem(item))
|
||||
{
|
||||
int userlevel = 0;
|
||||
if (Permissions.IsGod(item.Owner))
|
||||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (trigger)
|
||||
EventManager.TriggerOnNewInventoryItemUploadComplete(item, userlevel);
|
||||
|
||||
if (originalFolder != UUID.Zero)
|
||||
if (!originalFolder.IsZero())
|
||||
{
|
||||
// Tell the viewer that the item didn't go there
|
||||
ChangePlacement(item, f);
|
||||
@@ -1898,7 +1898,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Only look for an uploaded updated asset if we are passed a transaction ID. This is only the
|
||||
// case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update)
|
||||
// will not pass in a transaction ID in the update message.
|
||||
if (transactionID != UUID.Zero && AgentTransactionsModule != null)
|
||||
if (!transactionID.IsZero() && AgentTransactionsModule != null)
|
||||
{
|
||||
AgentTransactionsModule.HandleTaskItemUpdateFromTransaction(
|
||||
remoteClient, part, transactionID, currentItem);
|
||||
@@ -1999,10 +1999,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
SceneObjectPart partWhereRezzed;
|
||||
|
||||
if (itemBase.ID != UUID.Zero)
|
||||
partWhereRezzed = RezScriptFromAgentInventory(remoteClient.AgentId, itemBase.ID, localID);
|
||||
else
|
||||
if (itemBase.ID.IsZero())
|
||||
partWhereRezzed = RezNewScript(remoteClient.AgentId, itemBase);
|
||||
else
|
||||
partWhereRezzed = RezScriptFromAgentInventory(remoteClient.AgentId, itemBase.ID, localID);
|
||||
|
||||
if (partWhereRezzed != null)
|
||||
partWhereRezzed.SendPropertiesToClient(remoteClient);
|
||||
@@ -2887,9 +2887,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs)
|
||||
{
|
||||
|
||||
if (!Permissions.IsGod(remoteClient.AgentId))
|
||||
{
|
||||
if (ownerID != UUID.Zero)
|
||||
if (!ownerID.IsZero())
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2907,7 +2908,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
foreach (SceneObjectGroup sog in groups)
|
||||
{
|
||||
if (ownerID != UUID.Zero)
|
||||
if (!ownerID.IsZero())
|
||||
{
|
||||
sog.SetOwnerId(ownerID);
|
||||
sog.SetGroup(groupID, remoteClient);
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// XXX: Might be better to get rid of this special casing and have GetMembershipData return something
|
||||
// reasonable for a UUID.Zero group.
|
||||
if (groupID != UUID.Zero)
|
||||
if (!groupID.IsZero())
|
||||
{
|
||||
GroupMembershipData gmd = m_groupsModule.GetMembershipData(groupID, remoteClient.AgentId);
|
||||
|
||||
|
||||
@@ -2510,7 +2510,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
}
|
||||
if (RayTargetID != UUID.Zero)
|
||||
if (!RayTargetID.IsZero())
|
||||
{
|
||||
SceneObjectPart target = GetSceneObjectPart(RayTargetID);
|
||||
|
||||
@@ -5192,11 +5192,11 @@ Label_GroupsDone:
|
||||
if ((parcel.LandData.Flags & (uint)ParcelFlags.AllowOtherScripts) != 0)
|
||||
return true;
|
||||
|
||||
if ((part.OwnerID == parcel.LandData.OwnerID) || Permissions.IsGod(part.OwnerID))
|
||||
if ((part.OwnerID.Equals(parcel.LandData.OwnerID)) || Permissions.IsGod(part.OwnerID))
|
||||
return true;
|
||||
|
||||
if (((parcel.LandData.Flags & (uint)ParcelFlags.AllowGroupScripts) != 0)
|
||||
&& (parcel.LandData.GroupID != UUID.Zero) && (parcel.LandData.GroupID == part.GroupID))
|
||||
&& (!parcel.LandData.GroupID.IsZero()) && (parcel.LandData.GroupID.Equals(part.GroupID)))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -6274,7 +6274,7 @@ Environment.Exit(1);
|
||||
if (!RegionInfo.EstateSettings.AllowDirectTeleport)
|
||||
{
|
||||
SceneObjectGroup telehub;
|
||||
if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub)
|
||||
if (!RegionInfo.RegionSettings.TelehubObject.IsZero() && (telehub = GetSceneObjectGroup (RegionInfo.RegionSettings.TelehubObject)) != null && checkTeleHub)
|
||||
{
|
||||
bool banned = true;
|
||||
bool validTelehub = false;
|
||||
@@ -6490,5 +6490,7 @@ Environment.Exit(1);
|
||||
return lastSource == sourceID;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected internal void HandleUndo(IClientAPI remoteClient, UUID primId)
|
||||
{
|
||||
if (primId != UUID.Zero)
|
||||
if (!primId.IsZero())
|
||||
{
|
||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
|
||||
if (part != null)
|
||||
@@ -689,7 +689,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected internal void HandleRedo(IClientAPI remoteClient, UUID primId)
|
||||
{
|
||||
if (primId != UUID.Zero)
|
||||
if (!primId.IsZero())
|
||||
{
|
||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primId);
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// "[PRIM INVENTORY]: Adding inventory item {0} from {1} to part with local ID {2}",
|
||||
// item.Name, remoteClient.Name, localID);
|
||||
|
||||
UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID;
|
||||
UUID newItemId = copyItemID.IsZero() ? item.ID : copyItemID;
|
||||
|
||||
SceneObjectPart part = GetPart(localID);
|
||||
if (part == null)
|
||||
|
||||
@@ -910,7 +910,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (av.IsChildAgent)
|
||||
{
|
||||
// avatar crossed do some extra cleanup
|
||||
if (av.ParentUUID != UUID.Zero)
|
||||
if (!av.ParentUUID.IsZero())
|
||||
{
|
||||
av.ClearControls();
|
||||
av.ParentPart = null;
|
||||
@@ -1479,7 +1479,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (node.Attributes["UUID"] != null)
|
||||
{
|
||||
UUID itemid = new UUID(node.Attributes["UUID"].Value);
|
||||
if (itemid != UUID.Zero)
|
||||
if (!itemid.IsZero())
|
||||
m_savedScriptState[itemid] = node.InnerXml;
|
||||
}
|
||||
}
|
||||
@@ -1510,7 +1510,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// m_log.DebugFormat("[SCENE OBJECT GROUP]: Found state for item ID {0} in object {1}", uuid, Name);
|
||||
|
||||
UUID itemid = new UUID(uuid);
|
||||
if (itemid != UUID.Zero)
|
||||
if (!itemid.IsZero())
|
||||
m_savedScriptState[itemid] = innerXml;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1420,9 +1420,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
|
||||
|
||||
invString.AddNameValueLine("group_id",groupID.ToString());
|
||||
if(groupID != UUID.Zero && ownerID == groupID)
|
||||
if(!groupID.IsZero() && ownerID.Equals(groupID))
|
||||
{
|
||||
invString.AddNameValueLine("owner_id", UUID.Zero.ToString());
|
||||
invString.AddNameValueLine("owner_id", UUID.ZeroString);
|
||||
invString.AddNameValueLine("group_owned","1");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (land != null)
|
||||
m_currentParcelHide = !land.LandData.SeeAVs;
|
||||
|
||||
if (m_previusParcelUUID != UUID.Zero || checksame)
|
||||
if (!m_previusParcelUUID.IsZero() || checksame)
|
||||
ParcelCrossCheck(m_currentParcelUUID, m_previusParcelUUID, m_currentParcelHide, m_previusParcelHide, oldhide,checksame);
|
||||
}
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// if ParentUUID is NOT UUID.Zero, we are looking to
|
||||
// be sat on an object that isn't there yet. Should
|
||||
// be treated as if sat.
|
||||
if(ParentID == 0 && !SitGround && ParentUUID == UUID.Zero) // skip it if sitting
|
||||
if(ParentID == 0 && !SitGround && ParentUUID.IsZero()) // skip it if sitting
|
||||
Animator.UpdateMovementAnimations();
|
||||
}
|
||||
else
|
||||
@@ -1367,7 +1367,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// "[SCENE]: Upgrading child to root agent for {0} in {1}",
|
||||
// Name, m_scene.RegionInfo.RegionName);
|
||||
|
||||
if (ParentUUID != UUID.Zero)
|
||||
if (!ParentUUID.IsZero())
|
||||
{
|
||||
m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID);
|
||||
SceneObjectPart part = m_scene.GetSceneObjectPart(ParentUUID);
|
||||
@@ -3425,7 +3425,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//look for prims with explicit sit targets that are available
|
||||
foreach (SceneObjectPart part in partArray)
|
||||
{
|
||||
if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero && part.SitActiveRange >= 0)
|
||||
if (part.IsSitTargetSet && part.SitTargetAvatar.IsZero() && part.SitActiveRange >= 0)
|
||||
{
|
||||
//switch the target to this prim
|
||||
return part;
|
||||
@@ -3460,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (PhysicsActor != null)
|
||||
m_sitAvatarHeight = PhysicsActor.Size.Z * 0.5f;
|
||||
|
||||
if (part.IsSitTargetSet && part.SitTargetAvatar == UUID.Zero)
|
||||
if (part.IsSitTargetSet && part.SitTargetAvatar.IsZero())
|
||||
{
|
||||
offset = part.SitTargetPosition;
|
||||
sitOrientation = part.SitTargetOrientation;
|
||||
@@ -4683,7 +4683,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// Also don't do this while sat, sitting avatars cross with the
|
||||
// object they sit on. ParentUUID denoted a pending sit, don't
|
||||
// interfere with it.
|
||||
if (ParentID != 0 || PhysicsActor == null || ParentUUID != UUID.Zero)
|
||||
if (ParentID != 0 || PhysicsActor == null || !ParentUUID.IsZero())
|
||||
return;
|
||||
|
||||
Vector3 pos2 = AbsolutePosition;
|
||||
@@ -4701,7 +4701,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (Scene.PositionIsInCurrentRegion(pos2))
|
||||
return;
|
||||
|
||||
if (!CrossToNewRegion() && m_requestedSitTargetUUID == UUID.Zero)
|
||||
if (!CrossToNewRegion() && m_requestedSitTargetUUID.IsZero())
|
||||
{
|
||||
// we don't have entity transfer module
|
||||
Vector3 pos = AbsolutePosition;
|
||||
@@ -4726,7 +4726,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void CrossToNewRegionFail()
|
||||
{
|
||||
if (m_requestedSitTargetUUID == UUID.Zero)
|
||||
if (m_requestedSitTargetUUID.IsZero())
|
||||
{
|
||||
bool isFlying = Flying;
|
||||
RemoveFromPhysicalScene();
|
||||
@@ -6214,7 +6214,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// first check telehub
|
||||
|
||||
UUID TelehubObjectID = m_scene.RegionInfo.RegionSettings.TelehubObject;
|
||||
if ( TelehubObjectID != UUID.Zero)
|
||||
if ( !TelehubObjectID.IsZero())
|
||||
{
|
||||
SceneObjectGroup telehubSOG = m_scene.GetSceneObjectGroup(TelehubObjectID);
|
||||
if(telehubSOG != null)
|
||||
@@ -6428,7 +6428,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return false;
|
||||
|
||||
SceneObjectGroup telehub = null;
|
||||
if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject)) != null)
|
||||
if (!m_scene.RegionInfo.RegionSettings.TelehubObject.IsZero() && (telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject)) != null)
|
||||
{
|
||||
if (!m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
|
||||
{
|
||||
@@ -6485,7 +6485,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (!m_scene.RegionInfo.EstateSettings.AllowDirectTeleport)
|
||||
{
|
||||
SceneObjectGroup telehub = null;
|
||||
if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject)) != null)
|
||||
if (!m_scene.RegionInfo.RegionSettings.TelehubObject.IsZero() && (telehub = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject)) != null)
|
||||
{
|
||||
if(CheckAndAdjustTelehub(telehub, ref pos, ref positionChanged))
|
||||
return true;
|
||||
@@ -6894,7 +6894,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// now on a private parcel
|
||||
allpresences = m_scene.GetScenePresences();
|
||||
|
||||
if (previusParcelHide && previusParcelID != UUID.Zero)
|
||||
if (previusParcelHide && !previusParcelID.IsZero())
|
||||
{
|
||||
foreach (ScenePresence p in allpresences)
|
||||
{
|
||||
@@ -6943,7 +6943,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
else
|
||||
{
|
||||
// now on public parcel
|
||||
if (previusParcelHide && previusParcelID != UUID.Zero)
|
||||
if (previusParcelHide && !previusParcelID.IsZero())
|
||||
{
|
||||
// was on private area
|
||||
allpresences = m_scene.GetScenePresences();
|
||||
|
||||
@@ -401,15 +401,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
if (part.Shape.SculptTexture != UUID.Zero)
|
||||
if (!part.Shape.SculptTexture.IsZero())
|
||||
GatheredUuids[part.Shape.SculptTexture] = (sbyte)AssetType.Texture;
|
||||
|
||||
if (part.Shape.ProjectionTextureUUID != UUID.Zero)
|
||||
if (!part.Shape.ProjectionTextureUUID.IsZero())
|
||||
GatheredUuids[part.Shape.ProjectionTextureUUID] = (sbyte)AssetType.Texture;
|
||||
|
||||
UUID collisionSound = part.CollisionSound;
|
||||
if ( collisionSound != UUID.Zero &&
|
||||
collisionSound != part.invalidCollisionSoundUUID)
|
||||
if ( !collisionSound.IsZero() && collisionSound.NotEqual(part.invalidCollisionSoundUUID))
|
||||
GatheredUuids[collisionSound] = (sbyte)AssetType.Sound;
|
||||
|
||||
if (part.ParticleSystem.Length > 0)
|
||||
@@ -417,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
try
|
||||
{
|
||||
Primitive.ParticleSystem ps = new Primitive.ParticleSystem(part.ParticleSystem, 0);
|
||||
if (ps.Texture != UUID.Zero)
|
||||
if (!ps.Texture.IsZero())
|
||||
GatheredUuids[ps.Texture] = (sbyte)AssetType.Texture;
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -440,7 +439,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
foreach(UUID id in part.Animations.Keys)
|
||||
{
|
||||
if(id != UUID.Zero &&
|
||||
if(!id.IsZero() &&
|
||||
!ToSkip.Contains(id) &&
|
||||
!FailedUUIDs.Contains(id))
|
||||
{
|
||||
@@ -668,14 +667,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private void RecordTextureEntryAssetUuids(Primitive.TextureEntryFace texture)
|
||||
{
|
||||
UUID teid = texture.TextureID;
|
||||
if (teid != UUID.Zero &&
|
||||
if (!teid.IsZero() &&
|
||||
!ToSkip.Contains(teid) &&
|
||||
!FailedUUIDs.Contains(teid))
|
||||
{
|
||||
GatheredUuids[teid] = (sbyte)AssetType.Texture;
|
||||
}
|
||||
|
||||
if (texture.MaterialID != UUID.Zero)
|
||||
if (!texture.MaterialID.IsZero())
|
||||
AddForInspection(texture.MaterialID);
|
||||
}
|
||||
|
||||
@@ -720,7 +719,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (mat.ContainsKey("NormMap"))
|
||||
{
|
||||
UUID normalMapId = mat["NormMap"].AsUUID();
|
||||
if (normalMapId != UUID.Zero)
|
||||
if (!normalMapId.IsZero())
|
||||
{
|
||||
GatheredUuids[normalMapId] = (sbyte)AssetType.Texture;
|
||||
//m_log.Info("[UUID Gatherer]: found normal map ID: " + normalMapId.ToString());
|
||||
@@ -729,7 +728,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (mat.ContainsKey("SpecMap"))
|
||||
{
|
||||
UUID specularMapId = mat["SpecMap"].AsUUID();
|
||||
if (specularMapId != UUID.Zero)
|
||||
if (!specularMapId.IsZero())
|
||||
{
|
||||
GatheredUuids[specularMapId] = (sbyte)AssetType.Texture;
|
||||
//m_log.Info("[UUID Gatherer]: found specular map ID: " + specularMapId.ToString());
|
||||
@@ -857,7 +856,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if(texparts.Length <2 || texparts[1].Length < 36)
|
||||
continue;
|
||||
texparts[1].SelfTrim(wearableSeps);
|
||||
if (UUID.TryParse(texparts[1].ToString(), out UUID id) && id != UUID.Zero)
|
||||
if (UUID.TryParse(texparts[1].ToString(), out UUID id) && !id.IsZero())
|
||||
GatheredUuids[id] = (sbyte)AssetType.Texture;
|
||||
}
|
||||
}
|
||||
@@ -1028,21 +1027,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (!nodeName.EndsWith((byte)'d'))
|
||||
continue;
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && id != UUID.Zero)
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && !id.IsZero())
|
||||
GatheredUuids[id] = (sbyte)AssetType.Sound;
|
||||
}
|
||||
else if (nodeName.StartsWith(SoundIDB))
|
||||
{
|
||||
if (nodeName.EndsWith((byte)'/'))
|
||||
continue;
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && id != UUID.Zero)
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && !id.IsZero())
|
||||
GatheredUuids[id] = (sbyte)AssetType.Sound;
|
||||
}
|
||||
else if (nodeName.StartsWith(SculptTextureB))
|
||||
{
|
||||
if (nodeName.EndsWith((byte)'/'))
|
||||
continue;
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && id != UUID.Zero)
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && !id.IsZero())
|
||||
GatheredUuids[id] = (sbyte)AssetType.Texture; // can be mesh but no prob
|
||||
}
|
||||
else if (nodeName.StartsWith(ExtraParamsB))
|
||||
@@ -1057,7 +1056,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
PrimitiveBaseShape ps = new PrimitiveBaseShape();
|
||||
ps.ReadInExtraParamsBytes(exbytes);
|
||||
UUID teid = ps.ProjectionTextureUUID;
|
||||
if (teid != UUID.Zero &&
|
||||
if (!teid.IsZero() &&
|
||||
!ToSkip.Contains(teid) &&
|
||||
!FailedUUIDs.Contains(teid))
|
||||
{
|
||||
@@ -1089,7 +1088,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
Primitive.ParticleSystem ps = new Primitive.ParticleSystem(psbytes, 0);
|
||||
UUID teid = ps.Texture;
|
||||
if (teid != UUID.Zero &&
|
||||
if (!teid.IsZero() &&
|
||||
!ToSkip.Contains(teid) &&
|
||||
!FailedUUIDs.Contains(teid))
|
||||
{
|
||||
@@ -1139,7 +1138,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (nodeName.StartsWith(AssetIDB))
|
||||
{
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && id != UUID.Zero)
|
||||
if (TryGetxmlUUIDValue(data, out UUID id) && !id.IsZero())
|
||||
AddForInspection(id);
|
||||
}
|
||||
else if (nodeName.StartsWith(endTaskInventoryB))
|
||||
@@ -1192,7 +1191,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
if (!osdata.ReadLine(out id)) // uuid
|
||||
return;
|
||||
if (osUTF8Slice.TryParseUUID(id, out uid) && uid != UUID.Zero)
|
||||
if (osUTF8Slice.TryParseUUID(id, out uid) && !uid.IsZero())
|
||||
GatheredUuids[uid] = type == 0 ? (sbyte)AssetType.Animation : (sbyte)AssetType.Sound;
|
||||
if (!osdata.SkipLine()) // flags
|
||||
return;
|
||||
@@ -1229,7 +1228,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if(indx < 0)
|
||||
continue;
|
||||
osUTF8Slice tmp = data.SubUTF8(0, indx);
|
||||
if(osUTF8Slice.TryParseUUID(tmp, out UUID id) && id != UUID.Zero)
|
||||
if(osUTF8Slice.TryParseUUID(tmp, out UUID id) && !id.IsZero())
|
||||
GatheredUuids[id] = (sbyte)AssetType.Texture;
|
||||
data.SubUTF8Self(indx + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user