mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
useless changes
This commit is contained in:
@@ -97,6 +97,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
protected IScriptEngine m_ScriptEngine;
|
||||
public Scene World;
|
||||
|
||||
protected SceneObjectPart m_host;
|
||||
|
||||
protected UUID RegionScopeID = UUID.Zero;
|
||||
@@ -390,6 +392,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_lastSayShoutCheck = DateTime.UtcNow;
|
||||
|
||||
m_ScriptEngine = scriptEngine;
|
||||
World = m_ScriptEngine.World;
|
||||
m_host = host;
|
||||
m_item = item;
|
||||
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
|
||||
@@ -562,16 +565,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_ScriptEngine.SleepScript(m_item.ItemID, delay);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check for co-operative termination.
|
||||
/// </summary>
|
||||
/// <param name='delay'>If called with 0, then just the check is performed with no wait.</param>
|
||||
|
||||
public Scene World
|
||||
{
|
||||
get { return m_ScriptEngine.World; }
|
||||
}
|
||||
|
||||
[DebuggerNonUserCode]
|
||||
public void state(string newState)
|
||||
{
|
||||
|
||||
@@ -162,10 +162,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
protected IEnvironmentModule m_envModule = null;
|
||||
protected IGroupsModule m_groupsModule = null;
|
||||
protected IMessageTransferModule m_TransferModule = null;
|
||||
|
||||
public Scene World;
|
||||
|
||||
public void Initialize(IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||
{
|
||||
//private init
|
||||
m_ScriptEngine = scriptEngine;
|
||||
World = scriptEngine.World;
|
||||
|
||||
m_host = host;
|
||||
m_item = item;
|
||||
|
||||
@@ -250,11 +255,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public Scene World
|
||||
{
|
||||
get { return m_ScriptEngine.World; }
|
||||
}
|
||||
|
||||
internal static void OSSLError(string msg)
|
||||
{
|
||||
throw new ScriptException("OSSL Runtime Error: " + msg);
|
||||
@@ -6356,14 +6356,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Integer osGetPrimCount(LSL_Key object_id)
|
||||
{
|
||||
if (!UUID.TryParse(object_id, out UUID id) || id.IsZero())
|
||||
if (!UUID.TryParse(object_id.m_string, out UUID id) || id.IsZero())
|
||||
return 0;
|
||||
|
||||
SceneObjectPart part = World.GetSceneObjectPart(id);
|
||||
if (part is null)
|
||||
return 0;
|
||||
|
||||
return part.ParentGroup.PrimCount;
|
||||
return World.TryGetSceneObjectPart(id, out SceneObjectPart part) ? part.ParentGroup.PrimCount : 0;
|
||||
}
|
||||
|
||||
public LSL_Integer osGetSittingAvatarsCount()
|
||||
@@ -6373,14 +6369,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public LSL_Integer osGetSittingAvatarsCount(LSL_Key object_id)
|
||||
{
|
||||
if (!UUID.TryParse(object_id, out UUID id) || id.IsZero())
|
||||
if (!UUID.TryParse(object_id.m_string, out UUID id) || id.IsZero())
|
||||
return 0;
|
||||
|
||||
SceneObjectPart part = World.GetSceneObjectPart(id);
|
||||
if (part is null)
|
||||
return 0;
|
||||
|
||||
return part.ParentGroup.GetSittingAvatarsCount();
|
||||
return World.TryGetSceneObjectPart(id, out SceneObjectPart part) ? part.ParentGroup.GetSittingAvatarsCount() : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user