De-tabify source.

0.6.0-stable
Jeff Ames 2008-05-06 22:41:38 +00:00
parent 0b09966c7e
commit 0ea48cf786
9 changed files with 533 additions and 527 deletions

View File

@ -198,7 +198,6 @@ namespace OpenSim.Data.MSSQL
while (reader.Read()) while (reader.Read())
items.Add(readInventoryFolder(reader)); items.Add(readInventoryFolder(reader));
reader.Close(); reader.Close();
result.Dispose(); result.Dispose();
@ -321,12 +320,12 @@ namespace OpenSim.Data.MSSQL
item.Creator = new LLUUID((string) reader["creatorID"]); item.Creator = new LLUUID((string) reader["creatorID"]);
item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]); item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]); item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
item.SalePrice = (int) reader["salePrice"]; item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]); item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"]; item.CreationDate = (int) reader["creationDate"];
item.GroupID = new LLUUID(reader["groupID"].ToString()); item.GroupID = new LLUUID(reader["groupID"].ToString());
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
item.Flags = (uint) reader["flags"]; item.Flags = (uint) reader["flags"];
return item; return item;
} }

View File

@ -333,7 +333,7 @@ namespace OpenSim.Data.MySQL
item.Creator = new LLUUID((string) reader["creatorID"]); item.Creator = new LLUUID((string) reader["creatorID"]);
item.BasePermissions = (uint) reader["inventoryBasePermissions"]; item.BasePermissions = (uint) reader["inventoryBasePermissions"];
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
item.SalePrice = (int) reader["salePrice"]; item.SalePrice = (int) reader["salePrice"];
item.SaleType = Convert.ToByte(reader["saleType"]); item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = (int) reader["creationDate"]; item.CreationDate = (int) reader["creationDate"];
item.GroupID = new LLUUID(reader["groupID"].ToString()); item.GroupID = new LLUUID(reader["groupID"].ToString());

View File

@ -237,14 +237,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
// Outside of this method, they should never be added to objectflags! // Outside of this method, they should never be added to objectflags!
// -teravus // -teravus
SceneObjectPart task=m_scene.GetSceneObjectPart(objID); SceneObjectPart task=m_scene.GetSceneObjectPart(objID);
// this shouldn't ever happen.. return no permissions/objectflags. // this shouldn't ever happen.. return no permissions/objectflags.
if (task == null) if (task == null)
return (uint)0; return (uint)0;
uint objflags = task.GetEffectiveObjectFlags(); uint objflags = task.GetEffectiveObjectFlags();
LLUUID objectOwner = task.OwnerID; LLUUID objectOwner = task.OwnerID;
// Remove any of the objectFlags that are temporary. These will get added back if appropriate // Remove any of the objectFlags that are temporary. These will get added back if appropriate

View File

@ -193,7 +193,7 @@ namespace OpenSim.Region.Environment.Scenes
// Is this prim part of the group // Is this prim part of the group
if (obj.HasChildPrim(localID)) if (obj.HasChildPrim(localID))
{ {
SceneObjectPart part=obj.GetChildPart(localID); SceneObjectPart part=obj.GetChildPart(localID);
if (part != null) if (part != null)
{ {
// If the touched prim handles touches, deliver it // If the touched prim handles touches, deliver it

View File

@ -186,8 +186,6 @@ namespace OpenSim.Region.Environment.Scenes
string.Format("[SCENE OBJECT GROUP]: Object {0} has no root part.", m_uuid)); string.Format("[SCENE OBJECT GROUP]: Object {0} has no root part.", m_uuid));
} }
return m_rootPart.GroupPosition; return m_rootPart.GroupPosition;
} }
set set
@ -198,7 +196,6 @@ namespace OpenSim.Region.Environment.Scenes
m_scene.CrossPrimGroupIntoNewRegion(val, this); m_scene.CrossPrimGroupIntoNewRegion(val, this);
} }
lock (m_parts) lock (m_parts)
{ {
foreach (SceneObjectPart part in m_parts.Values) foreach (SceneObjectPart part in m_parts.Values)
@ -969,19 +966,19 @@ namespace OpenSim.Region.Environment.Scenes
public void aggregateScriptEvents() public void aggregateScriptEvents()
{ {
uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags(); uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags();
scriptEvents aggregateScriptEvents=0; scriptEvents aggregateScriptEvents=0;
lock (m_parts) lock (m_parts)
{ {
foreach (SceneObjectPart part in m_parts.Values) foreach (SceneObjectPart part in m_parts.Values)
{ {
if(part == null) if (part == null)
continue; continue;
if(part != RootPart) if (part != RootPart)
part.ObjectFlags = objectflagupdate; part.ObjectFlags = objectflagupdate;
aggregateScriptEvents |= part.m_aggregateScriptEvents; aggregateScriptEvents |= part.m_aggregateScriptEvents;
} }
} }

View File

@ -98,8 +98,8 @@ namespace OpenSim.Region.Environment.Scenes
// TODO: This needs to be persisted in next XML version update! // TODO: This needs to be persisted in next XML version update!
[XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>();
[XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0;
[XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
[XmlIgnore] public bool DIE_AT_EDGE = false; [XmlIgnore] public bool DIE_AT_EDGE = false;
@ -190,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes
set { m_name = value; } set { m_name = value; }
} }
public scriptEvents ScriptEvents public scriptEvents ScriptEvents
{ {
get { return m_aggregateScriptEvents; } get { return m_aggregateScriptEvents; }
} }
protected LLObject.MaterialType m_material = 0; protected LLObject.MaterialType m_material = 0;
@ -211,14 +211,14 @@ namespace OpenSim.Region.Environment.Scenes
set { m_regionHandle = value; } set { m_regionHandle = value; }
} }
public uint GetEffectiveObjectFlags() public uint GetEffectiveObjectFlags()
{ {
LLObject.ObjectFlags f=Flags; LLObject.ObjectFlags f = Flags;
if(m_parentGroup == null || m_parentGroup.RootPart == this) if (m_parentGroup == null || m_parentGroup.RootPart == this)
f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money); f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money);
return (uint)Flags | (uint)LocalFlags; return (uint)Flags | (uint)LocalFlags;
} }
//unkown if this will be kept, added as a way of removing the group position from the group class //unkown if this will be kept, added as a way of removing the group position from the group class
protected LLVector3 m_groupPosition; protected LLVector3 m_groupPosition;
@ -2158,14 +2158,14 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
if(soundID == LLUUID.Zero) if (soundID == LLUUID.Zero)
return; return;
List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars();
foreach (ScenePresence p in avatarts) foreach (ScenePresence p in avatarts)
{ {
double dis=Util.GetDistanceTo(p.AbsolutePosition, position); double dis=Util.GetDistanceTo(p.AbsolutePosition, position);
if(dis > 100.0) // Max audio distance if (dis > 100.0) // Max audio distance
continue; continue;
// Scale by distance // Scale by distance
@ -2623,25 +2623,25 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
public void SetScriptEvents(LLUUID scriptid, int events) public void SetScriptEvents(LLUUID scriptid, int events)
{ {
scriptEvents oldparts; scriptEvents oldparts;
lock (m_scriptEvents) lock (m_scriptEvents)
{ {
if (m_scriptEvents.ContainsKey(scriptid)) if (m_scriptEvents.ContainsKey(scriptid))
{ {
oldparts = m_scriptEvents[scriptid]; oldparts = m_scriptEvents[scriptid];
// remove values from aggregated script events // remove values from aggregated script events
m_scriptEvents[scriptid] = (scriptEvents) events; m_scriptEvents[scriptid] = (scriptEvents) events;
} }
else else
{ {
m_scriptEvents.Add(scriptid, (scriptEvents) events); m_scriptEvents.Add(scriptid, (scriptEvents) events);
} }
} }
aggregateScriptEvents(); aggregateScriptEvents();
} }
public void RemoveScriptEvents(LLUUID scriptid) public void RemoveScriptEvents(LLUUID scriptid)
{ {
@ -2710,16 +2710,15 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
LocalFlags=(LLObject.ObjectFlags)objectflagupdate; LocalFlags=(LLObject.ObjectFlags)objectflagupdate;
if(m_parentGroup != null && m_parentGroup.RootPart == this) if (m_parentGroup != null && m_parentGroup.RootPart == this)
m_parentGroup.aggregateScriptEvents(); m_parentGroup.aggregateScriptEvents();
else else
ScheduleFullUpdate(); ScheduleFullUpdate();
} }
public void PhysicsCollision(EventArgs e) public void PhysicsCollision(EventArgs e)
{ {
return; return;
// //
@ -2733,7 +2732,6 @@ namespace OpenSim.Region.Environment.Scenes
//{ //{
// m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString()); // m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString());
//} //}
} }
public void SetDieAtEdge(bool p) public void SetDieAtEdge(bool p)
@ -2755,5 +2753,4 @@ namespace OpenSim.Region.Environment.Scenes
return m_parentGroup.RootPart.DIE_AT_EDGE; return m_parentGroup.RootPart.DIE_AT_EDGE;
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -64,11 +64,11 @@ namespace OpenSim.Region.ScriptEngine.Common
str = str.Replace('<', ' '); str = str.Replace('<', ' ');
str = str.Replace('>', ' '); str = str.Replace('>', ' ');
string[] tmps = str.Split(new Char[] { ',', '<', '>' }); string[] tmps = str.Split(new Char[] { ',', '<', '>' });
if(tmps.Length < 3) if (tmps.Length < 3)
{ {
x=y=z=0; x=y=z=0;
return; return;
} }
bool res; bool res;
res = Double.TryParse(tmps[0], out x); res = Double.TryParse(tmps[0], out x);
res = res & Double.TryParse(tmps[1], out y); res = res & Double.TryParse(tmps[1], out y);
@ -81,26 +81,26 @@ namespace OpenSim.Region.ScriptEngine.Common
public override string ToString() public override string ToString()
{ {
string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z);
return s; return s;
} }
public static explicit operator LSLString(Vector3 vec) public static explicit operator LSLString(Vector3 vec)
{ {
string s=String.Format("<{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);
return new LSLString(s); return new LSLString(s);
} }
public static explicit operator string(Vector3 vec) public static explicit operator string(Vector3 vec)
{ {
string s=String.Format("<{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);
return s; return s;
} }
public static explicit operator Vector3(string s) public static explicit operator Vector3(string s)
{ {
return new Vector3(s); return new Vector3(s);
} }
public static bool operator ==(Vector3 lhs, Vector3 rhs) public static bool operator ==(Vector3 lhs, Vector3 rhs)
{ {
@ -296,11 +296,11 @@ namespace OpenSim.Region.ScriptEngine.Common
str = str.Replace('<', ' '); str = str.Replace('<', ' ');
str = str.Replace('>', ' '); str = str.Replace('>', ' ');
string[] tmps = str.Split(new Char[] { ',', '<', '>' }); string[] tmps = str.Split(new Char[] { ',', '<', '>' });
if(tmps.Length < 4) if (tmps.Length < 4)
{ {
x=y=z=s=0; x=y=z=s=0;
return; return;
} }
bool res; bool res;
res = Double.TryParse(tmps[0], out x); res = Double.TryParse(tmps[0], out x);
res = res & Double.TryParse(tmps[1], out y); res = res & Double.TryParse(tmps[1], out y);
@ -330,26 +330,26 @@ namespace OpenSim.Region.ScriptEngine.Common
public override string ToString() public override string ToString()
{ {
string st=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s); string st=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s);
return st; return st;
} }
public static explicit operator string(Quaternion r) public static explicit operator string(Quaternion r)
{ {
string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s);
return s; return s;
} }
public static explicit operator LSLString(Quaternion r) public static explicit operator LSLString(Quaternion r)
{ {
string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s); string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", r.x, r.y, r.z, r.s);
return new LSLString(s); return new LSLString(s);
} }
public static explicit operator Quaternion(string s) public static explicit operator Quaternion(string s)
{ {
return new Quaternion(s); return new Quaternion(s);
} }
public static bool operator ==(Quaternion lhs, Quaternion rhs) public static bool operator ==(Quaternion lhs, Quaternion rhs)
{ {
@ -406,19 +406,19 @@ namespace OpenSim.Region.ScriptEngine.Common
public int Length public int Length
{ {
get { get {
if(m_data == null) if (m_data == null)
m_data=new Object[0]; m_data=new Object[0];
return m_data.Length; return m_data.Length;
} }
} }
public object[] Data public object[] Data
{ {
get { get {
if(m_data == null) if (m_data == null)
m_data=new Object[0]; m_data=new Object[0];
return m_data; return m_data;
} }
} }
public static list operator +(list a, list b) public static list operator +(list a, list b)
@ -453,67 +453,67 @@ namespace OpenSim.Region.ScriptEngine.Common
return ret; return ret;
} }
public list DeleteSublist(int start, int end) public list DeleteSublist(int start, int end)
{ {
// Not an easy one // Not an easy one
// If start <= end, remove that part // If start <= end, remove that part
// if either is negative, count from the end of the array // if either is negative, count from the end of the array
// if the resulting start > end, remove all BUT that part // if the resulting start > end, remove all BUT that part
Object[] ret; Object[] ret;
if(start < 0) if (start < 0)
start=m_data.Length-start; start=m_data.Length-start;
if(start < 0) if (start < 0)
start=0; start=0;
if(end < 0) if (end < 0)
end=m_data.Length-end; end=m_data.Length-end;
if(end < 0) if (end < 0)
end=0; end=0;
if(start > end) if (start > end)
{ {
if(end >= m_data.Length) if (end >= m_data.Length)
return new list(new Object[0]); return new list(new Object[0]);
if(start >= m_data.Length) if (start >= m_data.Length)
start=m_data.Length-1; start=m_data.Length-1;
return GetSublist(end, start); return GetSublist(end, start);
} }
// start >= 0 && end >= 0 here // start >= 0 && end >= 0 here
if(start >= m_data.Length) if (start >= m_data.Length)
{ {
ret=new Object[m_data.Length]; ret=new Object[m_data.Length];
Array.Copy(m_data, 0, ret, 0, m_data.Length); Array.Copy(m_data, 0, ret, 0, m_data.Length);
return new list(ret); return new list(ret);
} }
if(end >= m_data.Length) if (end >= m_data.Length)
end=m_data.Length-1; end=m_data.Length-1;
// now, this makes the math easier // now, this makes the math easier
int remove=end+1-start; int remove=end+1-start;
ret=new Object[m_data.Length-remove]; ret=new Object[m_data.Length-remove];
if(ret.Length == 0) if (ret.Length == 0)
return new list(ret); return new list(ret);
int src; int src;
int dest=0; int dest=0;
for(src = 0 ; src < m_data.Length ; src++) for(src = 0 ; src < m_data.Length ; src++)
{ {
if(src < start || src > end) if (src < start || src > end)
ret[dest++]=m_data[src]; ret[dest++]=m_data[src];
} }
return new list(ret); return new list(ret);
} }
public list GetSublist(int start, int end) public list GetSublist(int start, int end)
{ {
@ -581,13 +581,13 @@ namespace OpenSim.Region.ScriptEngine.Common
list result = null; list result = null;
// If end is negative, then prefix list is empty // If end is negative, then prefix list is empty
if(end < 0) if (end < 0)
{ {
result = new list(); result = new list();
// If start is still negative, then the whole of // If start is still negative, then the whole of
// the existing list is returned. This case is // the existing list is returned. This case is
// only admitted if end is also still negative. // only admitted if end is also still negative.
if(start < 0) if (start < 0)
{ {
return this; return this;
} }
@ -600,7 +600,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// If start is outside of list, then just return // If start is outside of list, then just return
// the prefix, whatever it is. // the prefix, whatever it is.
if(start >= m_data.Length) if (start >= m_data.Length)
{ {
return result; return result;
} }
@ -610,76 +610,76 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
public list Sort(int stride, int ascending) public list Sort(int stride, int ascending)
{ {
if(Data.Length == 0) if (Data.Length == 0)
return new list(); // Don't even bother return new list(); // Don't even bother
string[] keys; string[] keys;
if(stride == 1) // The simple case if (stride == 1) // The simple case
{ {
Object[] ret=new Object[Data.Length]; Object[] ret=new Object[Data.Length];
Array.Copy(Data, 0, ret, 0, Data.Length); Array.Copy(Data, 0, ret, 0, Data.Length);
keys=new string[Data.Length]; keys=new string[Data.Length];
int k; int k;
for(k=0;k<Data.Length;k++) for(k=0;k<Data.Length;k++)
keys[k]=Data[k].ToString(); keys[k]=Data[k].ToString();
Array.Sort(keys, ret); Array.Sort(keys, ret);
if(ascending == 0) if (ascending == 0)
Array.Reverse(ret); Array.Reverse(ret);
return new list(ret); return new list(ret);
} }
int src=0; int src=0;
int len=(Data.Length+stride-1)/stride; int len=(Data.Length+stride-1)/stride;
keys=new string[len]; keys=new string[len];
Object[][] vals=new Object[len][]; Object[][] vals=new Object[len][];
int i; int i;
while(src < Data.Length) while(src < Data.Length)
{ {
Object[] o=new Object[stride]; Object[] o=new Object[stride];
for(i=0;i<stride;i++) for(i=0;i<stride;i++)
{ {
if(src < Data.Length) if (src < Data.Length)
o[i]=Data[src++]; o[i]=Data[src++];
else else
{ {
o[i]=new Object(); o[i]=new Object();
src++; src++;
} }
} }
int idx=src/stride-1; int idx=src/stride-1;
keys[idx]=o[0].ToString(); keys[idx]=o[0].ToString();
vals[idx]=o; vals[idx]=o;
} }
Array.Sort(keys, vals); Array.Sort(keys, vals);
if(ascending == 0) if (ascending == 0)
{ {
Array.Reverse(vals); Array.Reverse(vals);
} }
Object[] sorted=new Object[stride*vals.Length]; Object[] sorted=new Object[stride*vals.Length];
int j; int j;
for(i=0;i<vals.Length;i++) for(i=0;i<vals.Length;i++)
for(j=0;j<stride;j++) for(j=0;j<stride;j++)
sorted[i*stride+j]=vals[i][j]; sorted[i*stride+j]=vals[i][j];
return new list(sorted); return new list(sorted);
} }
#region CSV Methods #region CSV Methods
@ -693,7 +693,7 @@ namespace OpenSim.Region.ScriptEngine.Common
string ret = ""; string ret = "";
foreach(object o in this.Data) foreach(object o in this.Data)
{ {
if(ret == "") if (ret == "")
{ {
ret = o.ToString(); ret = o.ToString();
} }
@ -720,20 +720,20 @@ namespace OpenSim.Region.ScriptEngine.Common
return output; return output;
} }
public static explicit operator String(list l) public static explicit operator String(list l)
{ {
return l.ToSoup(); return l.ToSoup();
} }
public static explicit operator LSLString(list l) public static explicit operator LSLString(list l)
{ {
return new LSLString(l.ToSoup()); return new LSLString(l.ToSoup());
} }
public override string ToString() public override string ToString()
{ {
return ToSoup(); return ToSoup();
} }
#endregion #endregion
@ -1068,7 +1068,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public override bool Equals(object o) public override bool Equals(object o)
{ {
return o.ToString() == value; return o.ToString() == value;
} }
public override int GetHashCode() public override int GetHashCode()
@ -1089,11 +1089,11 @@ namespace OpenSim.Region.ScriptEngine.Common
m_string = s; m_string = s;
} }
public LSLString(double d) public LSLString(double d)
{ {
string s=String.Format("{0:0.000000}", d); string s=String.Format("{0:0.000000}", d);
m_string=s; m_string=s;
} }
#endregion #endregion
@ -1120,10 +1120,10 @@ namespace OpenSim.Region.ScriptEngine.Common
return new LSLString(s); return new LSLString(s);
} }
public static string ToString(LSLString s) public static string ToString(LSLString s)
{ {
return s.m_string; return s.m_string;
} }
public override string ToString() public override string ToString()
{ {
@ -1140,27 +1140,27 @@ namespace OpenSim.Region.ScriptEngine.Common
return s1.m_string != s2; return s1.m_string != s2;
} }
public static explicit operator double(LSLString s) public static explicit operator double(LSLString s)
{ {
return Convert.ToDouble(s.m_string); return Convert.ToDouble(s.m_string);
} }
public static explicit operator LSLInteger(LSLString s) public static explicit operator LSLInteger(LSLString s)
{ {
return new LSLInteger(Convert.ToInt32(s.m_string)); return new LSLInteger(Convert.ToInt32(s.m_string));
} }
public static explicit operator LSLString(double d) public static explicit operator LSLString(double d)
{ {
return new LSLString(d); return new LSLString(d);
} }
#endregion #endregion
#region Overriders #region Overriders
public override bool Equals(object o) public override bool Equals(object o)
{ {
return m_string == o.ToString(); return m_string == o.ToString();
} }
public override int GetHashCode() public override int GetHashCode()
@ -1212,10 +1212,10 @@ namespace OpenSim.Region.ScriptEngine.Common
return (uint)i.value; return (uint)i.value;
} }
static public explicit operator LSLString(LSLInteger i) static public explicit operator LSLString(LSLInteger i)
{ {
return new LSLString(i.ToString()); return new LSLString(i.ToString());
} }
static public implicit operator Boolean(LSLInteger i) static public implicit operator Boolean(LSLInteger i)
{ {
@ -1234,10 +1234,10 @@ namespace OpenSim.Region.ScriptEngine.Common
return new LSLInteger(i); return new LSLInteger(i);
} }
static public explicit operator LSLInteger(string s) static public explicit operator LSLInteger(string s)
{ {
return new LSLInteger(int.Parse(s)); return new LSLInteger(int.Parse(s));
} }
static public implicit operator LSLInteger(double d) static public implicit operator LSLInteger(double d)
{ {
@ -1250,17 +1250,17 @@ namespace OpenSim.Region.ScriptEngine.Common
return ret; return ret;
} }
public static LSLInteger operator ++(LSLInteger i) public static LSLInteger operator ++(LSLInteger i)
{ {
i.value++; i.value++;
return i; return i;
} }
public static LSLInteger operator --(LSLInteger i) public static LSLInteger operator --(LSLInteger i)
{ {
i.value--; i.value--;
return i; return i;
} }
static public implicit operator System.Double(LSLInteger i) static public implicit operator System.Double(LSLInteger i)
{ {

View File

@ -295,18 +295,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
if (e.InnerException != null) if (e.InnerException != null)
{ {
// Send inner exception // Send inner exception
string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n'); string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n');
int line=0; int line=0;
foreach(string t in lines) foreach(string t in lines)
{ {
int idx=t.IndexOf("SecondLife.Script."); int idx=t.IndexOf("SecondLife.Script.");
if(idx != -1) if(idx != -1)
{ {
int colon=t.IndexOf(":"); int colon=t.IndexOf(":");
line=Convert.ToInt32(t.Substring(colon+1)); line=Convert.ToInt32(t.Substring(colon+1));
break; break;
} }
} }
text += e.InnerException.Message.ToString()+" in line "+line.ToString(); text += e.InnerException.Message.ToString()+" in line "+line.ToString();
} }
else else