diff options
author | Jeff Ames | 2008-08-28 14:41:54 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-28 14:41:54 +0000 |
commit | 3bf88587277b83c0b6f058fabba7d46a3b5a6a00 (patch) | |
tree | ed4ad9dc27e649a6f52661665fb681984251f480 /OpenSim/Region/ScriptEngine | |
parent | Thannk you, Ralphos, for a patch the corrects an improper cast in (diff) | |
download | opensim-SC_OLD-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.zip opensim-SC_OLD-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.gz opensim-SC_OLD-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.bz2 opensim-SC_OLD-3bf88587277b83c0b6f058fabba7d46a3b5a6a00.tar.xz |
Update svn properties, formatting cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
3 files changed, 38 insertions, 39 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 9fdf3ce..f10a854 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -2296,7 +2296,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2296 | bool found = false; | 2296 | bool found = false; |
2297 | 2297 | ||
2298 | float dist = (float)llVecDist(llGetPos(), pos); | 2298 | float dist = (float)llVecDist(llGetPos(), pos); |
2299 | if(dist > m_distanceFactor * 10.0f) | 2299 | if (dist > m_distanceFactor * 10.0f) |
2300 | return; | 2300 | return; |
2301 | 2301 | ||
2302 | // Instead of using return;, I'm using continue; because in our TaskInventory implementation | 2302 | // Instead of using return;, I'm using continue; because in our TaskInventory implementation |
@@ -6247,7 +6247,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6247 | switch (primType) | 6247 | switch (primType) |
6248 | { | 6248 | { |
6249 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: | 6249 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: |
6250 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: | 6250 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: |
6251 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: | 6251 | case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: |
6252 | res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); | 6252 | res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); |
6253 | res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); | 6253 | res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); |
@@ -6298,10 +6298,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6298 | // vector tapera | 6298 | // vector tapera |
6299 | res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); | 6299 | res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); |
6300 | 6300 | ||
6301 | // float revolutions, | 6301 | // float revolutions, |
6302 | res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( | 6302 | res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( |
6303 | 6303 | ||
6304 | // float radiusoffset, | 6304 | // float radiusoffset, |
6305 | res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); | 6305 | res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); |
6306 | 6306 | ||
6307 | // float skew | 6307 | // float skew |
@@ -7014,10 +7014,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7014 | { | 7014 | { |
7015 | case 5: // DATA_SIM_POS | 7015 | case 5: // DATA_SIM_POS |
7016 | if (info == null) | 7016 | if (info == null) |
7017 | { | 7017 | { |
7018 | // ScriptSleep(1000); | 7018 | // ScriptSleep(1000); |
7019 | return LLUUID.Zero.ToString(); | 7019 | return LLUUID.Zero.ToString(); |
7020 | } | 7020 | } |
7021 | reply = new LSL_Types.Vector3( | 7021 | reply = new LSL_Types.Vector3( |
7022 | info.RegionLocX * Constants.RegionSize, | 7022 | info.RegionLocX * Constants.RegionSize, |
7023 | info.RegionLocY * Constants.RegionSize, | 7023 | info.RegionLocY * Constants.RegionSize, |
@@ -7031,10 +7031,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7031 | break; | 7031 | break; |
7032 | case 7: // DATA_SIM_RATING | 7032 | case 7: // DATA_SIM_RATING |
7033 | if (info == null) | 7033 | if (info == null) |
7034 | { | 7034 | { |
7035 | // ScriptSleep(1000); | 7035 | // ScriptSleep(1000); |
7036 | return LLUUID.Zero.ToString(); | 7036 | return LLUUID.Zero.ToString(); |
7037 | } | 7037 | } |
7038 | int access = info.RegionSettings.Maturity; | 7038 | int access = info.RegionSettings.Maturity; |
7039 | if (access == 0) | 7039 | if (access == 0) |
7040 | reply = "PG"; | 7040 | reply = "PG"; |
@@ -7047,18 +7047,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7047 | reply = m_ScriptEngine.World.GetSimulatorVersion(); | 7047 | reply = m_ScriptEngine.World.GetSimulatorVersion(); |
7048 | break; | 7048 | break; |
7049 | default: | 7049 | default: |
7050 | // ScriptSleep(1000); | 7050 | // ScriptSleep(1000); |
7051 | return LLUUID.Zero.ToString(); // Raise no event | 7051 | return LLUUID.Zero.ToString(); // Raise no event |
7052 | } | 7052 | } |
7053 | LLUUID rq = LLUUID.Random(); | 7053 | LLUUID rq = LLUUID.Random(); |
7054 | 7054 | ||
7055 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. | 7055 | LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. |
7056 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); | 7056 | m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); |
7057 | 7057 | ||
7058 | m_ScriptEngine.m_ASYNCLSLCommandManager. | 7058 | m_ScriptEngine.m_ASYNCLSLCommandManager. |
7059 | m_Dataserver.DataserverReply(rq.ToString(), reply); | 7059 | m_Dataserver.DataserverReply(rq.ToString(), reply); |
7060 | 7060 | ||
7061 | // ScriptSleep(1000); | 7061 | // ScriptSleep(1000); |
7062 | return tid.ToString(); | 7062 | return tid.ToString(); |
7063 | } | 7063 | } |
7064 | catch(Exception e) | 7064 | catch(Exception e) |
@@ -8041,12 +8041,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
8041 | (line >= 0) && | 8041 | (line >= 0) && |
8042 | (line < notecardLines.Length)) | 8042 | (line < notecardLines.Length)) |
8043 | { | 8043 | { |
8044 | // ScriptSleep(100); | 8044 | // ScriptSleep(100); |
8045 | return notecardLines[line]; | 8045 | return notecardLines[line]; |
8046 | } | 8046 | } |
8047 | else | 8047 | else |
8048 | { | 8048 | { |
8049 | // ScriptSleep(100); | 8049 | // ScriptSleep(100); |
8050 | return String.Empty; | 8050 | return String.Empty; |
8051 | } | 8051 | } |
8052 | } | 8052 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b48edfb..b5ca167 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2130,7 +2130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2130 | { | 2130 | { |
2131 | float dist = (float)llVecMag(llGetPos() - pos); | 2131 | float dist = (float)llVecMag(llGetPos() - pos); |
2132 | 2132 | ||
2133 | if(dist > m_ScriptDistanceFactor * 10.0f) | 2133 | if (dist > m_ScriptDistanceFactor * 10.0f) |
2134 | return; | 2134 | return; |
2135 | 2135 | ||
2136 | m_host.AddScriptLPS(1); | 2136 | m_host.AddScriptLPS(1); |
@@ -5735,8 +5735,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5735 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: | 5735 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: |
5736 | if (remain < 5) | 5736 | if (remain < 5) |
5737 | return; | 5737 | return; |
5738 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); | 5738 | LSL_Types.LSLInteger light = new LSL_Types.LSLInteger(rules.Data[idx++].ToString()); |
5739 | LSL_Types.Vector3 lightcolor =new LSL_Types.Vector3(rules.Data[idx++].ToString()); | 5739 | LSL_Types.Vector3 lightcolor = new LSL_Types.Vector3(rules.Data[idx++].ToString()); |
5740 | float intensity = (float)Convert.ToDouble(rules.Data[idx++]); | 5740 | float intensity = (float)Convert.ToDouble(rules.Data[idx++]); |
5741 | float radius = (float)Convert.ToDouble(rules.Data[idx++]); | 5741 | float radius = (float)Convert.ToDouble(rules.Data[idx++]); |
5742 | float falloff = (float)Convert.ToDouble(rules.Data[idx++]); | 5742 | float falloff = (float)Convert.ToDouble(rules.Data[idx++]); |
@@ -6895,10 +6895,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6895 | { | 6895 | { |
6896 | case 5: // DATA_SIM_POS | 6896 | case 5: // DATA_SIM_POS |
6897 | if (info == null) | 6897 | if (info == null) |
6898 | { | 6898 | { |
6899 | // ScriptSleep(1000); | 6899 | // ScriptSleep(1000); |
6900 | return LLUUID.Zero.ToString(); | 6900 | return LLUUID.Zero.ToString(); |
6901 | } | 6901 | } |
6902 | reply = new LSL_Types.Vector3( | 6902 | reply = new LSL_Types.Vector3( |
6903 | info.RegionLocX * Constants.RegionSize, | 6903 | info.RegionLocX * Constants.RegionSize, |
6904 | info.RegionLocY * Constants.RegionSize, | 6904 | info.RegionLocY * Constants.RegionSize, |
@@ -6912,10 +6912,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6912 | break; | 6912 | break; |
6913 | case 7: // DATA_SIM_RATING | 6913 | case 7: // DATA_SIM_RATING |
6914 | if (info == null) | 6914 | if (info == null) |
6915 | { | 6915 | { |
6916 | // ScriptSleep(1000); | 6916 | // ScriptSleep(1000); |
6917 | return LLUUID.Zero.ToString(); | 6917 | return LLUUID.Zero.ToString(); |
6918 | } | 6918 | } |
6919 | int access = info.RegionSettings.Maturity; | 6919 | int access = info.RegionSettings.Maturity; |
6920 | if (access == 0) | 6920 | if (access == 0) |
6921 | reply = "PG"; | 6921 | reply = "PG"; |
@@ -6928,7 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6928 | reply = m_ScriptEngine.World.GetSimulatorVersion(); | 6928 | reply = m_ScriptEngine.World.GetSimulatorVersion(); |
6929 | break; | 6929 | break; |
6930 | default: | 6930 | default: |
6931 | // ScriptSleep(1000); | 6931 | // ScriptSleep(1000); |
6932 | return LLUUID.Zero.ToString(); // Raise no event | 6932 | return LLUUID.Zero.ToString(); // Raise no event |
6933 | } | 6933 | } |
6934 | LLUUID rq = LLUUID.Random(); | 6934 | LLUUID rq = LLUUID.Random(); |
@@ -6939,7 +6939,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6939 | AsyncCommands. | 6939 | AsyncCommands. |
6940 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 6940 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
6941 | 6941 | ||
6942 | // ScriptSleep(1000); | 6942 | // ScriptSleep(1000); |
6943 | return tid.ToString(); | 6943 | return tid.ToString(); |
6944 | } | 6944 | } |
6945 | catch(Exception e) | 6945 | catch(Exception e) |
@@ -7910,7 +7910,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7910 | AsyncCommands. | 7910 | AsyncCommands. |
7911 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), | 7911 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), |
7912 | NotecardCache.GetLines(item.AssetID).ToString()); | 7912 | NotecardCache.GetLines(item.AssetID).ToString()); |
7913 | // ScriptSleep(100); | 7913 | // ScriptSleep(100); |
7914 | return tid.ToString(); | 7914 | return tid.ToString(); |
7915 | } | 7915 | } |
7916 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) | 7916 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) |
@@ -7924,7 +7924,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7924 | DataserverPlugin.DataserverReply(id.ToString(), | 7924 | DataserverPlugin.DataserverReply(id.ToString(), |
7925 | NotecardCache.GetLines(id).ToString()); | 7925 | NotecardCache.GetLines(id).ToString()); |
7926 | }); | 7926 | }); |
7927 | // ScriptSleep(100); | 7927 | // ScriptSleep(100); |
7928 | return tid.ToString(); | 7928 | return tid.ToString(); |
7929 | } | 7929 | } |
7930 | } | 7930 | } |
@@ -7948,7 +7948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7948 | AsyncCommands. | 7948 | AsyncCommands. |
7949 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), | 7949 | DataserverPlugin.DataserverReply(item.AssetID.ToString(), |
7950 | NotecardCache.GetLine(item.AssetID, line)); | 7950 | NotecardCache.GetLine(item.AssetID, line)); |
7951 | // ScriptSleep(100); | 7951 | // ScriptSleep(100); |
7952 | return tid.ToString(); | 7952 | return tid.ToString(); |
7953 | } | 7953 | } |
7954 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) | 7954 | WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) |
@@ -7963,7 +7963,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7963 | NotecardCache.GetLine(id, line)); | 7963 | NotecardCache.GetLine(id, line)); |
7964 | }); | 7964 | }); |
7965 | 7965 | ||
7966 | // ScriptSleep(100); | 7966 | // ScriptSleep(100); |
7967 | return tid.ToString(); | 7967 | return tid.ToString(); |
7968 | } | 7968 | } |
7969 | } | 7969 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 3a01dc6..d431286 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -89,7 +89,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
89 | det[0].Key = remoteClient.AgentId; | 89 | det[0].Key = remoteClient.AgentId; |
90 | det[0].Populate(myScriptEngine.World); | 90 | det[0].Populate(myScriptEngine.World); |
91 | 91 | ||
92 | |||
93 | if (originalID == 0) | 92 | if (originalID == 0) |
94 | { | 93 | { |
95 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID); | 94 | SceneObjectPart part = myScriptEngine.World.GetSceneObjectPart(localID); |
@@ -103,7 +102,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
103 | SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID); | 102 | SceneObjectPart originalPart = myScriptEngine.World.GetSceneObjectPart(originalID); |
104 | det[0].LinkNum = originalPart.LinkNum; | 103 | det[0].LinkNum = originalPart.LinkNum; |
105 | } | 104 | } |
106 | 105 | ||
107 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 106 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
108 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, | 107 | "touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, |
109 | det)); | 108 | det)); |