mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
!= UUID.Zero is slow
This commit is contained in:
@@ -665,7 +665,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
for (int i = 0; i< toRemove.Count; ++i)
|
||||
{
|
||||
SceneObjectGroup g = toRemove[i];
|
||||
if (g.FromItemID != UUID.Zero)
|
||||
if (!g.FromItemID.IsZero())
|
||||
DetachSingleAttachmentToInv(sp, g);
|
||||
}
|
||||
}
|
||||
@@ -809,7 +809,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
return;
|
||||
|
||||
bool changed = false;
|
||||
if (inventoryID != UUID.Zero)
|
||||
if (!inventoryID.IsZero())
|
||||
changed = sp.Appearance.DetachAttachment(inventoryID);
|
||||
if (changed && m_scene.AvatarFactory != null)
|
||||
m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID);
|
||||
@@ -1248,7 +1248,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
return null;
|
||||
}
|
||||
|
||||
bool ItemIDNotZero = itemID != UUID.Zero;
|
||||
bool ItemIDNotZero = !itemID.IsZero();
|
||||
|
||||
if (ItemIDNotZero)
|
||||
objatt = m_invAccessModule.RezObject(sp.ControllingClient,
|
||||
@@ -1499,7 +1499,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
foreach (SceneObjectGroup group in attachments)
|
||||
{
|
||||
if (group.FromItemID == itemID && group.FromItemID != UUID.Zero)
|
||||
if (group.FromItemID.Equals(itemID) && !group.FromItemID.IsZero())
|
||||
{
|
||||
DetachSingleAttachmentToInv(sp, group);
|
||||
return;
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
wearableCache = WearableCacheItem.GetDefaultCacheItem();
|
||||
else
|
||||
{
|
||||
hadSkirt = (wearableCache[19].TextureID != UUID.Zero);
|
||||
hadSkirt = !wearableCache[19].TextureID.IsZero();
|
||||
}
|
||||
|
||||
HashSet<uint> updatedFaces = new HashSet<uint>();
|
||||
@@ -562,8 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
continue;
|
||||
}
|
||||
|
||||
if (face.TextureID == wearableCache[idx].TextureID &&
|
||||
face.TextureID != UUID.Zero)
|
||||
if (face.TextureID.Equals(wearableCache[idx].TextureID) && !face.TextureID.IsZero())
|
||||
{
|
||||
if (cache.Check((wearableCache[idx].TextureID).ToString()))
|
||||
{
|
||||
@@ -628,7 +627,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
hits++;
|
||||
}
|
||||
else if(sp.Appearance.Texture.FaceTextures[idx] == null ||
|
||||
sp.Appearance.Texture.FaceTextures[idx].TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE)
|
||||
sp.Appearance.Texture.FaceTextures[idx].TextureID.Equals(AppearanceManager.DEFAULT_AVATAR_TEXTURE))
|
||||
hits++;
|
||||
wearableCache[idx].TextureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE;
|
||||
wearableCache[idx].CacheId = UUID.Zero;
|
||||
@@ -1058,7 +1057,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
private void TryAndRepairBrokenWearable(WearableType type, IInventoryService invService, UUID userID,AvatarAppearance appearance)
|
||||
{
|
||||
UUID defaultwearable = GetDefaultItem(type);
|
||||
if (defaultwearable != UUID.Zero)
|
||||
if (!defaultwearable.IsZero())
|
||||
{
|
||||
UUID newInvItem = UUID.Random();
|
||||
InventoryItemBase itembase = new InventoryItemBase(newInvItem, userID)
|
||||
|
||||
@@ -563,7 +563,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
foreach (PresenceInfo friendSession in friendSessions)
|
||||
{
|
||||
// let's guard against sessions-gone-bad
|
||||
if (friendSession != null && friendSession.RegionID != UUID.Zero)
|
||||
if (friendSession != null && !friendSession.RegionID.IsZero())
|
||||
{
|
||||
//m_log.DebugFormat("[FRIENDS]: Get region {0}", friendSession.RegionID);
|
||||
GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
|
||||
|
||||
@@ -506,7 +506,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
{
|
||||
foreach (PresenceInfo p in presences)
|
||||
{
|
||||
if (p.RegionID != UUID.Zero)
|
||||
if (!p.RegionID.IsZero())
|
||||
{
|
||||
upd = p;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user