mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
cosmetics
This commit is contained in:
@@ -39,9 +39,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
* in range 0..63 that begin with a lower-case letter for scripts to
|
||||
* reference.
|
||||
*/
|
||||
|
||||
public enum ScriptEventCode: int
|
||||
{
|
||||
|
||||
// used by XMRInstance to indicate no event being processed
|
||||
None = -1,
|
||||
|
||||
|
||||
@@ -87,14 +87,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
private string m_ScriptBasePath;
|
||||
private bool m_Enabled = false;
|
||||
public bool m_StartProcessing = false;
|
||||
private Dictionary<UUID, ArrayList> m_ScriptErrors =
|
||||
new Dictionary<UUID, ArrayList>();
|
||||
private Dictionary<UUID, List<UUID>> m_ObjectItemList =
|
||||
new Dictionary<UUID, List<UUID>>();
|
||||
private Dictionary<UUID, XMRInstance[]> m_ObjectInstArray =
|
||||
new Dictionary<UUID, XMRInstance[]>();
|
||||
public Dictionary<string, FieldInfo> m_XMRInstanceApiCtxFieldInfos =
|
||||
new Dictionary<string, FieldInfo>();
|
||||
private Dictionary<UUID, ArrayList> m_ScriptErrors = new Dictionary<UUID, ArrayList>();
|
||||
private Dictionary<UUID, List<UUID>> m_ObjectItemList = new Dictionary<UUID, List<UUID>>();
|
||||
private Dictionary<UUID, XMRInstance[]> m_ObjectInstArray = new Dictionary<UUID, XMRInstance[]>();
|
||||
public Dictionary<string, FieldInfo> m_XMRInstanceApiCtxFieldInfos = new Dictionary<string, FieldInfo>();
|
||||
public int m_StackSize;
|
||||
private int m_HeapSize;
|
||||
private Thread m_SleepThread = null;
|
||||
@@ -941,7 +937,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
if(!m_ObjectInstArray.TryGetValue(partUUID, out objInstArray))
|
||||
return false;
|
||||
|
||||
if(objInstArray == null)
|
||||
if (objInstArray == null)
|
||||
{
|
||||
objInstArray = RebuildObjectInstArray(partUUID);
|
||||
m_ObjectInstArray[partUUID] = objInstArray;
|
||||
@@ -951,7 +947,8 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
// Post event to all script instances in the object.
|
||||
if(objInstArray.Length <= 0)
|
||||
return false;
|
||||
foreach(XMRInstance inst in objInstArray)
|
||||
|
||||
foreach (XMRInstance inst in objInstArray)
|
||||
inst.PostEvent(parms);
|
||||
|
||||
return true;
|
||||
@@ -1991,19 +1988,17 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
private XMRInstance[] RebuildObjectInstArray(UUID partUUID)
|
||||
{
|
||||
List<UUID> itemIDList = m_ObjectItemList[partUUID];
|
||||
int n = 0;
|
||||
foreach(UUID itemID in itemIDList)
|
||||
XMRInstance[] a = new XMRInstance[itemIDList.Count];
|
||||
if(itemIDList.Count > 0)
|
||||
{
|
||||
if(m_InstancesDict.ContainsKey(itemID))
|
||||
n++;
|
||||
}
|
||||
|
||||
XMRInstance[] a = new XMRInstance[n];
|
||||
n = 0;
|
||||
foreach(UUID itemID in itemIDList)
|
||||
{
|
||||
if(m_InstancesDict.TryGetValue(itemID, out a[n]))
|
||||
n++;
|
||||
int n = 0;
|
||||
foreach (UUID itemID in itemIDList)
|
||||
{
|
||||
if (m_InstancesDict.TryGetValue(itemID, out a[n]))
|
||||
n++;
|
||||
}
|
||||
if(n < itemIDList.Count)
|
||||
Array.Resize(ref a, n);
|
||||
}
|
||||
m_ObjectInstArray[partUUID] = a;
|
||||
return a;
|
||||
|
||||
@@ -103,8 +103,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
||||
// get it. But only one has the object in question. The others
|
||||
// just ignore it.
|
||||
//
|
||||
SceneObjectPart part =
|
||||
this.World.GetSceneObjectPart(objectID);
|
||||
SceneObjectPart part = World.GetSceneObjectPart(objectID);
|
||||
|
||||
if(part == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user