mirror of
https://github.com/opensim/opensim.git
synced 2026-07-29 04:25:36 +08:00
Formatting cleanup, minor refactoring, svn properties.
This commit is contained in:
@@ -57,11 +57,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
}
|
||||
|
||||
public LLUUID RegisterRequest(uint localID, LLUUID itemID,
|
||||
string identifier)
|
||||
string identifier)
|
||||
{
|
||||
lock(DataserverRequests)
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
if(DataserverRequests.ContainsKey(identifier))
|
||||
if (DataserverRequests.ContainsKey(identifier))
|
||||
return LLUUID.Zero;
|
||||
|
||||
DataserverRequest ds = new DataserverRequest();
|
||||
@@ -84,9 +84,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
{
|
||||
DataserverRequest ds;
|
||||
|
||||
lock(DataserverRequests)
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
if(!DataserverRequests.ContainsKey(identifier))
|
||||
if (!DataserverRequests.ContainsKey(identifier))
|
||||
return;
|
||||
|
||||
ds=DataserverRequests[identifier];
|
||||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
}
|
||||
|
||||
m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID,
|
||||
new XEventParams( "dataserver", new Object[]
|
||||
new XEventParams("dataserver", new Object[]
|
||||
{ new LSL_Types.LSLString(ds.ID.ToString()),
|
||||
new LSL_Types.LSLString(reply)},
|
||||
new XDetectParams[0]));
|
||||
@@ -102,11 +102,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
public void RemoveEvents(uint localID, LLUUID itemID)
|
||||
{
|
||||
lock(DataserverRequests)
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values))
|
||||
{
|
||||
if(ds.itemID == itemID)
|
||||
if (ds.itemID == itemID)
|
||||
DataserverRequests.Remove(ds.handle);
|
||||
}
|
||||
}
|
||||
@@ -114,11 +114,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
public void ExpireRequests()
|
||||
{
|
||||
lock(DataserverRequests)
|
||||
lock (DataserverRequests)
|
||||
{
|
||||
foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values))
|
||||
{
|
||||
if(ds.startTime > DateTime.Now.AddSeconds(30))
|
||||
if (ds.startTime > DateTime.Now.AddSeconds(30))
|
||||
DataserverRequests.Remove(ds.handle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,14 +55,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
public void AddObjectEvent(uint localID, string eventName, XDetectParams det)
|
||||
{
|
||||
SceneObjectPart part = m_CmdManager.m_ScriptEngine.World.
|
||||
GetSceneObjectPart(localID);
|
||||
GetSceneObjectPart(localID);
|
||||
|
||||
if(part == null) // Can't register events for non-prims
|
||||
if (part == null) // Can't register events for non-prims
|
||||
return;
|
||||
|
||||
if(!part.ContainsScripts())
|
||||
if (!part.ContainsScripts())
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
public void RemoveObjectEvent(uint localID, string eventName, LLUUID id)
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
foreach (XEngine xe in XEngine.ScriptEngines)
|
||||
{
|
||||
if(xe.PostObjectEvent(httpInfo.localID,
|
||||
if (xe.PostObjectEvent(httpInfo.localID,
|
||||
new XEventParams("http_response",
|
||||
resobj, new XDetectParams[0])))
|
||||
break;
|
||||
|
||||
@@ -69,7 +69,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
private object SenseRepeatListLock = new object();
|
||||
|
||||
public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID,
|
||||
string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
|
||||
string name, LLUUID keyID, int type, double range,
|
||||
double arc, double sec, SceneObjectPart host)
|
||||
{
|
||||
Console.WriteLine("SetSensorEvent");
|
||||
|
||||
@@ -319,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
new XDetectParams[SensedObjects.Length];
|
||||
|
||||
int idx;
|
||||
for(idx = 0 ; idx < SensedObjects.Length; idx++)
|
||||
for (idx = 0; idx < SensedObjects.Length; idx++)
|
||||
{
|
||||
detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]);
|
||||
}
|
||||
@@ -339,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
foreach (SenseRepeatClass ts in SenseRepeaters)
|
||||
{
|
||||
if(ts.itemID == itemID)
|
||||
if (ts.itemID == itemID)
|
||||
{
|
||||
data.Add(ts.interval);
|
||||
data.Add(ts.name);
|
||||
@@ -353,18 +354,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID,
|
||||
Object[] data)
|
||||
Object[] data)
|
||||
{
|
||||
SceneObjectPart part =
|
||||
m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(
|
||||
m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(
|
||||
objectID);
|
||||
|
||||
if(part == null)
|
||||
if (part == null)
|
||||
return;
|
||||
|
||||
int idx=0;
|
||||
int idx = 0;
|
||||
|
||||
while(idx < data.Length)
|
||||
while (idx < data.Length)
|
||||
{
|
||||
SenseRepeatClass ts = new SenseRepeatClass();
|
||||
|
||||
@@ -380,12 +381,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
ts.host = part;
|
||||
|
||||
ts.next =
|
||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
|
||||
SenseRepeaters.Add(ts);
|
||||
idx += 6;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
{
|
||||
foreach (TimerClass ts in Timers)
|
||||
{
|
||||
if(ts.itemID == itemID)
|
||||
if (ts.itemID == itemID)
|
||||
{
|
||||
data.Add(ts.interval);
|
||||
data.Add(ts.next-DateTime.Now.Ticks);
|
||||
@@ -142,11 +142,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
}
|
||||
|
||||
public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID,
|
||||
Object[] data)
|
||||
Object[] data)
|
||||
{
|
||||
int idx=0;
|
||||
int idx = 0;
|
||||
|
||||
while(idx < data.Length)
|
||||
while (idx < data.Length)
|
||||
{
|
||||
TimerClass ts = new TimerClass();
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
foreach (XEngine xe in XEngine.ScriptEngines)
|
||||
{
|
||||
if(xe.PostScriptEvent(
|
||||
if (xe.PostScriptEvent(
|
||||
rInfo.GetItemID(), new XEventParams(
|
||||
"remote_data", resobj,
|
||||
new XDetectParams[0])))
|
||||
"remote_data", resobj,
|
||||
new XDetectParams[0])))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -100,10 +100,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins
|
||||
|
||||
foreach (XEngine xe in XEngine.ScriptEngines)
|
||||
{
|
||||
if(xe.PostScriptEvent(
|
||||
if (xe.PostScriptEvent(
|
||||
srdInfo.m_itemID, new XEventParams(
|
||||
"remote_data", resobj,
|
||||
new XDetectParams[0])))
|
||||
"remote_data", resobj,
|
||||
new XDetectParams[0])))
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user