mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
!= UUID.Zero is slow
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user