!= UUID.Zero is slow

This commit is contained in:
UbitUmarov
2022-01-09 02:28:51 +00:00
parent 7e0fc95c3a
commit da928d6099
78 changed files with 254 additions and 263 deletions

View File

@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
// If this is an object sense by key try to get it directly
// rather than getting a list to scan through
if (ts.keyID != UUID.Zero)
if (!ts.keyID.IsZero())
{
m_CmdManager.m_ScriptEngine.World.Entities.TryGetValue(ts.keyID, out EntityBase e);
if (e == null)
@@ -624,7 +624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
// If this is an avatar sense by key try to get them directly
// rather than getting a list to scan through
if (ts.keyID != UUID.Zero)
if (!ts.keyID.IsZero())
{
// Try direct lookup by UUID
if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out ScenePresence sp))