mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
seems to compile ( tests comented out)
This commit is contained in:
@@ -387,28 +387,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
public static void StateChange(IScriptEngine engine, uint localID, UUID itemID)
|
||||
{
|
||||
// Remove a specific script
|
||||
|
||||
// Remove dataserver events
|
||||
m_Dataserver[engine].RemoveEvents(localID, itemID);
|
||||
|
||||
IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
|
||||
if (comms != null)
|
||||
comms.DeleteListener(itemID);
|
||||
|
||||
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
|
||||
if (xmlrpc != null)
|
||||
{
|
||||
xmlrpc.DeleteChannels(itemID);
|
||||
xmlrpc.CancelSRDRequests(itemID);
|
||||
}
|
||||
|
||||
// Remove Sensors
|
||||
m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -829,10 +829,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
private void TeleportAgent(string agent, int regionX, int regionY,
|
||||
LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
// ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize));
|
||||
=======
|
||||
>>>>>>> avn/ubitvar
|
||||
ulong regionHandle = Util.RegionLocToHandle((uint)regionX, (uint)regionY);
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
@@ -3265,15 +3261,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
Scene scene = m_ScriptEngine.World;
|
||||
GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID);
|
||||
return new LSL_Vector((float)region.RegionSizeX, (float)region.RegionSizeX, Constants.RegionHeight);
|
||||
=======
|
||||
return new LSL_Vector((float)World.RegionInfo.RegionSizeX,
|
||||
(float)World.RegionInfo.RegionSizeY,
|
||||
(float)World.RegionInfo.RegionSizeZ );
|
||||
>>>>>>> avn/ubitvar
|
||||
return new LSL_Vector(region.RegionSizeX, region.RegionSizeY, Constants.RegionHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -739,11 +739,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
if (Position.y > ((int)Constants.RegionSize - 1))
|
||||
Position.y = ((int)Constants.RegionSize - 1);
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
if (Position.z > Constants.RegionHeight)
|
||||
Position.z = Constants.RegionHeight;
|
||||
=======
|
||||
>>>>>>> avn/ubitvar
|
||||
if (Position.x < 0)
|
||||
Position.x = 0;
|
||||
if (Position.y < 0)
|
||||
|
||||
@@ -654,7 +654,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
if (state == State)
|
||||
return;
|
||||
|
||||
<<<<<<< HEAD
|
||||
EventParams lastTimerEv = null;
|
||||
|
||||
lock (EventQueue)
|
||||
@@ -682,15 +681,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
m_StateChangeInProgress = true;
|
||||
}
|
||||
|
||||
=======
|
||||
PostEvent(new EventParams("state_exit", new Object[0],
|
||||
new DetectParams[0]));
|
||||
PostEvent(new EventParams("state", new Object[] { state },
|
||||
new DetectParams[0]));
|
||||
PostEvent(new EventParams("state_entry", new Object[0],
|
||||
new DetectParams[0]));
|
||||
|
||||
>>>>>>> avn/ubitvar
|
||||
throw new EventAbortException();
|
||||
}
|
||||
|
||||
@@ -789,9 +779,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
if (!Running)
|
||||
return 0;
|
||||
|
||||
lock (m_Script)
|
||||
{
|
||||
// m_log.DebugFormat("[XEngine]: EventProcessor() invoked for {0}.{1}", PrimName, ScriptName);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (Suspended)
|
||||
return 0;
|
||||
|
||||
@@ -817,14 +808,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
lock (EventQueue)
|
||||
{
|
||||
data = (EventParams)EventQueue.Dequeue();
|
||||
=======
|
||||
if (Suspended)
|
||||
return 0;
|
||||
|
||||
lock (EventQueue)
|
||||
{
|
||||
data = (EventParams) EventQueue.Dequeue();
|
||||
>>>>>>> avn/ubitvar
|
||||
if (data == null) // Shouldn't happen
|
||||
{
|
||||
if (EventQueue.Count > 0 && Running && !ShuttingDown)
|
||||
@@ -849,7 +832,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
m_CollisionInQueue = false;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (DebugLevel >= 2)
|
||||
m_log.DebugFormat(
|
||||
"[SCRIPT INSTANCE]: Processing event {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}",
|
||||
@@ -879,26 +861,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
Part.ParentGroup.UUID,
|
||||
Part.AbsolutePosition,
|
||||
Part.ParentGroup.Scene.Name);
|
||||
=======
|
||||
lock(m_Script)
|
||||
{
|
||||
|
||||
// m_log.DebugFormat("[XEngine]: Processing event {0} for {1}", data.EventName, this);
|
||||
SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
|
||||
|
||||
if (DebugLevel >= 2)
|
||||
m_log.DebugFormat(
|
||||
"[SCRIPT INSTANCE]: Processing event {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}",
|
||||
data.EventName,
|
||||
ScriptName,
|
||||
part.Name,
|
||||
part.LocalId,
|
||||
part.ParentGroup.Name,
|
||||
part.ParentGroup.UUID,
|
||||
part.AbsolutePosition,
|
||||
part.ParentGroup.Scene.Name);
|
||||
>>>>>>> avn/ubitvar
|
||||
|
||||
AsyncCommandManager.StateChange(Engine,
|
||||
LocalID, ItemID);
|
||||
// we are effectively in the new state now, so we can resume queueing
|
||||
@@ -915,35 +877,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
// m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}",
|
||||
// PrimName, ScriptName, data.EventName, State);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
try
|
||||
=======
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[SCRIPT INSTANCE]: Changing state to {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}",
|
||||
State,
|
||||
ScriptName,
|
||||
part.Name,
|
||||
part.LocalId,
|
||||
part.ParentGroup.Name,
|
||||
part.ParentGroup.UUID,
|
||||
part.AbsolutePosition,
|
||||
part.ParentGroup.Scene.Name);
|
||||
|
||||
AsyncCommandManager.RemoveScript(Engine,
|
||||
LocalID, ItemID);
|
||||
|
||||
if (part != null)
|
||||
{
|
||||
part.SetScriptEvents(ItemID,
|
||||
(int)m_Script.GetStateEventFlags(State));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Engine.World.PipeEventsForScript(LocalID) ||
|
||||
data.EventName == "control") // Don't freeze avies!
|
||||
>>>>>>> avn/ubitvar
|
||||
{
|
||||
m_CurrentEvent = data.EventName;
|
||||
m_EventStart = DateTime.Now;
|
||||
@@ -981,7 +916,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
&& !(e.InnerException is ScriptCoopStopException)))
|
||||
&& !(e is ThreadAbortException))
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
try
|
||||
{
|
||||
// DISPLAY ERROR INWORLD
|
||||
@@ -1004,88 +938,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
Part.AbsolutePosition,
|
||||
Part.ParentGroup.Scene.Name),
|
||||
e);
|
||||
=======
|
||||
// m_log.DebugFormat(
|
||||
// "[SCRIPT] Exception in script {0} {1}: {2}{3}",
|
||||
// ScriptName, ItemID, e.Message, e.StackTrace);
|
||||
|
||||
m_InEvent = false;
|
||||
m_CurrentEvent = String.Empty;
|
||||
|
||||
if ((!(e is TargetInvocationException)
|
||||
|| (!(e.InnerException is SelfDeleteException)
|
||||
&& !(e.InnerException is ScriptDeleteException)
|
||||
&& !(e.InnerException is ScriptCoopStopException)))
|
||||
&& !(e is ThreadAbortException))
|
||||
{
|
||||
try
|
||||
{
|
||||
// DISPLAY ERROR INWORLD
|
||||
string text = FormatException(e);
|
||||
|
||||
if (text.Length > 1000)
|
||||
text = text.Substring(0, 1000);
|
||||
Engine.World.SimChat(Utils.StringToBytes(text),
|
||||
ChatTypeEnum.DebugChannel, 2147483647,
|
||||
part.AbsolutePosition,
|
||||
part.Name, part.UUID, false);
|
||||
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
|
||||
ScriptName,
|
||||
PrimName,
|
||||
part.UUID,
|
||||
part.AbsolutePosition,
|
||||
part.ParentGroup.Scene.Name,
|
||||
text.Replace("\n", "\\n"),
|
||||
e.InnerException);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
// catch (Exception e2) // LEGIT: User Scripting
|
||||
// {
|
||||
// m_log.Error("[SCRIPT]: "+
|
||||
// "Error displaying error in-world: " +
|
||||
// e2.ToString());
|
||||
// m_log.Error("[SCRIPT]: " +
|
||||
// "Errormessage: Error compiling script:\r\n" +
|
||||
// e.ToString());
|
||||
// }
|
||||
}
|
||||
else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))
|
||||
{
|
||||
m_InSelfDelete = true;
|
||||
if (part != null)
|
||||
Engine.World.DeleteSceneObject(part.ParentGroup, false);
|
||||
>>>>>>> avn/ubitvar
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
m_InSelfDelete = true;
|
||||
if (part != null)
|
||||
part.Inventory.RemoveInventoryItem(ItemID);
|
||||
}
|
||||
else if ((e is TargetInvocationException) && (e.InnerException is ScriptCoopStopException))
|
||||
{
|
||||
if (DebugLevel >= 1)
|
||||
m_log.DebugFormat(
|
||||
"[SCRIPT INSTANCE]: Script {0}.{1} in event {2}, state {3} stopped co-operatively.",
|
||||
PrimName, ScriptName, data.EventName, State);
|
||||
>>>>>>> avn/ubitvar
|
||||
}
|
||||
// catch (Exception e2) // LEGIT: User Scripting
|
||||
// {
|
||||
// m_log.Error("[SCRIPT]: "+
|
||||
// "Error displaying error in-world: " +
|
||||
// e2.ToString());
|
||||
// m_log.Error("[SCRIPT]: " +
|
||||
// "Errormessage: Error compiling script:\r\n" +
|
||||
// e.ToString());
|
||||
// }
|
||||
}
|
||||
else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException))
|
||||
{
|
||||
|
||||
@@ -102,31 +102,19 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z);
|
||||
=======
|
||||
string s = String.Format(Culture.FormatProvider, "<{0:0.000000}, {1:0.000000}, {2:0.000000}>", x, y, z);
|
||||
>>>>>>> avn/ubitvar
|
||||
return s;
|
||||
}
|
||||
|
||||
public static explicit operator LSLString(Vector3 vec)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z);
|
||||
=======
|
||||
string s = String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
|
||||
>>>>>>> avn/ubitvar
|
||||
return new LSLString(s);
|
||||
}
|
||||
|
||||
public static explicit operator string(Vector3 vec)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z);
|
||||
=======
|
||||
string s = String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
|
||||
>>>>>>> avn/ubitvar
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -727,17 +715,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
private void ExtendAndAdd(object o)
|
||||
{
|
||||
object[] tmp;
|
||||
<<<<<<< HEAD
|
||||
tmp = new object[Data.Length + 1];
|
||||
Data.CopyTo(tmp, 0);
|
||||
tmp.SetValue(o, tmp.Length - 1);
|
||||
Data = tmp;
|
||||
=======
|
||||
tmp = new object[m_data.Length + 1];
|
||||
m_data.CopyTo(tmp, 0);
|
||||
tmp.SetValue(o, tmp.Length - 1);
|
||||
m_data = tmp;
|
||||
>>>>>>> avn/ubitvar
|
||||
}
|
||||
|
||||
public static list operator +(list a, LSLString s)
|
||||
|
||||
Reference in New Issue
Block a user