diff options
Diffstat (limited to '')
8 files changed, 441 insertions, 13 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index f04574a..24d9010 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -1051,7 +1051,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1051 | NoteDeadRegion(regionHandle); | 1051 | NoteDeadRegion(regionHandle); |
1052 | return false; | 1052 | return false; |
1053 | } | 1053 | } |
1054 | catch (RemotingException e) | 1054 | catch (RemotingException) |
1055 | { | 1055 | { |
1056 | NoteDeadRegion(regionHandle); | 1056 | NoteDeadRegion(regionHandle); |
1057 | m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + | 1057 | m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 49aeaf9..8a7402c 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -67,6 +67,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
67 | protected int m_numChildAgents = 0; | 67 | protected int m_numChildAgents = 0; |
68 | protected int m_physicalPrim = 0; | 68 | protected int m_physicalPrim = 0; |
69 | 69 | ||
70 | protected int m_activeScripts = 0; | ||
71 | protected int m_scriptLPS = 0; | ||
72 | |||
70 | internal object m_syncRoot = new object(); | 73 | internal object m_syncRoot = new object(); |
71 | 74 | ||
72 | public PhysicsScene _PhyScene; | 75 | public PhysicsScene _PhyScene; |
@@ -201,6 +204,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
201 | m_physicalPrim--; | 204 | m_physicalPrim--; |
202 | } | 205 | } |
203 | 206 | ||
207 | public void AddToScriptLPS(int number) | ||
208 | { | ||
209 | m_scriptLPS += number; | ||
210 | } | ||
211 | |||
212 | public void AddActiveScripts(int number) | ||
213 | { | ||
214 | m_activeScripts += number; | ||
215 | } | ||
216 | |||
204 | public void RemovePrim(uint localID, LLUUID avatar_deleter) | 217 | public void RemovePrim(uint localID, LLUUID avatar_deleter) |
205 | { | 218 | { |
206 | List<EntityBase> EntityList = GetEntities(); | 219 | List<EntityBase> EntityList = GetEntities(); |
@@ -322,6 +335,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
322 | return m_physicalPrim; | 335 | return m_physicalPrim; |
323 | } | 336 | } |
324 | 337 | ||
338 | public int GetActiveScripts() | ||
339 | { | ||
340 | return m_activeScripts; | ||
341 | } | ||
342 | |||
343 | public int GetScriptLPS() | ||
344 | { | ||
345 | int returnval = m_scriptLPS; | ||
346 | m_scriptLPS = 0; | ||
347 | return returnval; | ||
348 | } | ||
325 | #endregion | 349 | #endregion |
326 | 350 | ||
327 | #region Get Methods | 351 | #region Get Methods |
@@ -546,10 +570,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
546 | 570 | ||
547 | //m_log.Info("[DISTANCE]: " + distResult.ToString()); | 571 | //m_log.Info("[DISTANCE]: " + distResult.ToString()); |
548 | 572 | ||
549 | if (distResult > 60) | ||
550 | { | ||
551 | int x = 0; | ||
552 | } | ||
553 | if (distResult < presence.DrawDistance) | 573 | if (distResult < presence.DrawDistance) |
554 | { | 574 | { |
555 | // Send Only if we don't already know about it. | 575 | // Send Only if we don't already know about it. |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a724ac0..d0acded 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -639,6 +639,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
639 | m_statsReporter.addFrameMS(frameMS); | 639 | m_statsReporter.addFrameMS(frameMS); |
640 | m_statsReporter.addPhysicsMS(physicsMS); | 640 | m_statsReporter.addPhysicsMS(physicsMS); |
641 | m_statsReporter.addOtherMS(otherMS); | 641 | m_statsReporter.addOtherMS(otherMS); |
642 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); | ||
643 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); | ||
642 | 644 | ||
643 | } | 645 | } |
644 | catch (NotImplementedException) | 646 | catch (NotImplementedException) |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 0956f74..1e99079 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -93,6 +93,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
93 | part.StartScripts(); | 93 | part.StartScripts(); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | |||
97 | public void StopScripts() | ||
98 | { | ||
99 | lock (m_parts) | ||
100 | { | ||
101 | foreach (SceneObjectPart part in m_parts.Values) | ||
102 | { | ||
103 | part.StopScripts(); | ||
104 | } | ||
105 | } | ||
106 | } | ||
96 | 107 | ||
97 | /// Start a given script. | 108 | /// Start a given script. |
98 | /// </summary> | 109 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 4fe7b55..eb5a80c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1702,6 +1702,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
1702 | m_parts.Clear(); | 1702 | m_parts.Clear(); |
1703 | } | 1703 | } |
1704 | 1704 | ||
1705 | public void AddScriptLPS(int count) | ||
1706 | { | ||
1707 | InnerScene d = m_scene.m_innerScene; | ||
1708 | d.AddToScriptLPS(count); | ||
1709 | } | ||
1710 | |||
1711 | public void AddActiveScriptCount(int count) | ||
1712 | { | ||
1713 | InnerScene d = m_scene.m_innerScene; | ||
1714 | d.AddActiveScripts(count); | ||
1715 | } | ||
1716 | |||
1705 | public override void SetText(string text, Vector3 color, double alpha) | 1717 | public override void SetText(string text, Vector3 color, double alpha) |
1706 | { | 1718 | { |
1707 | Color = Color.FromArgb(0xff - (int) (alpha*0xff), | 1719 | Color = Color.FromArgb(0xff - (int) (alpha*0xff), |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d9ee94c..e8ffe0e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -125,6 +125,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | } | 125 | } |
126 | } | 126 | } |
127 | } | 127 | } |
128 | |||
129 | public void StopScripts() | ||
130 | { | ||
131 | lock (m_taskInventory) | ||
132 | { | ||
133 | foreach (TaskInventoryItem item in m_taskInventory.Values) | ||
134 | { | ||
135 | if (10 == item.Type) | ||
136 | { | ||
137 | StopScript(item.ItemID); | ||
138 | } | ||
139 | } | ||
140 | } | ||
141 | } | ||
128 | 142 | ||
129 | /// <summary> | 143 | /// <summary> |
130 | /// Start a script which is in this prim's inventory. | 144 | /// Start a script which is in this prim's inventory. |
@@ -144,6 +158,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | { | 158 | { |
145 | string script = Helpers.FieldToUTF8String(rezAsset.Data); | 159 | string script = Helpers.FieldToUTF8String(rezAsset.Data); |
146 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); | 160 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); |
161 | |||
147 | } | 162 | } |
148 | else | 163 | else |
149 | { | 164 | { |
@@ -167,6 +182,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
167 | if (m_taskInventory.ContainsKey(itemId)) | 182 | if (m_taskInventory.ContainsKey(itemId)) |
168 | { | 183 | { |
169 | StartScript(m_taskInventory[itemId]); | 184 | StartScript(m_taskInventory[itemId]); |
185 | m_parentGroup.AddActiveScriptCount(1); | ||
170 | } | 186 | } |
171 | else | 187 | else |
172 | { | 188 | { |
@@ -187,6 +203,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
187 | if (m_taskInventory.ContainsKey(itemId)) | 203 | if (m_taskInventory.ContainsKey(itemId)) |
188 | { | 204 | { |
189 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); | 205 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); |
206 | m_parentGroup.AddActiveScriptCount(-1); | ||
190 | } | 207 | } |
191 | else | 208 | else |
192 | { | 209 | { |
@@ -295,6 +312,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
295 | return false; | 312 | return false; |
296 | } | 313 | } |
297 | 314 | ||
315 | public void AddScriptLPS(int count) | ||
316 | { | ||
317 | m_parentGroup.AddScriptLPS(count); | ||
318 | } | ||
319 | |||
298 | /// <summary> | 320 | /// <summary> |
299 | /// Remove an item from this prim's inventory | 321 | /// Remove an item from this prim's inventory |
300 | /// </summary> | 322 | /// </summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs index 3bd7e4a..f2cefb5 100644 --- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs | |||
@@ -51,10 +51,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
51 | PhysicsMS = 7, | 51 | PhysicsMS = 7, |
52 | AgentMS = 8, | 52 | AgentMS = 8, |
53 | ImageMS = 9, | 53 | ImageMS = 9, |
54 | ScriptMS = 10, | ||
54 | TotalPrim = 11, | 55 | TotalPrim = 11, |
55 | ActivePrim = 12, | 56 | ActivePrim = 12, |
56 | Agents = 13, | 57 | Agents = 13, |
57 | ChildAgents = 14, | 58 | ChildAgents = 14, |
59 | ActiveScripts = 15, | ||
60 | ScriptLinesPerSecond = 16, | ||
58 | InPacketsPerSecond = 17, | 61 | InPacketsPerSecond = 17, |
59 | OutPacketsPerSecond = 18, | 62 | OutPacketsPerSecond = 18, |
60 | PendingDownloads = 19, | 63 | PendingDownloads = 19, |
@@ -74,12 +77,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | private int m_fps = 0; | 77 | private int m_fps = 0; |
75 | private float m_pfps = 0; | 78 | private float m_pfps = 0; |
76 | private int m_agentUpdates = 0; | 79 | private int m_agentUpdates = 0; |
80 | |||
77 | private int m_frameMS = 0; | 81 | private int m_frameMS = 0; |
78 | private int m_netMS = 0; | 82 | private int m_netMS = 0; |
79 | private int m_agentMS = 0; | 83 | private int m_agentMS = 0; |
80 | private int m_physicsMS = 0; | 84 | private int m_physicsMS = 0; |
81 | private int m_imageMS = 0; | 85 | private int m_imageMS = 0; |
82 | private int m_otherMS = 0; | 86 | private int m_otherMS = 0; |
87 | private int m_scriptMS = 0; | ||
88 | |||
83 | private int m_rootAgents = 0; | 89 | private int m_rootAgents = 0; |
84 | private int m_childAgents = 0; | 90 | private int m_childAgents = 0; |
85 | private int m_numPrim = 0; | 91 | private int m_numPrim = 0; |
@@ -89,9 +95,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
89 | private int m_unAckedBytes = 0; | 95 | private int m_unAckedBytes = 0; |
90 | private int m_pendingDownloads = 0; | 96 | private int m_pendingDownloads = 0; |
91 | private int m_pendingUploads = 0; | 97 | private int m_pendingUploads = 0; |
98 | private int m_activeScripts = 0; | ||
99 | private int m_scriptLinesPerSecond = 0; | ||
92 | 100 | ||
93 | 101 | ||
94 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[19]; | 102 | SimStatsPacket.StatBlock[] sb = new SimStatsPacket.StatBlock[21]; |
95 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); | 103 | SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock(); |
96 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); | 104 | SimStatsPacket statpack = (SimStatsPacket)PacketPool.Instance.GetPacket(PacketType.SimStats); |
97 | 105 | ||
@@ -106,7 +114,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | 114 | ||
107 | statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000); | 115 | statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000); |
108 | ReportingRegion = regionData; | 116 | ReportingRegion = regionData; |
109 | for (int i = 0; i<19;i++) | 117 | for (int i = 0; i<21;i++) |
110 | { | 118 | { |
111 | sb[i] = new SimStatsPacket.StatBlock(); | 119 | sb[i] = new SimStatsPacket.StatBlock(); |
112 | } | 120 | } |
@@ -222,6 +230,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
222 | sb[18].StatID = (uint)Stats.PendingUploads; | 230 | sb[18].StatID = (uint)Stats.PendingUploads; |
223 | sb[18].StatValue = m_pendingUploads; | 231 | sb[18].StatValue = m_pendingUploads; |
224 | 232 | ||
233 | sb[19].StatID = (uint)Stats.ActiveScripts; | ||
234 | sb[19].StatValue = m_activeScripts; | ||
235 | |||
236 | sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; | ||
237 | sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; | ||
238 | |||
225 | statpack.Stat = sb; | 239 | statpack.Stat = sb; |
226 | 240 | ||
227 | if (OnSendStatsResult != null) | 241 | if (OnSendStatsResult != null) |
@@ -241,12 +255,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
241 | m_inPacketsPerSecond = 0; | 255 | m_inPacketsPerSecond = 0; |
242 | m_outPacketsPerSecond = 0; | 256 | m_outPacketsPerSecond = 0; |
243 | m_unAckedBytes = 0; | 257 | m_unAckedBytes = 0; |
258 | m_scriptLinesPerSecond = 0; | ||
259 | |||
244 | m_frameMS = 0; | 260 | m_frameMS = 0; |
245 | m_agentMS = 0; | 261 | m_agentMS = 0; |
246 | m_netMS = 0; | 262 | m_netMS = 0; |
247 | m_physicsMS = 0; | 263 | m_physicsMS = 0; |
248 | m_imageMS = 0; | 264 | m_imageMS = 0; |
249 | m_otherMS = 0; | 265 | m_otherMS = 0; |
266 | m_scriptMS = 0; | ||
250 | } | 267 | } |
251 | 268 | ||
252 | # region methods called from Scene | 269 | # region methods called from Scene |
@@ -344,6 +361,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
344 | m_pendingDownloads += count; | 361 | m_pendingDownloads += count; |
345 | } | 362 | } |
346 | 363 | ||
364 | public void addScriptLines(int count) | ||
365 | { | ||
366 | m_scriptLinesPerSecond += count; | ||
367 | } | ||
368 | |||
369 | public void SetActiveScripts(int count) | ||
370 | { | ||
371 | m_activeScripts = count; | ||
372 | } | ||
373 | |||
347 | #endregion | 374 | #endregion |
348 | 375 | ||
349 | } | 376 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index c9fd873..01a1f92 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -100,47 +100,55 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
100 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 | 100 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 |
101 | public double llSin(double f) | 101 | public double llSin(double f) |
102 | { | 102 | { |
103 | 103 | m_host.AddScriptLPS(1); | |
104 | return (double)Math.Sin(f); | 104 | return (double)Math.Sin(f); |
105 | } | 105 | } |
106 | 106 | ||
107 | public double llCos(double f) | 107 | public double llCos(double f) |
108 | { | 108 | { |
109 | m_host.AddScriptLPS(1); | ||
109 | return (double)Math.Cos(f); | 110 | return (double)Math.Cos(f); |
110 | } | 111 | } |
111 | 112 | ||
112 | public double llTan(double f) | 113 | public double llTan(double f) |
113 | { | 114 | { |
115 | m_host.AddScriptLPS(1); | ||
114 | return (double)Math.Tan(f); | 116 | return (double)Math.Tan(f); |
115 | } | 117 | } |
116 | 118 | ||
117 | public double llAtan2(double x, double y) | 119 | public double llAtan2(double x, double y) |
118 | { | 120 | { |
121 | m_host.AddScriptLPS(1); | ||
119 | return (double)Math.Atan2(y, x); | 122 | return (double)Math.Atan2(y, x); |
120 | } | 123 | } |
121 | 124 | ||
122 | public double llSqrt(double f) | 125 | public double llSqrt(double f) |
123 | { | 126 | { |
127 | m_host.AddScriptLPS(1); | ||
124 | return (double)Math.Sqrt(f); | 128 | return (double)Math.Sqrt(f); |
125 | } | 129 | } |
126 | 130 | ||
127 | public double llPow(double fbase, double fexponent) | 131 | public double llPow(double fbase, double fexponent) |
128 | { | 132 | { |
133 | m_host.AddScriptLPS(1); | ||
129 | return (double)Math.Pow(fbase, fexponent); | 134 | return (double)Math.Pow(fbase, fexponent); |
130 | } | 135 | } |
131 | 136 | ||
132 | public int llAbs(int i) | 137 | public int llAbs(int i) |
133 | { | 138 | { |
139 | m_host.AddScriptLPS(1); | ||
134 | return (int)Math.Abs(i); | 140 | return (int)Math.Abs(i); |
135 | } | 141 | } |
136 | 142 | ||
137 | public double llFabs(double f) | 143 | public double llFabs(double f) |
138 | { | 144 | { |
145 | m_host.AddScriptLPS(1); | ||
139 | return (double)Math.Abs(f); | 146 | return (double)Math.Abs(f); |
140 | } | 147 | } |
141 | 148 | ||
142 | public double llFrand(double mag) | 149 | public double llFrand(double mag) |
143 | { | 150 | { |
151 | m_host.AddScriptLPS(1); | ||
144 | lock (Util.RandomClass) | 152 | lock (Util.RandomClass) |
145 | { | 153 | { |
146 | return Util.RandomClass.NextDouble() * mag; | 154 | return Util.RandomClass.NextDouble() * mag; |
@@ -149,27 +157,32 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
149 | 157 | ||
150 | public int llFloor(double f) | 158 | public int llFloor(double f) |
151 | { | 159 | { |
160 | m_host.AddScriptLPS(1); | ||
152 | return (int)Math.Floor(f); | 161 | return (int)Math.Floor(f); |
153 | } | 162 | } |
154 | 163 | ||
155 | public int llCeil(double f) | 164 | public int llCeil(double f) |
156 | { | 165 | { |
166 | m_host.AddScriptLPS(1); | ||
157 | return (int)Math.Ceiling(f); | 167 | return (int)Math.Ceiling(f); |
158 | } | 168 | } |
159 | 169 | ||
160 | public int llRound(double f) | 170 | public int llRound(double f) |
161 | { | 171 | { |
172 | m_host.AddScriptLPS(1); | ||
162 | return (int)Math.Round(f, 0); | 173 | return (int)Math.Round(f, 0); |
163 | } | 174 | } |
164 | 175 | ||
165 | //This next group are vector operations involving squaring and square root. ckrinke | 176 | //This next group are vector operations involving squaring and square root. ckrinke |
166 | public double llVecMag(LSL_Types.Vector3 v) | 177 | public double llVecMag(LSL_Types.Vector3 v) |
167 | { | 178 | { |
179 | m_host.AddScriptLPS(1); | ||
168 | return (v.x * v.x + v.y * v.y + v.z * v.z); | 180 | return (v.x * v.x + v.y * v.y + v.z * v.z); |
169 | } | 181 | } |
170 | 182 | ||
171 | public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) | 183 | public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) |
172 | { | 184 | { |
185 | m_host.AddScriptLPS(1); | ||
173 | double mag = v.x * v.x + v.y * v.y + v.z * v.z; | 186 | double mag = v.x * v.x + v.y * v.y + v.z * v.z; |
174 | LSL_Types.Vector3 nor = new LSL_Types.Vector3(); | 187 | LSL_Types.Vector3 nor = new LSL_Types.Vector3(); |
175 | nor.x = v.x / mag; | 188 | nor.x = v.x / mag; |
@@ -180,6 +193,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
180 | 193 | ||
181 | public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) | 194 | public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) |
182 | { | 195 | { |
196 | m_host.AddScriptLPS(1); | ||
183 | double dx = a.x - b.x; | 197 | double dx = a.x - b.x; |
184 | double dy = a.y - b.y; | 198 | double dy = a.y - b.y; |
185 | double dz = a.z - b.z; | 199 | double dz = a.z - b.z; |
@@ -189,6 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
189 | //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke | 203 | //Now we start getting into quaternions which means sin/cos, matrices and vectors. ckrinke |
190 | public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) | 204 | public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) |
191 | { | 205 | { |
206 | m_host.AddScriptLPS(1); | ||
192 | //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke | 207 | //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke |
193 | LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s); | 208 | LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s); |
194 | double m = (t.x + t.y + t.z + t.s); | 209 | double m = (t.x + t.y + t.z + t.s); |
@@ -207,6 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
207 | 222 | ||
208 | public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) | 223 | public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) |
209 | { | 224 | { |
225 | m_host.AddScriptLPS(1); | ||
210 | //this comes from from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions but is incomplete as of 8/19/07 | 226 | //this comes from from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions but is incomplete as of 8/19/07 |
211 | float err = 0.00001f; | 227 | float err = 0.00001f; |
212 | double ax = Math.Sin(v.x / 2); | 228 | double ax = Math.Sin(v.x / 2); |
@@ -242,27 +258,31 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
242 | 258 | ||
243 | public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) | 259 | public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) |
244 | { | 260 | { |
261 | m_host.AddScriptLPS(1); | ||
245 | return new LSL_Types.Quaternion(); | 262 | return new LSL_Types.Quaternion(); |
246 | } | 263 | } |
247 | 264 | ||
248 | public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) | 265 | public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) |
249 | { | 266 | { |
267 | m_host.AddScriptLPS(1); | ||
250 | return (new LSL_Types.Vector3(1,0,0) * r); | 268 | return (new LSL_Types.Vector3(1,0,0) * r); |
251 | } | 269 | } |
252 | 270 | ||
253 | public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) | 271 | public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) |
254 | { | 272 | { |
273 | m_host.AddScriptLPS(1); | ||
255 | return (new LSL_Types.Vector3(0, 1, 0) * r); | 274 | return (new LSL_Types.Vector3(0, 1, 0) * r); |
256 | } | 275 | } |
257 | 276 | ||
258 | public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) | 277 | public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) |
259 | { | 278 | { |
279 | m_host.AddScriptLPS(1); | ||
260 | return (new LSL_Types.Vector3(0, 0, 1) * r); | 280 | return (new LSL_Types.Vector3(0, 0, 1) * r); |
261 | } | 281 | } |
262 | public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) | 282 | public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) |
263 | { | 283 | { |
264 | //A and B should both be normalized | 284 | //A and B should both be normalized |
265 | 285 | m_host.AddScriptLPS(1); | |
266 | double dotProduct = LSL_Types.Vector3.Dot(a, b); | 286 | double dotProduct = LSL_Types.Vector3.Dot(a, b); |
267 | LSL_Types.Vector3 crossProduct = LSL_Types.Vector3.Cross(a, b); | 287 | LSL_Types.Vector3 crossProduct = LSL_Types.Vector3.Cross(a, b); |
268 | double magProduct = LSL_Types.Vector3.Mag(a) * LSL_Types.Vector3.Mag(b); | 288 | double magProduct = LSL_Types.Vector3.Mag(a) * LSL_Types.Vector3.Mag(b); |
@@ -274,6 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
274 | } | 294 | } |
275 | public void llWhisper(int channelID, string text) | 295 | public void llWhisper(int channelID, string text) |
276 | { | 296 | { |
297 | m_host.AddScriptLPS(1); | ||
277 | World.SimChat(Helpers.StringToField(text), | 298 | World.SimChat(Helpers.StringToField(text), |
278 | ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); | 299 | ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); |
279 | 300 | ||
@@ -283,6 +304,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
283 | 304 | ||
284 | public void llSay(int channelID, string text) | 305 | public void llSay(int channelID, string text) |
285 | { | 306 | { |
307 | m_host.AddScriptLPS(1); | ||
286 | World.SimChat(Helpers.StringToField(text), | 308 | World.SimChat(Helpers.StringToField(text), |
287 | ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); | 309 | ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); |
288 | 310 | ||
@@ -292,6 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
292 | 314 | ||
293 | public void llShout(int channelID, string text) | 315 | public void llShout(int channelID, string text) |
294 | { | 316 | { |
317 | m_host.AddScriptLPS(1); | ||
295 | World.SimChat(Helpers.StringToField(text), | 318 | World.SimChat(Helpers.StringToField(text), |
296 | ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); | 319 | ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); |
297 | 320 | ||
@@ -301,6 +324,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
301 | 324 | ||
302 | public int llListen(int channelID, string name, string ID, string msg) | 325 | public int llListen(int channelID, string name, string ID, string msg) |
303 | { | 326 | { |
327 | m_host.AddScriptLPS(1); | ||
304 | if (ID == String.Empty) | 328 | if (ID == String.Empty) |
305 | { | 329 | { |
306 | ID = LLUUID.Zero.ToString(); | 330 | ID = LLUUID.Zero.ToString(); |
@@ -311,102 +335,119 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
311 | 335 | ||
312 | public void llListenControl(int number, int active) | 336 | public void llListenControl(int number, int active) |
313 | { | 337 | { |
338 | m_host.AddScriptLPS(1); | ||
314 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 339 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
315 | wComm.ListenControl(number, active); | 340 | wComm.ListenControl(number, active); |
316 | } | 341 | } |
317 | 342 | ||
318 | public void llListenRemove(int number) | 343 | public void llListenRemove(int number) |
319 | { | 344 | { |
345 | m_host.AddScriptLPS(1); | ||
320 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 346 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
321 | wComm.ListenRemove(number); | 347 | wComm.ListenRemove(number); |
322 | } | 348 | } |
323 | 349 | ||
324 | public void llSensor(string name, string id, int type, double range, double arc) | 350 | public void llSensor(string name, string id, int type, double range, double arc) |
325 | { | 351 | { |
352 | m_host.AddScriptLPS(1); | ||
326 | NotImplemented("llSensor"); | 353 | NotImplemented("llSensor"); |
327 | return; | 354 | return; |
328 | } | 355 | } |
329 | 356 | ||
330 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | 357 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) |
331 | { | 358 | { |
359 | m_host.AddScriptLPS(1); | ||
332 | NotImplemented("llSensorRepeat"); | 360 | NotImplemented("llSensorRepeat"); |
333 | return; | 361 | return; |
334 | } | 362 | } |
335 | 363 | ||
336 | public void llSensorRemove() | 364 | public void llSensorRemove() |
337 | { | 365 | { |
366 | m_host.AddScriptLPS(1); | ||
338 | NotImplemented("llSensorRemove"); | 367 | NotImplemented("llSensorRemove"); |
339 | return; | 368 | return; |
340 | } | 369 | } |
341 | 370 | ||
342 | public string llDetectedName(int number) | 371 | public string llDetectedName(int number) |
343 | { | 372 | { |
373 | m_host.AddScriptLPS(1); | ||
344 | NotImplemented("llDetectedName"); | 374 | NotImplemented("llDetectedName"); |
345 | return String.Empty; | 375 | return String.Empty; |
346 | } | 376 | } |
347 | 377 | ||
348 | public string llDetectedKey(int number) | 378 | public string llDetectedKey(int number) |
349 | { | 379 | { |
380 | m_host.AddScriptLPS(1); | ||
350 | NotImplemented("llDetectedKey"); | 381 | NotImplemented("llDetectedKey"); |
351 | return String.Empty; | 382 | return String.Empty; |
352 | } | 383 | } |
353 | 384 | ||
354 | public string llDetectedOwner(int number) | 385 | public string llDetectedOwner(int number) |
355 | { | 386 | { |
387 | m_host.AddScriptLPS(1); | ||
356 | NotImplemented("llDetectedOwner"); | 388 | NotImplemented("llDetectedOwner"); |
357 | return String.Empty; | 389 | return String.Empty; |
358 | } | 390 | } |
359 | 391 | ||
360 | public int llDetectedType(int number) | 392 | public int llDetectedType(int number) |
361 | { | 393 | { |
394 | m_host.AddScriptLPS(1); | ||
362 | NotImplemented("llDetectedType"); | 395 | NotImplemented("llDetectedType"); |
363 | return 0; | 396 | return 0; |
364 | } | 397 | } |
365 | 398 | ||
366 | public LSL_Types.Vector3 llDetectedPos(int number) | 399 | public LSL_Types.Vector3 llDetectedPos(int number) |
367 | { | 400 | { |
401 | m_host.AddScriptLPS(1); | ||
368 | NotImplemented("llDetectedPos"); | 402 | NotImplemented("llDetectedPos"); |
369 | return new LSL_Types.Vector3(); | 403 | return new LSL_Types.Vector3(); |
370 | } | 404 | } |
371 | 405 | ||
372 | public LSL_Types.Vector3 llDetectedVel(int number) | 406 | public LSL_Types.Vector3 llDetectedVel(int number) |
373 | { | 407 | { |
408 | m_host.AddScriptLPS(1); | ||
374 | NotImplemented("llDetectedVel"); | 409 | NotImplemented("llDetectedVel"); |
375 | return new LSL_Types.Vector3(); | 410 | return new LSL_Types.Vector3(); |
376 | } | 411 | } |
377 | 412 | ||
378 | public LSL_Types.Vector3 llDetectedGrab(int number) | 413 | public LSL_Types.Vector3 llDetectedGrab(int number) |
379 | { | 414 | { |
415 | m_host.AddScriptLPS(1); | ||
380 | NotImplemented("llDetectedGrab"); | 416 | NotImplemented("llDetectedGrab"); |
381 | return new LSL_Types.Vector3(); | 417 | return new LSL_Types.Vector3(); |
382 | } | 418 | } |
383 | 419 | ||
384 | public LSL_Types.Quaternion llDetectedRot(int number) | 420 | public LSL_Types.Quaternion llDetectedRot(int number) |
385 | { | 421 | { |
422 | m_host.AddScriptLPS(1); | ||
386 | NotImplemented("llDetectedRot"); | 423 | NotImplemented("llDetectedRot"); |
387 | return new LSL_Types.Quaternion(); | 424 | return new LSL_Types.Quaternion(); |
388 | } | 425 | } |
389 | 426 | ||
390 | public int llDetectedGroup(int number) | 427 | public int llDetectedGroup(int number) |
391 | { | 428 | { |
429 | m_host.AddScriptLPS(1); | ||
392 | NotImplemented("llDetectedGroup"); | 430 | NotImplemented("llDetectedGroup"); |
393 | return 0; | 431 | return 0; |
394 | } | 432 | } |
395 | 433 | ||
396 | public int llDetectedLinkNumber(int number) | 434 | public int llDetectedLinkNumber(int number) |
397 | { | 435 | { |
436 | m_host.AddScriptLPS(1); | ||
398 | NotImplemented("llDetectedLinkNumber"); | 437 | NotImplemented("llDetectedLinkNumber"); |
399 | return 0; | 438 | return 0; |
400 | } | 439 | } |
401 | 440 | ||
402 | public void llDie() | 441 | public void llDie() |
403 | { | 442 | { |
443 | m_host.AddScriptLPS(1); | ||
404 | World.DeleteSceneObjectGroup(m_host.ParentGroup); | 444 | World.DeleteSceneObjectGroup(m_host.ParentGroup); |
405 | return; | 445 | return; |
406 | } | 446 | } |
407 | 447 | ||
408 | public double llGround(LSL_Types.Vector3 offset) | 448 | public double llGround(LSL_Types.Vector3 offset) |
409 | { | 449 | { |
450 | m_host.AddScriptLPS(1); | ||
410 | int x = (int)(m_host.AbsolutePosition.X + offset.x); | 451 | int x = (int)(m_host.AbsolutePosition.X + offset.x); |
411 | int y = (int)(m_host.AbsolutePosition.Y + offset.y); | 452 | int y = (int)(m_host.AbsolutePosition.Y + offset.y); |
412 | return World.GetLandHeight(x, y); | 453 | return World.GetLandHeight(x, y); |
@@ -414,18 +455,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
414 | 455 | ||
415 | public double llCloud(LSL_Types.Vector3 offset) | 456 | public double llCloud(LSL_Types.Vector3 offset) |
416 | { | 457 | { |
458 | m_host.AddScriptLPS(1); | ||
417 | NotImplemented("llCloud"); | 459 | NotImplemented("llCloud"); |
418 | return 0; | 460 | return 0; |
419 | } | 461 | } |
420 | 462 | ||
421 | public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) | 463 | public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) |
422 | { | 464 | { |
465 | m_host.AddScriptLPS(1); | ||
423 | NotImplemented("llWind"); | 466 | NotImplemented("llWind"); |
424 | return new LSL_Types.Vector3(); | 467 | return new LSL_Types.Vector3(); |
425 | } | 468 | } |
426 | 469 | ||
427 | public void llSetStatus(int status, int value) | 470 | public void llSetStatus(int status, int value) |
428 | { | 471 | { |
472 | m_host.AddScriptLPS(1); | ||
429 | if ((status & LSL_BaseClass.STATUS_PHYSICS) == LSL_BaseClass.STATUS_PHYSICS) | 473 | if ((status & LSL_BaseClass.STATUS_PHYSICS) == LSL_BaseClass.STATUS_PHYSICS) |
430 | { | 474 | { |
431 | m_host.AddFlag(LLObject.ObjectFlags.Physics); | 475 | m_host.AddFlag(LLObject.ObjectFlags.Physics); |
@@ -466,11 +510,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
466 | { | 510 | { |
467 | NotImplemented("llSetStatus - STATUS_SANDBOX"); | 511 | NotImplemented("llSetStatus - STATUS_SANDBOX"); |
468 | } | 512 | } |
513 | |||
469 | return; | 514 | return; |
470 | } | 515 | } |
471 | 516 | ||
472 | public int llGetStatus(int status) | 517 | public int llGetStatus(int status) |
473 | { | 518 | { |
519 | m_host.AddScriptLPS(1); | ||
474 | Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.ObjectFlags.ToString()); | 520 | Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.ObjectFlags.ToString()); |
475 | switch (status) | 521 | switch (status) |
476 | { | 522 | { |
@@ -530,6 +576,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
530 | 576 | ||
531 | public void llSetScale(LSL_Types.Vector3 scale) | 577 | public void llSetScale(LSL_Types.Vector3 scale) |
532 | { | 578 | { |
579 | m_host.AddScriptLPS(1); | ||
533 | // TODO: this needs to trigger a persistance save as well | 580 | // TODO: this needs to trigger a persistance save as well |
534 | LLVector3 tmp = m_host.Scale; | 581 | LLVector3 tmp = m_host.Scale; |
535 | tmp.X = (float)scale.x; | 582 | tmp.X = (float)scale.x; |
@@ -542,11 +589,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
542 | 589 | ||
543 | public LSL_Types.Vector3 llGetScale() | 590 | public LSL_Types.Vector3 llGetScale() |
544 | { | 591 | { |
592 | m_host.AddScriptLPS(1); | ||
545 | return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); | 593 | return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); |
546 | } | 594 | } |
547 | 595 | ||
548 | public void llSetColor(LSL_Types.Vector3 color, int face) | 596 | public void llSetColor(LSL_Types.Vector3 color, int face) |
549 | { | 597 | { |
598 | m_host.AddScriptLPS(1); | ||
550 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 599 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
551 | LLColor texcolor; | 600 | LLColor texcolor; |
552 | if (face > -1) | 601 | if (face > -1) |
@@ -588,6 +637,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
588 | 637 | ||
589 | public double llGetAlpha(int face) | 638 | public double llGetAlpha(int face) |
590 | { | 639 | { |
640 | m_host.AddScriptLPS(1); | ||
591 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 641 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
592 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color | 642 | if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color |
593 | { | 643 | { |
@@ -602,6 +652,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
602 | 652 | ||
603 | public void llSetAlpha(double alpha, int face) | 653 | public void llSetAlpha(double alpha, int face) |
604 | { | 654 | { |
655 | m_host.AddScriptLPS(1); | ||
605 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 656 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
606 | LLColor texcolor; | 657 | LLColor texcolor; |
607 | if (face > -1) | 658 | if (face > -1) |
@@ -637,6 +688,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
637 | 688 | ||
638 | public LSL_Types.Vector3 llGetColor(int face) | 689 | public LSL_Types.Vector3 llGetColor(int face) |
639 | { | 690 | { |
691 | m_host.AddScriptLPS(1); | ||
640 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 692 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
641 | LLColor texcolor; | 693 | LLColor texcolor; |
642 | LSL_Types.Vector3 rgb; | 694 | LSL_Types.Vector3 rgb; |
@@ -665,6 +717,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
665 | 717 | ||
666 | public void llSetTexture(string texture, int face) | 718 | public void llSetTexture(string texture, int face) |
667 | { | 719 | { |
720 | m_host.AddScriptLPS(1); | ||
668 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 721 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
669 | 722 | ||
670 | if (face > -1) | 723 | if (face > -1) |
@@ -696,6 +749,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
696 | 749 | ||
697 | public void llScaleTexture(double u, double v, int face) | 750 | public void llScaleTexture(double u, double v, int face) |
698 | { | 751 | { |
752 | m_host.AddScriptLPS(1); | ||
699 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 753 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
700 | if (face > -1) | 754 | if (face > -1) |
701 | { | 755 | { |
@@ -729,6 +783,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
729 | 783 | ||
730 | public void llOffsetTexture(double u, double v, int face) | 784 | public void llOffsetTexture(double u, double v, int face) |
731 | { | 785 | { |
786 | m_host.AddScriptLPS(1); | ||
732 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 787 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
733 | if (face > -1) | 788 | if (face > -1) |
734 | { | 789 | { |
@@ -762,6 +817,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
762 | 817 | ||
763 | public void llRotateTexture(double rotation, int face) | 818 | public void llRotateTexture(double rotation, int face) |
764 | { | 819 | { |
820 | m_host.AddScriptLPS(1); | ||
765 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 821 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
766 | if (face > -1) | 822 | if (face > -1) |
767 | { | 823 | { |
@@ -792,6 +848,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
792 | 848 | ||
793 | public string llGetTexture(int face) | 849 | public string llGetTexture(int face) |
794 | { | 850 | { |
851 | m_host.AddScriptLPS(1); | ||
795 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 852 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
796 | if (face == -1) | 853 | if (face == -1) |
797 | { | 854 | { |
@@ -812,6 +869,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
812 | 869 | ||
813 | public void llSetPos(LSL_Types.Vector3 pos) | 870 | public void llSetPos(LSL_Types.Vector3 pos) |
814 | { | 871 | { |
872 | m_host.AddScriptLPS(1); | ||
815 | if (m_host.ParentID != 0) | 873 | if (m_host.ParentID != 0) |
816 | { | 874 | { |
817 | m_host.UpdateOffSet(new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); | 875 | m_host.UpdateOffSet(new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); |
@@ -824,6 +882,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
824 | 882 | ||
825 | public LSL_Types.Vector3 llGetPos() | 883 | public LSL_Types.Vector3 llGetPos() |
826 | { | 884 | { |
885 | m_host.AddScriptLPS(1); | ||
827 | return new LSL_Types.Vector3(m_host.AbsolutePosition.X, | 886 | return new LSL_Types.Vector3(m_host.AbsolutePosition.X, |
828 | m_host.AbsolutePosition.Y, | 887 | m_host.AbsolutePosition.Y, |
829 | m_host.AbsolutePosition.Z); | 888 | m_host.AbsolutePosition.Z); |
@@ -831,6 +890,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
831 | 890 | ||
832 | public LSL_Types.Vector3 llGetLocalPos() | 891 | public LSL_Types.Vector3 llGetLocalPos() |
833 | { | 892 | { |
893 | m_host.AddScriptLPS(1); | ||
834 | if (m_host.ParentID != 0) | 894 | if (m_host.ParentID != 0) |
835 | { | 895 | { |
836 | return new LSL_Types.Vector3(m_host.OffsetPosition.X, | 896 | return new LSL_Types.Vector3(m_host.OffsetPosition.X, |
@@ -847,65 +907,77 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
847 | 907 | ||
848 | public void llSetRot(LSL_Types.Quaternion rot) | 908 | public void llSetRot(LSL_Types.Quaternion rot) |
849 | { | 909 | { |
910 | m_host.AddScriptLPS(1); | ||
850 | m_host.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); | 911 | m_host.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); |
851 | } | 912 | } |
852 | 913 | ||
853 | public LSL_Types.Quaternion llGetRot() | 914 | public LSL_Types.Quaternion llGetRot() |
854 | { | 915 | { |
916 | m_host.AddScriptLPS(1); | ||
855 | LLQuaternion q = m_host.RotationOffset; | 917 | LLQuaternion q = m_host.RotationOffset; |
856 | return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 918 | return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
857 | } | 919 | } |
858 | 920 | ||
859 | public LSL_Types.Quaternion llGetLocalRot() | 921 | public LSL_Types.Quaternion llGetLocalRot() |
860 | { | 922 | { |
923 | m_host.AddScriptLPS(1); | ||
861 | return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); | 924 | return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); |
862 | } | 925 | } |
863 | 926 | ||
864 | public void llSetForce(LSL_Types.Vector3 force, int local) | 927 | public void llSetForce(LSL_Types.Vector3 force, int local) |
865 | { | 928 | { |
929 | m_host.AddScriptLPS(1); | ||
866 | NotImplemented("llSetForce"); | 930 | NotImplemented("llSetForce"); |
867 | } | 931 | } |
868 | 932 | ||
869 | public LSL_Types.Vector3 llGetForce() | 933 | public LSL_Types.Vector3 llGetForce() |
870 | { | 934 | { |
935 | m_host.AddScriptLPS(1); | ||
871 | NotImplemented("llGetForce"); | 936 | NotImplemented("llGetForce"); |
872 | return new LSL_Types.Vector3(); | 937 | return new LSL_Types.Vector3(); |
873 | } | 938 | } |
874 | 939 | ||
875 | public int llTarget(LSL_Types.Vector3 position, double range) | 940 | public int llTarget(LSL_Types.Vector3 position, double range) |
876 | { | 941 | { |
942 | m_host.AddScriptLPS(1); | ||
877 | NotImplemented("llTarget"); | 943 | NotImplemented("llTarget"); |
878 | return 0; | 944 | return 0; |
879 | } | 945 | } |
880 | 946 | ||
881 | public void llTargetRemove(int number) | 947 | public void llTargetRemove(int number) |
882 | { | 948 | { |
949 | m_host.AddScriptLPS(1); | ||
883 | NotImplemented("llTargetRemove"); | 950 | NotImplemented("llTargetRemove"); |
884 | } | 951 | } |
885 | 952 | ||
886 | public int llRotTarget(LSL_Types.Quaternion rot, double error) | 953 | public int llRotTarget(LSL_Types.Quaternion rot, double error) |
887 | { | 954 | { |
955 | m_host.AddScriptLPS(1); | ||
888 | NotImplemented("llRotTarget"); | 956 | NotImplemented("llRotTarget"); |
889 | return 0; | 957 | return 0; |
890 | } | 958 | } |
891 | 959 | ||
892 | public void llRotTargetRemove(int number) | 960 | public void llRotTargetRemove(int number) |
893 | { | 961 | { |
962 | m_host.AddScriptLPS(1); | ||
894 | NotImplemented("llRotTargetRemove"); | 963 | NotImplemented("llRotTargetRemove"); |
895 | } | 964 | } |
896 | 965 | ||
897 | public void llMoveToTarget(LSL_Types.Vector3 target, double tau) | 966 | public void llMoveToTarget(LSL_Types.Vector3 target, double tau) |
898 | { | 967 | { |
968 | m_host.AddScriptLPS(1); | ||
899 | NotImplemented("llMoveToTarget"); | 969 | NotImplemented("llMoveToTarget"); |
900 | } | 970 | } |
901 | 971 | ||
902 | public void llStopMoveToTarget() | 972 | public void llStopMoveToTarget() |
903 | { | 973 | { |
974 | m_host.AddScriptLPS(1); | ||
904 | NotImplemented("llStopMoveToTarget"); | 975 | NotImplemented("llStopMoveToTarget"); |
905 | } | 976 | } |
906 | 977 | ||
907 | public void llApplyImpulse(LSL_Types.Vector3 force, int local) | 978 | public void llApplyImpulse(LSL_Types.Vector3 force, int local) |
908 | { | 979 | { |
980 | m_host.AddScriptLPS(1); | ||
909 | //No energy force yet | 981 | //No energy force yet |
910 | if (local == 1) | 982 | if (local == 1) |
911 | { | 983 | { |
@@ -926,65 +998,77 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
926 | 998 | ||
927 | public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) | 999 | public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) |
928 | { | 1000 | { |
1001 | m_host.AddScriptLPS(1); | ||
929 | NotImplemented("llApplyRotationalImpulse"); | 1002 | NotImplemented("llApplyRotationalImpulse"); |
930 | } | 1003 | } |
931 | 1004 | ||
932 | public void llSetTorque(LSL_Types.Vector3 torque, int local) | 1005 | public void llSetTorque(LSL_Types.Vector3 torque, int local) |
933 | { | 1006 | { |
1007 | m_host.AddScriptLPS(1); | ||
934 | NotImplemented("llSetTorque"); | 1008 | NotImplemented("llSetTorque"); |
935 | } | 1009 | } |
936 | 1010 | ||
937 | public LSL_Types.Vector3 llGetTorque() | 1011 | public LSL_Types.Vector3 llGetTorque() |
938 | { | 1012 | { |
1013 | m_host.AddScriptLPS(1); | ||
939 | NotImplemented("llGetTorque"); | 1014 | NotImplemented("llGetTorque"); |
940 | return new LSL_Types.Vector3(); | 1015 | return new LSL_Types.Vector3(); |
941 | } | 1016 | } |
942 | 1017 | ||
943 | public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) | 1018 | public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) |
944 | { | 1019 | { |
1020 | m_host.AddScriptLPS(1); | ||
945 | NotImplemented("llSetForceAndTorque"); | 1021 | NotImplemented("llSetForceAndTorque"); |
946 | } | 1022 | } |
947 | 1023 | ||
948 | public LSL_Types.Vector3 llGetVel() | 1024 | public LSL_Types.Vector3 llGetVel() |
949 | { | 1025 | { |
1026 | m_host.AddScriptLPS(1); | ||
950 | return new LSL_Types.Vector3(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z); | 1027 | return new LSL_Types.Vector3(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z); |
951 | } | 1028 | } |
952 | 1029 | ||
953 | public LSL_Types.Vector3 llGetAccel() | 1030 | public LSL_Types.Vector3 llGetAccel() |
954 | { | 1031 | { |
1032 | m_host.AddScriptLPS(1); | ||
955 | return new LSL_Types.Vector3(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z); | 1033 | return new LSL_Types.Vector3(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z); |
956 | } | 1034 | } |
957 | 1035 | ||
958 | public LSL_Types.Vector3 llGetOmega() | 1036 | public LSL_Types.Vector3 llGetOmega() |
959 | { | 1037 | { |
1038 | m_host.AddScriptLPS(1); | ||
960 | NotImplemented("llGetOmega"); | 1039 | NotImplemented("llGetOmega"); |
961 | return new LSL_Types.Vector3(); | 1040 | return new LSL_Types.Vector3(); |
962 | } | 1041 | } |
963 | 1042 | ||
964 | public double llGetTimeOfDay() | 1043 | public double llGetTimeOfDay() |
965 | { | 1044 | { |
1045 | m_host.AddScriptLPS(1); | ||
966 | NotImplemented("llGetTimeOfDay"); | 1046 | NotImplemented("llGetTimeOfDay"); |
967 | return 0; | 1047 | return 0; |
968 | } | 1048 | } |
969 | 1049 | ||
970 | public double llGetWallclock() | 1050 | public double llGetWallclock() |
971 | { | 1051 | { |
1052 | m_host.AddScriptLPS(1); | ||
972 | return DateTime.Now.TimeOfDay.TotalSeconds; | 1053 | return DateTime.Now.TimeOfDay.TotalSeconds; |
973 | } | 1054 | } |
974 | 1055 | ||
975 | public double llGetTime() | 1056 | public double llGetTime() |
976 | { | 1057 | { |
1058 | m_host.AddScriptLPS(1); | ||
977 | TimeSpan ScriptTime = DateTime.Now - m_timer; | 1059 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
978 | return (double)(ScriptTime.TotalMilliseconds / 1000); | 1060 | return (double)(ScriptTime.TotalMilliseconds / 1000); |
979 | } | 1061 | } |
980 | 1062 | ||
981 | public void llResetTime() | 1063 | public void llResetTime() |
982 | { | 1064 | { |
1065 | m_host.AddScriptLPS(1); | ||
983 | m_timer = DateTime.Now; | 1066 | m_timer = DateTime.Now; |
984 | } | 1067 | } |
985 | 1068 | ||
986 | public double llGetAndResetTime() | 1069 | public double llGetAndResetTime() |
987 | { | 1070 | { |
1071 | m_host.AddScriptLPS(1); | ||
988 | TimeSpan ScriptTime = DateTime.Now - m_timer; | 1072 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
989 | m_timer = DateTime.Now; | 1073 | m_timer = DateTime.Now; |
990 | return (double)(ScriptTime.TotalMilliseconds / 1000); | 1074 | return (double)(ScriptTime.TotalMilliseconds / 1000); |
@@ -992,6 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
992 | 1076 | ||
993 | public void llSound() | 1077 | public void llSound() |
994 | { | 1078 | { |
1079 | m_host.AddScriptLPS(1); | ||
995 | // This function has been deprecated | 1080 | // This function has been deprecated |
996 | // see http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSound | 1081 | // see http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSound |
997 | NotImplemented("llSound"); | 1082 | NotImplemented("llSound"); |
@@ -999,47 +1084,55 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
999 | 1084 | ||
1000 | public void llPlaySound(string sound, double volume) | 1085 | public void llPlaySound(string sound, double volume) |
1001 | { | 1086 | { |
1002 | 1087 | m_host.AddScriptLPS(1); | |
1003 | m_host.SendSound(sound, volume, false); | 1088 | m_host.SendSound(sound, volume, false); |
1004 | } | 1089 | } |
1005 | 1090 | ||
1006 | public void llLoopSound(string sound, double volume) | 1091 | public void llLoopSound(string sound, double volume) |
1007 | { | 1092 | { |
1093 | m_host.AddScriptLPS(1); | ||
1008 | NotImplemented("llLoopSound"); | 1094 | NotImplemented("llLoopSound"); |
1009 | } | 1095 | } |
1010 | 1096 | ||
1011 | public void llLoopSoundMaster(string sound, double volume) | 1097 | public void llLoopSoundMaster(string sound, double volume) |
1012 | { | 1098 | { |
1099 | m_host.AddScriptLPS(1); | ||
1013 | NotImplemented("llLoopSoundMaster"); | 1100 | NotImplemented("llLoopSoundMaster"); |
1014 | } | 1101 | } |
1015 | 1102 | ||
1016 | public void llLoopSoundSlave(string sound, double volume) | 1103 | public void llLoopSoundSlave(string sound, double volume) |
1017 | { | 1104 | { |
1105 | m_host.AddScriptLPS(1); | ||
1018 | NotImplemented("llLoopSoundSlave"); | 1106 | NotImplemented("llLoopSoundSlave"); |
1019 | } | 1107 | } |
1020 | 1108 | ||
1021 | public void llPlaySoundSlave(string sound, double volume) | 1109 | public void llPlaySoundSlave(string sound, double volume) |
1022 | { | 1110 | { |
1111 | m_host.AddScriptLPS(1); | ||
1023 | NotImplemented("llPlaySoundSlave"); | 1112 | NotImplemented("llPlaySoundSlave"); |
1024 | } | 1113 | } |
1025 | 1114 | ||
1026 | public void llTriggerSound(string sound, double volume) | 1115 | public void llTriggerSound(string sound, double volume) |
1027 | { | 1116 | { |
1117 | m_host.AddScriptLPS(1); | ||
1028 | m_host.SendSound(sound, volume, true); | 1118 | m_host.SendSound(sound, volume, true); |
1029 | } | 1119 | } |
1030 | 1120 | ||
1031 | public void llStopSound() | 1121 | public void llStopSound() |
1032 | { | 1122 | { |
1123 | m_host.AddScriptLPS(1); | ||
1033 | NotImplemented("llStopSound"); | 1124 | NotImplemented("llStopSound"); |
1034 | } | 1125 | } |
1035 | 1126 | ||
1036 | public void llPreloadSound(string sound) | 1127 | public void llPreloadSound(string sound) |
1037 | { | 1128 | { |
1129 | m_host.AddScriptLPS(1); | ||
1038 | m_host.PreloadSound(sound); | 1130 | m_host.PreloadSound(sound); |
1039 | } | 1131 | } |
1040 | 1132 | ||
1041 | public string llGetSubString(string src, int start, int end) | 1133 | public string llGetSubString(string src, int start, int end) |
1042 | { | 1134 | { |
1135 | m_host.AddScriptLPS(1); | ||
1043 | // substring expects length | 1136 | // substring expects length |
1044 | // return src.Substring(start, end); | 1137 | // return src.Substring(start, end); |
1045 | 1138 | ||
@@ -1059,7 +1152,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1059 | } | 1152 | } |
1060 | 1153 | ||
1061 | public string llDeleteSubString(string src, int start, int end) | 1154 | public string llDeleteSubString(string src, int start, int end) |
1062 | { | 1155 | { |
1156 | m_host.AddScriptLPS(1); | ||
1063 | //return src.Remove(start, end - start); | 1157 | //return src.Remove(start, end - start); |
1064 | // if one is negative so use length of string as base | 1158 | // if one is negative so use length of string as base |
1065 | // if start > end then it is exclusive | 1159 | // if start > end then it is exclusive |
@@ -1079,118 +1173,141 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1079 | 1173 | ||
1080 | public string llInsertString(string dst, int position, string src) | 1174 | public string llInsertString(string dst, int position, string src) |
1081 | { | 1175 | { |
1176 | m_host.AddScriptLPS(1); | ||
1082 | return dst.Insert(position, src); | 1177 | return dst.Insert(position, src); |
1083 | } | 1178 | } |
1084 | 1179 | ||
1085 | public string llToUpper(string src) | 1180 | public string llToUpper(string src) |
1086 | { | 1181 | { |
1182 | m_host.AddScriptLPS(1); | ||
1087 | return src.ToUpper(); | 1183 | return src.ToUpper(); |
1088 | } | 1184 | } |
1089 | 1185 | ||
1090 | public string llToLower(string src) | 1186 | public string llToLower(string src) |
1091 | { | 1187 | { |
1188 | m_host.AddScriptLPS(1); | ||
1092 | return src.ToLower(); | 1189 | return src.ToLower(); |
1093 | } | 1190 | } |
1094 | 1191 | ||
1095 | public int llGiveMoney(string destination, int amount) | 1192 | public int llGiveMoney(string destination, int amount) |
1096 | { | 1193 | { |
1194 | m_host.AddScriptLPS(1); | ||
1097 | NotImplemented("llGiveMoney"); | 1195 | NotImplemented("llGiveMoney"); |
1098 | return 0; | 1196 | return 0; |
1099 | } | 1197 | } |
1100 | 1198 | ||
1101 | public void llMakeExplosion() | 1199 | public void llMakeExplosion() |
1102 | { | 1200 | { |
1201 | m_host.AddScriptLPS(1); | ||
1103 | NotImplemented("llMakeExplosion"); | 1202 | NotImplemented("llMakeExplosion"); |
1104 | } | 1203 | } |
1105 | 1204 | ||
1106 | public void llMakeFountain() | 1205 | public void llMakeFountain() |
1107 | { | 1206 | { |
1207 | m_host.AddScriptLPS(1); | ||
1108 | NotImplemented("llMakeFountain"); | 1208 | NotImplemented("llMakeFountain"); |
1109 | } | 1209 | } |
1110 | 1210 | ||
1111 | public void llMakeSmoke() | 1211 | public void llMakeSmoke() |
1112 | { | 1212 | { |
1213 | m_host.AddScriptLPS(1); | ||
1113 | NotImplemented("llMakeSmoke"); | 1214 | NotImplemented("llMakeSmoke"); |
1114 | } | 1215 | } |
1115 | 1216 | ||
1116 | public void llMakeFire() | 1217 | public void llMakeFire() |
1117 | { | 1218 | { |
1219 | m_host.AddScriptLPS(1); | ||
1118 | NotImplemented("llMakeFire"); | 1220 | NotImplemented("llMakeFire"); |
1119 | } | 1221 | } |
1120 | 1222 | ||
1121 | public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) | 1223 | public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Quaternion rot, int param) |
1122 | { | 1224 | { |
1225 | m_host.AddScriptLPS(1); | ||
1123 | NotImplemented("llRezObject"); | 1226 | NotImplemented("llRezObject"); |
1124 | } | 1227 | } |
1125 | 1228 | ||
1126 | public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) | 1229 | public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) |
1127 | { | 1230 | { |
1231 | m_host.AddScriptLPS(1); | ||
1128 | NotImplemented("llLookAt"); | 1232 | NotImplemented("llLookAt"); |
1129 | } | 1233 | } |
1130 | 1234 | ||
1131 | public void llStopLookAt() | 1235 | public void llStopLookAt() |
1132 | { | 1236 | { |
1237 | m_host.AddScriptLPS(1); | ||
1133 | NotImplemented("llStopLookAt"); | 1238 | NotImplemented("llStopLookAt"); |
1134 | } | 1239 | } |
1135 | 1240 | ||
1136 | public void llSetTimerEvent(double sec) | 1241 | public void llSetTimerEvent(double sec) |
1137 | { | 1242 | { |
1243 | m_host.AddScriptLPS(1); | ||
1138 | // Setting timer repeat | 1244 | // Setting timer repeat |
1139 | m_ScriptEngine.m_ASYNCLSLCommandManager.SetTimerEvent(m_localID, m_itemID, sec); | 1245 | m_ScriptEngine.m_ASYNCLSLCommandManager.SetTimerEvent(m_localID, m_itemID, sec); |
1140 | } | 1246 | } |
1141 | 1247 | ||
1142 | public void llSleep(double sec) | 1248 | public void llSleep(double sec) |
1143 | { | 1249 | { |
1250 | m_host.AddScriptLPS(1); | ||
1144 | Thread.Sleep((int)(sec * 1000)); | 1251 | Thread.Sleep((int)(sec * 1000)); |
1145 | } | 1252 | } |
1146 | 1253 | ||
1147 | public double llGetMass() | 1254 | public double llGetMass() |
1148 | { | 1255 | { |
1256 | m_host.AddScriptLPS(1); | ||
1149 | return m_host.GetMass(); | 1257 | return m_host.GetMass(); |
1150 | } | 1258 | } |
1151 | 1259 | ||
1152 | public void llCollisionFilter(string name, string id, int accept) | 1260 | public void llCollisionFilter(string name, string id, int accept) |
1153 | { | 1261 | { |
1262 | m_host.AddScriptLPS(1); | ||
1154 | NotImplemented("llCollisionFilter"); | 1263 | NotImplemented("llCollisionFilter"); |
1155 | } | 1264 | } |
1156 | 1265 | ||
1157 | public void llTakeControls(int controls, int accept, int pass_on) | 1266 | public void llTakeControls(int controls, int accept, int pass_on) |
1158 | { | 1267 | { |
1268 | m_host.AddScriptLPS(1); | ||
1159 | NotImplemented("llTakeControls"); | 1269 | NotImplemented("llTakeControls"); |
1160 | } | 1270 | } |
1161 | 1271 | ||
1162 | public void llReleaseControls() | 1272 | public void llReleaseControls() |
1163 | { | 1273 | { |
1274 | m_host.AddScriptLPS(1); | ||
1164 | NotImplemented("llReleaseControls"); | 1275 | NotImplemented("llReleaseControls"); |
1165 | } | 1276 | } |
1166 | 1277 | ||
1167 | public void llAttachToAvatar(int attachment) | 1278 | public void llAttachToAvatar(int attachment) |
1168 | { | 1279 | { |
1280 | m_host.AddScriptLPS(1); | ||
1169 | NotImplemented("llAttachToAvatar"); | 1281 | NotImplemented("llAttachToAvatar"); |
1170 | } | 1282 | } |
1171 | 1283 | ||
1172 | public void llDetachFromAvatar() | 1284 | public void llDetachFromAvatar() |
1173 | { | 1285 | { |
1286 | m_host.AddScriptLPS(1); | ||
1174 | NotImplemented("llDetachFromAvatar"); | 1287 | NotImplemented("llDetachFromAvatar"); |
1175 | } | 1288 | } |
1176 | 1289 | ||
1177 | public void llTakeCamera() | 1290 | public void llTakeCamera() |
1178 | { | 1291 | { |
1292 | m_host.AddScriptLPS(1); | ||
1179 | NotImplemented("llTakeCamera"); | 1293 | NotImplemented("llTakeCamera"); |
1180 | } | 1294 | } |
1181 | 1295 | ||
1182 | public void llReleaseCamera() | 1296 | public void llReleaseCamera() |
1183 | { | 1297 | { |
1298 | m_host.AddScriptLPS(1); | ||
1184 | NotImplemented("llReleaseCamera"); | 1299 | NotImplemented("llReleaseCamera"); |
1185 | } | 1300 | } |
1186 | 1301 | ||
1187 | public string llGetOwner() | 1302 | public string llGetOwner() |
1188 | { | 1303 | { |
1304 | m_host.AddScriptLPS(1); | ||
1189 | return m_host.ObjectOwner.ToString(); | 1305 | return m_host.ObjectOwner.ToString(); |
1190 | } | 1306 | } |
1191 | 1307 | ||
1192 | public void llInstantMessage(string user, string message) | 1308 | public void llInstantMessage(string user, string message) |
1193 | { | 1309 | { |
1310 | m_host.AddScriptLPS(1); | ||
1194 | NotImplemented("llInstantMessage"); | 1311 | NotImplemented("llInstantMessage"); |
1195 | 1312 | ||
1196 | // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. | 1313 | // We may be able to use ClientView.SendInstantMessage here, but we need a client instance. |
@@ -1204,51 +1321,62 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1204 | 1321 | ||
1205 | public void llEmail(string address, string subject, string message) | 1322 | public void llEmail(string address, string subject, string message) |
1206 | { | 1323 | { |
1324 | m_host.AddScriptLPS(1); | ||
1207 | NotImplemented("llEmail"); | 1325 | NotImplemented("llEmail"); |
1208 | } | 1326 | } |
1209 | 1327 | ||
1210 | public void llGetNextEmail(string address, string subject) | 1328 | public void llGetNextEmail(string address, string subject) |
1211 | { | 1329 | { |
1330 | m_host.AddScriptLPS(1); | ||
1212 | NotImplemented("llGetNextEmail"); | 1331 | NotImplemented("llGetNextEmail"); |
1213 | } | 1332 | } |
1214 | 1333 | ||
1215 | public string llGetKey() | 1334 | public string llGetKey() |
1216 | { | 1335 | { |
1336 | m_host.AddScriptLPS(1); | ||
1217 | return m_host.UUID.ToString(); | 1337 | return m_host.UUID.ToString(); |
1218 | } | 1338 | } |
1219 | 1339 | ||
1220 | public void llSetBuoyancy(double buoyancy) | 1340 | public void llSetBuoyancy(double buoyancy) |
1221 | { | 1341 | { |
1342 | m_host.AddScriptLPS(1); | ||
1222 | NotImplemented("llSetBuoyancy"); | 1343 | NotImplemented("llSetBuoyancy"); |
1223 | } | 1344 | } |
1224 | 1345 | ||
1225 | public void llSetHoverHeight(double height, int water, double tau) | 1346 | public void llSetHoverHeight(double height, int water, double tau) |
1226 | { | 1347 | { |
1348 | m_host.AddScriptLPS(1); | ||
1227 | NotImplemented("llSetHoverHeight"); | 1349 | NotImplemented("llSetHoverHeight"); |
1228 | } | 1350 | } |
1229 | 1351 | ||
1230 | public void llStopHover() | 1352 | public void llStopHover() |
1231 | { | 1353 | { |
1354 | m_host.AddScriptLPS(1); | ||
1355 | m_host.AddScriptLPS(1); | ||
1232 | NotImplemented("llStopHover"); | 1356 | NotImplemented("llStopHover"); |
1233 | } | 1357 | } |
1234 | 1358 | ||
1235 | public void llMinEventDelay(double delay) | 1359 | public void llMinEventDelay(double delay) |
1236 | { | 1360 | { |
1361 | m_host.AddScriptLPS(1); | ||
1237 | NotImplemented("llMinEventDelay"); | 1362 | NotImplemented("llMinEventDelay"); |
1238 | } | 1363 | } |
1239 | 1364 | ||
1240 | public void llSoundPreload() | 1365 | public void llSoundPreload() |
1241 | { | 1366 | { |
1367 | m_host.AddScriptLPS(1); | ||
1242 | NotImplemented("llSoundPreload"); | 1368 | NotImplemented("llSoundPreload"); |
1243 | } | 1369 | } |
1244 | 1370 | ||
1245 | public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) | 1371 | public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) |
1246 | { | 1372 | { |
1373 | m_host.AddScriptLPS(1); | ||
1247 | NotImplemented("llRotLookAt"); | 1374 | NotImplemented("llRotLookAt"); |
1248 | } | 1375 | } |
1249 | 1376 | ||
1250 | public int llStringLength(string str) | 1377 | public int llStringLength(string str) |
1251 | { | 1378 | { |
1379 | m_host.AddScriptLPS(1); | ||
1252 | if (str.Length > 0) | 1380 | if (str.Length > 0) |
1253 | { | 1381 | { |
1254 | return str.Length; | 1382 | return str.Length; |
@@ -1261,26 +1389,31 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1261 | 1389 | ||
1262 | public void llStartAnimation(string anim) | 1390 | public void llStartAnimation(string anim) |
1263 | { | 1391 | { |
1392 | m_host.AddScriptLPS(1); | ||
1264 | NotImplemented("llStartAnimation"); | 1393 | NotImplemented("llStartAnimation"); |
1265 | } | 1394 | } |
1266 | 1395 | ||
1267 | public void llStopAnimation(string anim) | 1396 | public void llStopAnimation(string anim) |
1268 | { | 1397 | { |
1398 | m_host.AddScriptLPS(1); | ||
1269 | NotImplemented("llStopAnimation"); | 1399 | NotImplemented("llStopAnimation"); |
1270 | } | 1400 | } |
1271 | 1401 | ||
1272 | public void llPointAt() | 1402 | public void llPointAt() |
1273 | { | 1403 | { |
1404 | m_host.AddScriptLPS(1); | ||
1274 | NotImplemented("llPointAt"); | 1405 | NotImplemented("llPointAt"); |
1275 | } | 1406 | } |
1276 | 1407 | ||
1277 | public void llStopPointAt() | 1408 | public void llStopPointAt() |
1278 | { | 1409 | { |
1410 | m_host.AddScriptLPS(1); | ||
1279 | NotImplemented("llStopPointAt"); | 1411 | NotImplemented("llStopPointAt"); |
1280 | } | 1412 | } |
1281 | 1413 | ||
1282 | public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) | 1414 | public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) |
1283 | { | 1415 | { |
1416 | m_host.AddScriptLPS(1); | ||
1284 | m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 1417 | m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); |
1285 | m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); | 1418 | m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); |
1286 | m_host.ScheduleTerseUpdate(); | 1419 | m_host.ScheduleTerseUpdate(); |
@@ -1290,39 +1423,46 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1290 | 1423 | ||
1291 | public int llGetStartParameter() | 1424 | public int llGetStartParameter() |
1292 | { | 1425 | { |
1426 | m_host.AddScriptLPS(1); | ||
1293 | NotImplemented("llGetStartParameter"); | 1427 | NotImplemented("llGetStartParameter"); |
1294 | return 0; | 1428 | return 0; |
1295 | } | 1429 | } |
1296 | 1430 | ||
1297 | public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) | 1431 | public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) |
1298 | { | 1432 | { |
1433 | m_host.AddScriptLPS(1); | ||
1299 | NotImplemented("llGodLikeRezObject"); | 1434 | NotImplemented("llGodLikeRezObject"); |
1300 | } | 1435 | } |
1301 | 1436 | ||
1302 | public void llRequestPermissions(string agent, int perm) | 1437 | public void llRequestPermissions(string agent, int perm) |
1303 | { | 1438 | { |
1439 | m_host.AddScriptLPS(1); | ||
1304 | NotImplemented("llRequestPermissions"); | 1440 | NotImplemented("llRequestPermissions"); |
1305 | } | 1441 | } |
1306 | 1442 | ||
1307 | public string llGetPermissionsKey() | 1443 | public string llGetPermissionsKey() |
1308 | { | 1444 | { |
1445 | m_host.AddScriptLPS(1); | ||
1309 | NotImplemented("llGetPermissionsKey"); | 1446 | NotImplemented("llGetPermissionsKey"); |
1310 | return String.Empty; | 1447 | return String.Empty; |
1311 | } | 1448 | } |
1312 | 1449 | ||
1313 | public int llGetPermissions() | 1450 | public int llGetPermissions() |
1314 | { | 1451 | { |
1452 | m_host.AddScriptLPS(1); | ||
1315 | NotImplemented("llGetPermissions"); | 1453 | NotImplemented("llGetPermissions"); |
1316 | return 0; | 1454 | return 0; |
1317 | } | 1455 | } |
1318 | 1456 | ||
1319 | public int llGetLinkNumber() | 1457 | public int llGetLinkNumber() |
1320 | { | 1458 | { |
1459 | m_host.AddScriptLPS(1); | ||
1321 | return m_host.LinkNum; | 1460 | return m_host.LinkNum; |
1322 | } | 1461 | } |
1323 | 1462 | ||
1324 | public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) | 1463 | public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) |
1325 | { | 1464 | { |
1465 | m_host.AddScriptLPS(1); | ||
1326 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 1466 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
1327 | if (linknumber > -1) | 1467 | if (linknumber > -1) |
1328 | { | 1468 | { |
@@ -1420,21 +1560,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1420 | 1560 | ||
1421 | public void llCreateLink(string target, int parent) | 1561 | public void llCreateLink(string target, int parent) |
1422 | { | 1562 | { |
1563 | m_host.AddScriptLPS(1); | ||
1423 | NotImplemented("llCreateLink"); | 1564 | NotImplemented("llCreateLink"); |
1424 | } | 1565 | } |
1425 | 1566 | ||
1426 | public void llBreakLink(int linknum) | 1567 | public void llBreakLink(int linknum) |
1427 | { | 1568 | { |
1569 | m_host.AddScriptLPS(1); | ||
1428 | NotImplemented("llBreakLink"); | 1570 | NotImplemented("llBreakLink"); |
1429 | } | 1571 | } |
1430 | 1572 | ||
1431 | public void llBreakAllLinks() | 1573 | public void llBreakAllLinks() |
1432 | { | 1574 | { |
1575 | m_host.AddScriptLPS(1); | ||
1433 | NotImplemented("llBreakAllLinks"); | 1576 | NotImplemented("llBreakAllLinks"); |
1434 | } | 1577 | } |
1435 | 1578 | ||
1436 | public string llGetLinkKey(int linknum) | 1579 | public string llGetLinkKey(int linknum) |
1437 | { | 1580 | { |
1581 | m_host.AddScriptLPS(1); | ||
1438 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); | 1582 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); |
1439 | if (part != null) | 1583 | if (part != null) |
1440 | { | 1584 | { |
@@ -1448,6 +1592,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1448 | 1592 | ||
1449 | public string llGetLinkName(int linknum) | 1593 | public string llGetLinkName(int linknum) |
1450 | { | 1594 | { |
1595 | m_host.AddScriptLPS(1); | ||
1451 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); | 1596 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); |
1452 | if (part != null) | 1597 | if (part != null) |
1453 | { | 1598 | { |
@@ -1461,76 +1606,90 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1461 | 1606 | ||
1462 | public int llGetInventoryNumber(int type) | 1607 | public int llGetInventoryNumber(int type) |
1463 | { | 1608 | { |
1609 | m_host.AddScriptLPS(1); | ||
1464 | NotImplemented("llGetInventoryNumber"); | 1610 | NotImplemented("llGetInventoryNumber"); |
1465 | return 0; | 1611 | return 0; |
1466 | } | 1612 | } |
1467 | 1613 | ||
1468 | public string llGetInventoryName(int type, int number) | 1614 | public string llGetInventoryName(int type, int number) |
1469 | { | 1615 | { |
1616 | m_host.AddScriptLPS(1); | ||
1470 | NotImplemented("llGetInventoryName"); | 1617 | NotImplemented("llGetInventoryName"); |
1471 | return String.Empty; | 1618 | return String.Empty; |
1472 | } | 1619 | } |
1473 | 1620 | ||
1474 | public void llSetScriptState(string name, int run) | 1621 | public void llSetScriptState(string name, int run) |
1475 | { | 1622 | { |
1623 | m_host.AddScriptLPS(1); | ||
1476 | NotImplemented("llSetScriptState"); | 1624 | NotImplemented("llSetScriptState"); |
1477 | } | 1625 | } |
1478 | 1626 | ||
1479 | public double llGetEnergy() | 1627 | public double llGetEnergy() |
1480 | { | 1628 | { |
1629 | m_host.AddScriptLPS(1); | ||
1481 | return 1.0f; | 1630 | return 1.0f; |
1482 | } | 1631 | } |
1483 | 1632 | ||
1484 | public void llGiveInventory(string destination, string inventory) | 1633 | public void llGiveInventory(string destination, string inventory) |
1485 | { | 1634 | { |
1635 | m_host.AddScriptLPS(1); | ||
1486 | NotImplemented("llGiveInventory"); | 1636 | NotImplemented("llGiveInventory"); |
1487 | } | 1637 | } |
1488 | 1638 | ||
1489 | public void llRemoveInventory(string item) | 1639 | public void llRemoveInventory(string item) |
1490 | { | 1640 | { |
1641 | m_host.AddScriptLPS(1); | ||
1491 | NotImplemented("llRemoveInventory"); | 1642 | NotImplemented("llRemoveInventory"); |
1492 | } | 1643 | } |
1493 | 1644 | ||
1494 | public void llSetText(string text, LSL_Types.Vector3 color, double alpha) | 1645 | public void llSetText(string text, LSL_Types.Vector3 color, double alpha) |
1495 | { | 1646 | { |
1647 | m_host.AddScriptLPS(1); | ||
1496 | Vector3 av3 = new Vector3((float)color.x, (float)color.y, (float)color.z); | 1648 | Vector3 av3 = new Vector3((float)color.x, (float)color.y, (float)color.z); |
1497 | m_host.SetText(text, av3, alpha); | 1649 | m_host.SetText(text, av3, alpha); |
1498 | } | 1650 | } |
1499 | 1651 | ||
1500 | public double llWater(LSL_Types.Vector3 offset) | 1652 | public double llWater(LSL_Types.Vector3 offset) |
1501 | { | 1653 | { |
1654 | m_host.AddScriptLPS(1); | ||
1502 | return World.RegionInfo.EstateSettings.waterHeight; | 1655 | return World.RegionInfo.EstateSettings.waterHeight; |
1503 | } | 1656 | } |
1504 | 1657 | ||
1505 | public void llPassTouches(int pass) | 1658 | public void llPassTouches(int pass) |
1506 | { | 1659 | { |
1660 | m_host.AddScriptLPS(1); | ||
1507 | NotImplemented("llPassTouches"); | 1661 | NotImplemented("llPassTouches"); |
1508 | } | 1662 | } |
1509 | 1663 | ||
1510 | public string llRequestAgentData(string id, int data) | 1664 | public string llRequestAgentData(string id, int data) |
1511 | { | 1665 | { |
1666 | m_host.AddScriptLPS(1); | ||
1512 | NotImplemented("llRequestAgentData"); | 1667 | NotImplemented("llRequestAgentData"); |
1513 | return String.Empty; | 1668 | return String.Empty; |
1514 | } | 1669 | } |
1515 | 1670 | ||
1516 | public string llRequestInventoryData(string name) | 1671 | public string llRequestInventoryData(string name) |
1517 | { | 1672 | { |
1673 | m_host.AddScriptLPS(1); | ||
1518 | NotImplemented("llRequestInventoryData"); | 1674 | NotImplemented("llRequestInventoryData"); |
1519 | return String.Empty; | 1675 | return String.Empty; |
1520 | } | 1676 | } |
1521 | 1677 | ||
1522 | public void llSetDamage(double damage) | 1678 | public void llSetDamage(double damage) |
1523 | { | 1679 | { |
1680 | m_host.AddScriptLPS(1); | ||
1524 | NotImplemented("llSetDamage"); | 1681 | NotImplemented("llSetDamage"); |
1525 | } | 1682 | } |
1526 | 1683 | ||
1527 | public void llTeleportAgentHome(string agent) | 1684 | public void llTeleportAgentHome(string agent) |
1528 | { | 1685 | { |
1686 | m_host.AddScriptLPS(1); | ||
1529 | NotImplemented("llTeleportAgentHome"); | 1687 | NotImplemented("llTeleportAgentHome"); |
1530 | } | 1688 | } |
1531 | 1689 | ||
1532 | public void llModifyLand(int action, int brush) | 1690 | public void llModifyLand(int action, int brush) |
1533 | { | 1691 | { |
1692 | m_host.AddScriptLPS(1); | ||
1534 | double dsize; | 1693 | double dsize; |
1535 | if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) | 1694 | if (World.PermissionsMngr.CanTerraform(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0))) |
1536 | { | 1695 | { |
@@ -1594,92 +1753,111 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1594 | 1753 | ||
1595 | public void llCollisionSound(string impact_sound, double impact_volume) | 1754 | public void llCollisionSound(string impact_sound, double impact_volume) |
1596 | { | 1755 | { |
1756 | m_host.AddScriptLPS(1); | ||
1597 | NotImplemented("llCollisionSound"); | 1757 | NotImplemented("llCollisionSound"); |
1598 | } | 1758 | } |
1599 | 1759 | ||
1600 | public void llCollisionSprite(string impact_sprite) | 1760 | public void llCollisionSprite(string impact_sprite) |
1601 | { | 1761 | { |
1762 | m_host.AddScriptLPS(1); | ||
1602 | NotImplemented("llCollisionSprite"); | 1763 | NotImplemented("llCollisionSprite"); |
1603 | } | 1764 | } |
1604 | 1765 | ||
1605 | public string llGetAnimation(string id) | 1766 | public string llGetAnimation(string id) |
1606 | { | 1767 | { |
1768 | m_host.AddScriptLPS(1); | ||
1607 | NotImplemented("llGetAnimation"); | 1769 | NotImplemented("llGetAnimation"); |
1608 | return String.Empty; | 1770 | return String.Empty; |
1609 | } | 1771 | } |
1610 | 1772 | ||
1611 | public void llResetScript() | 1773 | public void llResetScript() |
1612 | { | 1774 | { |
1775 | m_host.AddScriptLPS(1); | ||
1613 | m_ScriptEngine.m_ScriptManager.ResetScript(m_localID, m_itemID); | 1776 | m_ScriptEngine.m_ScriptManager.ResetScript(m_localID, m_itemID); |
1614 | } | 1777 | } |
1615 | 1778 | ||
1616 | public void llMessageLinked(int linknum, int num, string str, string id) | 1779 | public void llMessageLinked(int linknum, int num, string str, string id) |
1617 | { | 1780 | { |
1781 | m_host.AddScriptLPS(1); | ||
1618 | } | 1782 | } |
1619 | 1783 | ||
1620 | public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) | 1784 | public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) |
1621 | { | 1785 | { |
1786 | m_host.AddScriptLPS(1); | ||
1622 | } | 1787 | } |
1623 | 1788 | ||
1624 | public void llPassCollisions(int pass) | 1789 | public void llPassCollisions(int pass) |
1625 | { | 1790 | { |
1791 | m_host.AddScriptLPS(1); | ||
1626 | } | 1792 | } |
1627 | 1793 | ||
1628 | public string llGetScriptName() | 1794 | public string llGetScriptName() |
1629 | { | 1795 | { |
1796 | m_host.AddScriptLPS(1); | ||
1630 | return String.Empty; | 1797 | return String.Empty; |
1631 | } | 1798 | } |
1632 | 1799 | ||
1633 | public int llGetNumberOfSides() | 1800 | public int llGetNumberOfSides() |
1634 | { | 1801 | { |
1802 | m_host.AddScriptLPS(1); | ||
1635 | return 0; | 1803 | return 0; |
1636 | } | 1804 | } |
1637 | 1805 | ||
1638 | public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) | 1806 | public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) |
1639 | { | 1807 | { |
1808 | m_host.AddScriptLPS(1); | ||
1640 | return new LSL_Types.Quaternion(); | 1809 | return new LSL_Types.Quaternion(); |
1641 | } | 1810 | } |
1642 | 1811 | ||
1643 | public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) | 1812 | public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) |
1644 | { | 1813 | { |
1814 | m_host.AddScriptLPS(1); | ||
1645 | return new LSL_Types.Vector3(); | 1815 | return new LSL_Types.Vector3(); |
1646 | } | 1816 | } |
1647 | 1817 | ||
1648 | public void llRot2Angle() | 1818 | public void llRot2Angle() |
1649 | { | 1819 | { |
1820 | m_host.AddScriptLPS(1); | ||
1650 | } | 1821 | } |
1651 | 1822 | ||
1652 | public double llAcos(double val) | 1823 | public double llAcos(double val) |
1653 | { | 1824 | { |
1825 | m_host.AddScriptLPS(1); | ||
1654 | return (double)Math.Acos(val); | 1826 | return (double)Math.Acos(val); |
1655 | } | 1827 | } |
1656 | 1828 | ||
1657 | public double llAsin(double val) | 1829 | public double llAsin(double val) |
1658 | { | 1830 | { |
1831 | m_host.AddScriptLPS(1); | ||
1659 | return (double)Math.Asin(val); | 1832 | return (double)Math.Asin(val); |
1660 | } | 1833 | } |
1661 | 1834 | ||
1662 | public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) | 1835 | public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) |
1663 | { | 1836 | { |
1837 | m_host.AddScriptLPS(1); | ||
1664 | return 0; | 1838 | return 0; |
1665 | } | 1839 | } |
1666 | 1840 | ||
1667 | public string llGetInventoryKey(string name) | 1841 | public string llGetInventoryKey(string name) |
1668 | { | 1842 | { |
1843 | m_host.AddScriptLPS(1); | ||
1669 | return String.Empty; | 1844 | return String.Empty; |
1670 | } | 1845 | } |
1671 | 1846 | ||
1672 | public void llAllowInventoryDrop(int add) | 1847 | public void llAllowInventoryDrop(int add) |
1673 | { | 1848 | { |
1849 | m_host.AddScriptLPS(1); | ||
1674 | } | 1850 | } |
1675 | 1851 | ||
1676 | public LSL_Types.Vector3 llGetSunDirection() | 1852 | public LSL_Types.Vector3 llGetSunDirection() |
1677 | { | 1853 | { |
1854 | m_host.AddScriptLPS(1); | ||
1678 | return new LSL_Types.Vector3(); | 1855 | return new LSL_Types.Vector3(); |
1679 | } | 1856 | } |
1680 | 1857 | ||
1681 | public LSL_Types.Vector3 llGetTextureOffset(int face) | 1858 | public LSL_Types.Vector3 llGetTextureOffset(int face) |
1682 | { | 1859 | { |
1860 | m_host.AddScriptLPS(1); | ||
1683 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1861 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1684 | LSL_Types.Vector3 offset; | 1862 | LSL_Types.Vector3 offset; |
1685 | if (face == -1) | 1863 | if (face == -1) |
@@ -1694,6 +1872,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1694 | 1872 | ||
1695 | public LSL_Types.Vector3 llGetTextureScale(int side) | 1873 | public LSL_Types.Vector3 llGetTextureScale(int side) |
1696 | { | 1874 | { |
1875 | m_host.AddScriptLPS(1); | ||
1697 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1876 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1698 | LSL_Types.Vector3 scale; | 1877 | LSL_Types.Vector3 scale; |
1699 | if (side == -1) | 1878 | if (side == -1) |
@@ -1708,6 +1887,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1708 | 1887 | ||
1709 | public double llGetTextureRot(int face) | 1888 | public double llGetTextureRot(int face) |
1710 | { | 1889 | { |
1890 | m_host.AddScriptLPS(1); | ||
1711 | LLObject.TextureEntry tex = m_host.Shape.Textures; | 1891 | LLObject.TextureEntry tex = m_host.Shape.Textures; |
1712 | if (face == -1) | 1892 | if (face == -1) |
1713 | { | 1893 | { |
@@ -1718,23 +1898,27 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1718 | 1898 | ||
1719 | public int llSubStringIndex(string source, string pattern) | 1899 | public int llSubStringIndex(string source, string pattern) |
1720 | { | 1900 | { |
1901 | m_host.AddScriptLPS(1); | ||
1721 | return source.IndexOf(pattern); | 1902 | return source.IndexOf(pattern); |
1722 | } | 1903 | } |
1723 | 1904 | ||
1724 | public string llGetOwnerKey(string id) | 1905 | public string llGetOwnerKey(string id) |
1725 | { | 1906 | { |
1907 | m_host.AddScriptLPS(1); | ||
1726 | NotImplemented("llGetOwnerKey"); | 1908 | NotImplemented("llGetOwnerKey"); |
1727 | return String.Empty; | 1909 | return String.Empty; |
1728 | } | 1910 | } |
1729 | 1911 | ||
1730 | public LSL_Types.Vector3 llGetCenterOfMass() | 1912 | public LSL_Types.Vector3 llGetCenterOfMass() |
1731 | { | 1913 | { |
1914 | m_host.AddScriptLPS(1); | ||
1732 | NotImplemented("llGetCenterOfMass"); | 1915 | NotImplemented("llGetCenterOfMass"); |
1733 | return new LSL_Types.Vector3(); | 1916 | return new LSL_Types.Vector3(); |
1734 | } | 1917 | } |
1735 | 1918 | ||
1736 | public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) | 1919 | public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) |
1737 | { | 1920 | { |
1921 | m_host.AddScriptLPS(1); | ||
1738 | // SortedList<string, LSL_Types.list> sorted = new SortedList<string, LSL_Types.list>(); | 1922 | // SortedList<string, LSL_Types.list> sorted = new SortedList<string, LSL_Types.list>(); |
1739 | // Add chunks to an array | 1923 | // Add chunks to an array |
1740 | //int s = stride; | 1924 | //int s = stride; |
@@ -1775,11 +1959,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1775 | 1959 | ||
1776 | public int llGetListLength(LSL_Types.list src) | 1960 | public int llGetListLength(LSL_Types.list src) |
1777 | { | 1961 | { |
1962 | m_host.AddScriptLPS(1); | ||
1778 | return src.Length; | 1963 | return src.Length; |
1779 | } | 1964 | } |
1780 | 1965 | ||
1781 | public int llList2Integer(LSL_Types.list src, int index) | 1966 | public int llList2Integer(LSL_Types.list src, int index) |
1782 | { | 1967 | { |
1968 | m_host.AddScriptLPS(1); | ||
1783 | if (index < 0) | 1969 | if (index < 0) |
1784 | { | 1970 | { |
1785 | index = src.Length + index; | 1971 | index = src.Length + index; |
@@ -1793,6 +1979,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1793 | 1979 | ||
1794 | public double osList2Double(LSL_Types.list src, int index) | 1980 | public double osList2Double(LSL_Types.list src, int index) |
1795 | { | 1981 | { |
1982 | m_host.AddScriptLPS(1); | ||
1796 | if (index < 0) | 1983 | if (index < 0) |
1797 | { | 1984 | { |
1798 | index = src.Length + index; | 1985 | index = src.Length + index; |
@@ -1806,6 +1993,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1806 | 1993 | ||
1807 | public double llList2Float(LSL_Types.list src, int index) | 1994 | public double llList2Float(LSL_Types.list src, int index) |
1808 | { | 1995 | { |
1996 | m_host.AddScriptLPS(1); | ||
1809 | if (index < 0) | 1997 | if (index < 0) |
1810 | { | 1998 | { |
1811 | index = src.Length + index; | 1999 | index = src.Length + index; |
@@ -1819,6 +2007,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1819 | 2007 | ||
1820 | public string llList2String(LSL_Types.list src, int index) | 2008 | public string llList2String(LSL_Types.list src, int index) |
1821 | { | 2009 | { |
2010 | m_host.AddScriptLPS(1); | ||
1822 | if (index < 0) | 2011 | if (index < 0) |
1823 | { | 2012 | { |
1824 | index = src.Length + index; | 2013 | index = src.Length + index; |
@@ -1832,6 +2021,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1832 | 2021 | ||
1833 | public string llList2Key(LSL_Types.list src, int index) | 2022 | public string llList2Key(LSL_Types.list src, int index) |
1834 | { | 2023 | { |
2024 | m_host.AddScriptLPS(1); | ||
1835 | if (index < 0) | 2025 | if (index < 0) |
1836 | { | 2026 | { |
1837 | index = src.Length + index; | 2027 | index = src.Length + index; |
@@ -1854,6 +2044,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1854 | 2044 | ||
1855 | public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) | 2045 | public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) |
1856 | { | 2046 | { |
2047 | m_host.AddScriptLPS(1); | ||
1857 | if (index < 0) | 2048 | if (index < 0) |
1858 | { | 2049 | { |
1859 | index = src.Length + index; | 2050 | index = src.Length + index; |
@@ -1874,6 +2065,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1874 | 2065 | ||
1875 | public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) | 2066 | public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) |
1876 | { | 2067 | { |
2068 | m_host.AddScriptLPS(1); | ||
1877 | if (index < 0) | 2069 | if (index < 0) |
1878 | { | 2070 | { |
1879 | index = src.Length + index; | 2071 | index = src.Length + index; |
@@ -1894,6 +2086,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1894 | 2086 | ||
1895 | public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) | 2087 | public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) |
1896 | { | 2088 | { |
2089 | m_host.AddScriptLPS(1); | ||
1897 | return src.GetSublist(start, end); | 2090 | return src.GetSublist(start, end); |
1898 | } | 2091 | } |
1899 | 2092 | ||
@@ -1909,6 +2102,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1909 | 2102 | ||
1910 | public int llGetListEntryType(LSL_Types.list src, int index) | 2103 | public int llGetListEntryType(LSL_Types.list src, int index) |
1911 | { | 2104 | { |
2105 | m_host.AddScriptLPS(1); | ||
1912 | if (index < 0) | 2106 | if (index < 0) |
1913 | { | 2107 | { |
1914 | index = src.Length + index; | 2108 | index = src.Length + index; |
@@ -1946,6 +2140,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1946 | 2140 | ||
1947 | public string llList2CSV(LSL_Types.list src) | 2141 | public string llList2CSV(LSL_Types.list src) |
1948 | { | 2142 | { |
2143 | m_host.AddScriptLPS(1); | ||
1949 | string ret = String.Empty; | 2144 | string ret = String.Empty; |
1950 | foreach (object o in src.Data) | 2145 | foreach (object o in src.Data) |
1951 | { | 2146 | { |
@@ -1957,11 +2152,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
1957 | 2152 | ||
1958 | public LSL_Types.list llCSV2List(string src) | 2153 | public LSL_Types.list llCSV2List(string src) |
1959 | { | 2154 | { |
2155 | m_host.AddScriptLPS(1); | ||
1960 | return new LSL_Types.list(src.Split(",".ToCharArray())); | 2156 | return new LSL_Types.list(src.Split(",".ToCharArray())); |
1961 | } | 2157 | } |
1962 | 2158 | ||
1963 | public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) | 2159 | public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) |
1964 | { | 2160 | { |
2161 | m_host.AddScriptLPS(1); | ||
1965 | //int s = stride; | 2162 | //int s = stride; |
1966 | //if (s < 1) | 2163 | //if (s < 1) |
1967 | // s = 1; | 2164 | // s = 1; |
@@ -2007,6 +2204,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2007 | 2204 | ||
2008 | public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) | 2205 | public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) |
2009 | { | 2206 | { |
2207 | m_host.AddScriptLPS(1); | ||
2010 | LSL_Types.list ret = new LSL_Types.list(); | 2208 | LSL_Types.list ret = new LSL_Types.list(); |
2011 | //int s = stride; | 2209 | //int s = stride; |
2012 | //if (s < 1) | 2210 | //if (s < 1) |
@@ -2031,16 +2229,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2031 | 2229 | ||
2032 | public LSL_Types.Vector3 llGetRegionCorner() | 2230 | public LSL_Types.Vector3 llGetRegionCorner() |
2033 | { | 2231 | { |
2232 | m_host.AddScriptLPS(1); | ||
2034 | return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * 256, World.RegionInfo.RegionLocY * 256, 0); | 2233 | return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * 256, World.RegionInfo.RegionLocY * 256, 0); |
2035 | } | 2234 | } |
2036 | 2235 | ||
2037 | public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start) | 2236 | public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start) |
2038 | { | 2237 | { |
2238 | m_host.AddScriptLPS(1); | ||
2039 | return dest.GetSublist(0, start - 1) + src + dest.GetSublist(start, -1); | 2239 | return dest.GetSublist(0, start - 1) + src + dest.GetSublist(start, -1); |
2040 | } | 2240 | } |
2041 | 2241 | ||
2042 | public int llListFindList(LSL_Types.list src, LSL_Types.list test) | 2242 | public int llListFindList(LSL_Types.list src, LSL_Types.list test) |
2043 | { | 2243 | { |
2244 | m_host.AddScriptLPS(1); | ||
2044 | //foreach (string s in test) | 2245 | //foreach (string s in test) |
2045 | //{ | 2246 | //{ |
2046 | // for (int ci = 0; ci < src.Count; ci++) | 2247 | // for (int ci = 0; ci < src.Count; ci++) |
@@ -2055,16 +2256,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2055 | 2256 | ||
2056 | public string llGetObjectName() | 2257 | public string llGetObjectName() |
2057 | { | 2258 | { |
2259 | m_host.AddScriptLPS(1); | ||
2058 | return m_host.Name; | 2260 | return m_host.Name; |
2059 | } | 2261 | } |
2060 | 2262 | ||
2061 | public void llSetObjectName(string name) | 2263 | public void llSetObjectName(string name) |
2062 | { | 2264 | { |
2265 | m_host.AddScriptLPS(1); | ||
2063 | m_host.Name = name; | 2266 | m_host.Name = name; |
2064 | } | 2267 | } |
2065 | 2268 | ||
2066 | public string llGetDate() | 2269 | public string llGetDate() |
2067 | { | 2270 | { |
2271 | m_host.AddScriptLPS(1); | ||
2068 | DateTime date = DateTime.Now.ToUniversalTime(); | 2272 | DateTime date = DateTime.Now.ToUniversalTime(); |
2069 | string result = date.ToString("yyyy-MM-dd"); | 2273 | string result = date.ToString("yyyy-MM-dd"); |
2070 | return result; | 2274 | return result; |
@@ -2072,33 +2276,39 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2072 | 2276 | ||
2073 | public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) | 2277 | public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) |
2074 | { | 2278 | { |
2279 | m_host.AddScriptLPS(1); | ||
2075 | NotImplemented("llEdgeOfWorld"); | 2280 | NotImplemented("llEdgeOfWorld"); |
2076 | return 0; | 2281 | return 0; |
2077 | } | 2282 | } |
2078 | 2283 | ||
2079 | public int llGetAgentInfo(string id) | 2284 | public int llGetAgentInfo(string id) |
2080 | { | 2285 | { |
2286 | m_host.AddScriptLPS(1); | ||
2081 | NotImplemented("llGetAgentInfo"); | 2287 | NotImplemented("llGetAgentInfo"); |
2082 | return 0; | 2288 | return 0; |
2083 | } | 2289 | } |
2084 | 2290 | ||
2085 | public void llAdjustSoundVolume(double volume) | 2291 | public void llAdjustSoundVolume(double volume) |
2086 | { | 2292 | { |
2293 | m_host.AddScriptLPS(1); | ||
2087 | NotImplemented("llAdjustSoundVolume"); | 2294 | NotImplemented("llAdjustSoundVolume"); |
2088 | } | 2295 | } |
2089 | 2296 | ||
2090 | public void llSetSoundQueueing(int queue) | 2297 | public void llSetSoundQueueing(int queue) |
2091 | { | 2298 | { |
2299 | m_host.AddScriptLPS(1); | ||
2092 | NotImplemented("llSetSoundQueueing"); | 2300 | NotImplemented("llSetSoundQueueing"); |
2093 | } | 2301 | } |
2094 | 2302 | ||
2095 | public void llSetSoundRadius(double radius) | 2303 | public void llSetSoundRadius(double radius) |
2096 | { | 2304 | { |
2305 | m_host.AddScriptLPS(1); | ||
2097 | NotImplemented("llSetSoundRadius"); | 2306 | NotImplemented("llSetSoundRadius"); |
2098 | } | 2307 | } |
2099 | 2308 | ||
2100 | public string llKey2Name(string id) | 2309 | public string llKey2Name(string id) |
2101 | { | 2310 | { |
2311 | m_host.AddScriptLPS(1); | ||
2102 | NotImplemented("llKey2Name"); | 2312 | NotImplemented("llKey2Name"); |
2103 | return String.Empty; | 2313 | return String.Empty; |
2104 | } | 2314 | } |
@@ -2107,6 +2317,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2107 | 2317 | ||
2108 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | 2318 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) |
2109 | { | 2319 | { |
2320 | m_host.AddScriptLPS(1); | ||
2110 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); | 2321 | Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); |
2111 | pTexAnim.Flags =(uint) mode; | 2322 | pTexAnim.Flags =(uint) mode; |
2112 | 2323 | ||
@@ -2128,16 +2339,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2128 | public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, | 2339 | public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, |
2129 | LSL_Types.Vector3 bottom_south_west) | 2340 | LSL_Types.Vector3 bottom_south_west) |
2130 | { | 2341 | { |
2342 | m_host.AddScriptLPS(1); | ||
2131 | NotImplemented("llTriggerSoundLimited"); | 2343 | NotImplemented("llTriggerSoundLimited"); |
2132 | } | 2344 | } |
2133 | 2345 | ||
2134 | public void llEjectFromLand(string pest) | 2346 | public void llEjectFromLand(string pest) |
2135 | { | 2347 | { |
2348 | m_host.AddScriptLPS(1); | ||
2136 | NotImplemented("llEjectFromLand"); | 2349 | NotImplemented("llEjectFromLand"); |
2137 | } | 2350 | } |
2138 | 2351 | ||
2139 | public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) | 2352 | public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) |
2140 | { | 2353 | { |
2354 | m_host.AddScriptLPS(1); | ||
2141 | LSL_Types.list ret = new LSL_Types.list(); | 2355 | LSL_Types.list ret = new LSL_Types.list(); |
2142 | object[] delimeters = new object[separators.Length + spacers.Length]; | 2356 | object[] delimeters = new object[separators.Length + spacers.Length]; |
2143 | separators.Data.CopyTo(delimeters, 0); | 2357 | separators.Data.CopyTo(delimeters, 0); |
@@ -2189,80 +2403,94 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2189 | 2403 | ||
2190 | public int llOverMyLand(string id) | 2404 | public int llOverMyLand(string id) |
2191 | { | 2405 | { |
2406 | m_host.AddScriptLPS(1); | ||
2192 | NotImplemented("llOverMyLand"); | 2407 | NotImplemented("llOverMyLand"); |
2193 | return 0; | 2408 | return 0; |
2194 | } | 2409 | } |
2195 | 2410 | ||
2196 | public string llGetLandOwnerAt(LSL_Types.Vector3 pos) | 2411 | public string llGetLandOwnerAt(LSL_Types.Vector3 pos) |
2197 | { | 2412 | { |
2413 | m_host.AddScriptLPS(1); | ||
2198 | return World.GetLandOwner((float)pos.x, (float)pos.y).ToString(); | 2414 | return World.GetLandOwner((float)pos.x, (float)pos.y).ToString(); |
2199 | } | 2415 | } |
2200 | 2416 | ||
2201 | public string llGetNotecardLine(string name, int line) | 2417 | public string llGetNotecardLine(string name, int line) |
2202 | { | 2418 | { |
2419 | m_host.AddScriptLPS(1); | ||
2203 | NotImplemented("llGetNotecardLine"); | 2420 | NotImplemented("llGetNotecardLine"); |
2204 | return String.Empty; | 2421 | return String.Empty; |
2205 | } | 2422 | } |
2206 | 2423 | ||
2207 | public LSL_Types.Vector3 llGetAgentSize(string id) | 2424 | public LSL_Types.Vector3 llGetAgentSize(string id) |
2208 | { | 2425 | { |
2426 | m_host.AddScriptLPS(1); | ||
2209 | NotImplemented("llGetAgentSize"); | 2427 | NotImplemented("llGetAgentSize"); |
2210 | return new LSL_Types.Vector3(); | 2428 | return new LSL_Types.Vector3(); |
2211 | } | 2429 | } |
2212 | 2430 | ||
2213 | public int llSameGroup(string agent) | 2431 | public int llSameGroup(string agent) |
2214 | { | 2432 | { |
2433 | m_host.AddScriptLPS(1); | ||
2215 | NotImplemented("llSameGroup"); | 2434 | NotImplemented("llSameGroup"); |
2216 | return 0; | 2435 | return 0; |
2217 | } | 2436 | } |
2218 | 2437 | ||
2219 | public void llUnSit(string id) | 2438 | public void llUnSit(string id) |
2220 | { | 2439 | { |
2440 | m_host.AddScriptLPS(1); | ||
2221 | NotImplemented("llUnSit"); | 2441 | NotImplemented("llUnSit"); |
2222 | } | 2442 | } |
2223 | 2443 | ||
2224 | public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) | 2444 | public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) |
2225 | { | 2445 | { |
2446 | m_host.AddScriptLPS(1); | ||
2226 | NotImplemented("llGroundSlope"); | 2447 | NotImplemented("llGroundSlope"); |
2227 | return new LSL_Types.Vector3(); | 2448 | return new LSL_Types.Vector3(); |
2228 | } | 2449 | } |
2229 | 2450 | ||
2230 | public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) | 2451 | public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) |
2231 | { | 2452 | { |
2453 | m_host.AddScriptLPS(1); | ||
2232 | NotImplemented("llGroundNormal"); | 2454 | NotImplemented("llGroundNormal"); |
2233 | return new LSL_Types.Vector3(); | 2455 | return new LSL_Types.Vector3(); |
2234 | } | 2456 | } |
2235 | 2457 | ||
2236 | public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) | 2458 | public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) |
2237 | { | 2459 | { |
2460 | m_host.AddScriptLPS(1); | ||
2238 | NotImplemented("llGroundContour"); | 2461 | NotImplemented("llGroundContour"); |
2239 | return new LSL_Types.Vector3(); | 2462 | return new LSL_Types.Vector3(); |
2240 | } | 2463 | } |
2241 | 2464 | ||
2242 | public int llGetAttached() | 2465 | public int llGetAttached() |
2243 | { | 2466 | { |
2467 | m_host.AddScriptLPS(1); | ||
2244 | NotImplemented("llGetAttached"); | 2468 | NotImplemented("llGetAttached"); |
2245 | return 0; | 2469 | return 0; |
2246 | } | 2470 | } |
2247 | 2471 | ||
2248 | public int llGetFreeMemory() | 2472 | public int llGetFreeMemory() |
2249 | { | 2473 | { |
2474 | m_host.AddScriptLPS(1); | ||
2250 | NotImplemented("llGetFreeMemory"); | 2475 | NotImplemented("llGetFreeMemory"); |
2251 | return 0; | 2476 | return 0; |
2252 | } | 2477 | } |
2253 | 2478 | ||
2254 | public string llGetRegionName() | 2479 | public string llGetRegionName() |
2255 | { | 2480 | { |
2481 | m_host.AddScriptLPS(1); | ||
2256 | return World.RegionInfo.RegionName; | 2482 | return World.RegionInfo.RegionName; |
2257 | } | 2483 | } |
2258 | 2484 | ||
2259 | public double llGetRegionTimeDilation() | 2485 | public double llGetRegionTimeDilation() |
2260 | { | 2486 | { |
2487 | m_host.AddScriptLPS(1); | ||
2261 | return (double)World.TimeDilation; | 2488 | return (double)World.TimeDilation; |
2262 | } | 2489 | } |
2263 | 2490 | ||
2264 | public double llGetRegionFPS() | 2491 | public double llGetRegionFPS() |
2265 | { | 2492 | { |
2493 | m_host.AddScriptLPS(1); | ||
2266 | return 10.0f; | 2494 | return 10.0f; |
2267 | } | 2495 | } |
2268 | 2496 | ||
@@ -2313,6 +2541,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2313 | 2541 | ||
2314 | public void llParticleSystem(LSL_Types.list rules) | 2542 | public void llParticleSystem(LSL_Types.list rules) |
2315 | { | 2543 | { |
2544 | m_host.AddScriptLPS(1); | ||
2316 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); | 2545 | Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); |
2317 | LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); | 2546 | LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); |
2318 | 2547 | ||
@@ -2455,46 +2684,55 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2455 | 2684 | ||
2456 | public void llGroundRepel(double height, int water, double tau) | 2685 | public void llGroundRepel(double height, int water, double tau) |
2457 | { | 2686 | { |
2687 | m_host.AddScriptLPS(1); | ||
2458 | NotImplemented("llGroundRepel"); | 2688 | NotImplemented("llGroundRepel"); |
2459 | } | 2689 | } |
2460 | 2690 | ||
2461 | public void llGiveInventoryList() | 2691 | public void llGiveInventoryList() |
2462 | { | 2692 | { |
2693 | m_host.AddScriptLPS(1); | ||
2463 | NotImplemented("llGiveInventoryList"); | 2694 | NotImplemented("llGiveInventoryList"); |
2464 | } | 2695 | } |
2465 | 2696 | ||
2466 | public void llSetVehicleType(int type) | 2697 | public void llSetVehicleType(int type) |
2467 | { | 2698 | { |
2699 | m_host.AddScriptLPS(1); | ||
2468 | NotImplemented("llSetVehicleType"); | 2700 | NotImplemented("llSetVehicleType"); |
2469 | } | 2701 | } |
2470 | 2702 | ||
2471 | public void llSetVehicledoubleParam(int param, double value) | 2703 | public void llSetVehicledoubleParam(int param, double value) |
2472 | { | 2704 | { |
2705 | m_host.AddScriptLPS(1); | ||
2473 | NotImplemented("llSetVehicledoubleParam"); | 2706 | NotImplemented("llSetVehicledoubleParam"); |
2474 | } | 2707 | } |
2475 | 2708 | ||
2476 | public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) | 2709 | public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) |
2477 | { | 2710 | { |
2711 | m_host.AddScriptLPS(1); | ||
2478 | NotImplemented("llSetVehicleVectorParam"); | 2712 | NotImplemented("llSetVehicleVectorParam"); |
2479 | } | 2713 | } |
2480 | 2714 | ||
2481 | public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) | 2715 | public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) |
2482 | { | 2716 | { |
2717 | m_host.AddScriptLPS(1); | ||
2483 | NotImplemented("llSetVehicleRotationParam"); | 2718 | NotImplemented("llSetVehicleRotationParam"); |
2484 | } | 2719 | } |
2485 | 2720 | ||
2486 | public void llSetVehicleFlags(int flags) | 2721 | public void llSetVehicleFlags(int flags) |
2487 | { | 2722 | { |
2723 | m_host.AddScriptLPS(1); | ||
2488 | NotImplemented("llSetVehicleFlags"); | 2724 | NotImplemented("llSetVehicleFlags"); |
2489 | } | 2725 | } |
2490 | 2726 | ||
2491 | public void llRemoveVehicleFlags(int flags) | 2727 | public void llRemoveVehicleFlags(int flags) |
2492 | { | 2728 | { |
2729 | m_host.AddScriptLPS(1); | ||
2493 | NotImplemented("llRemoveVehicleFlags"); | 2730 | NotImplemented("llRemoveVehicleFlags"); |
2494 | } | 2731 | } |
2495 | 2732 | ||
2496 | public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) | 2733 | public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) |
2497 | { | 2734 | { |
2735 | m_host.AddScriptLPS(1); | ||
2498 | // LSL quaternions can normalize to 0, normal Quaternions can't. | 2736 | // LSL quaternions can normalize to 0, normal Quaternions can't. |
2499 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) | 2737 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) |
2500 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 | 2738 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 |
@@ -2504,6 +2742,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2504 | 2742 | ||
2505 | public string llAvatarOnSitTarget() | 2743 | public string llAvatarOnSitTarget() |
2506 | { | 2744 | { |
2745 | m_host.AddScriptLPS(1); | ||
2507 | LLUUID AVID = m_host.GetAvatarOnSitTarget(); | 2746 | LLUUID AVID = m_host.GetAvatarOnSitTarget(); |
2508 | 2747 | ||
2509 | if (AVID != LLUUID.Zero) | 2748 | if (AVID != LLUUID.Zero) |
@@ -2514,31 +2753,37 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2514 | 2753 | ||
2515 | public void llAddToLandPassList(string avatar, double hours) | 2754 | public void llAddToLandPassList(string avatar, double hours) |
2516 | { | 2755 | { |
2756 | m_host.AddScriptLPS(1); | ||
2517 | NotImplemented("llAddToLandPassList"); | 2757 | NotImplemented("llAddToLandPassList"); |
2518 | } | 2758 | } |
2519 | 2759 | ||
2520 | public void llSetTouchText(string text) | 2760 | public void llSetTouchText(string text) |
2521 | { | 2761 | { |
2762 | m_host.AddScriptLPS(1); | ||
2522 | m_host.TouchName = text; | 2763 | m_host.TouchName = text; |
2523 | } | 2764 | } |
2524 | 2765 | ||
2525 | public void llSetSitText(string text) | 2766 | public void llSetSitText(string text) |
2526 | { | 2767 | { |
2768 | m_host.AddScriptLPS(1); | ||
2527 | m_host.SitName = text; | 2769 | m_host.SitName = text; |
2528 | } | 2770 | } |
2529 | 2771 | ||
2530 | public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) | 2772 | public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) |
2531 | { | 2773 | { |
2774 | m_host.AddScriptLPS(1); | ||
2532 | NotImplemented("llSetCameraEyeOffset"); | 2775 | NotImplemented("llSetCameraEyeOffset"); |
2533 | } | 2776 | } |
2534 | 2777 | ||
2535 | public void llSetCameraAtOffset(LSL_Types.Vector3 offset) | 2778 | public void llSetCameraAtOffset(LSL_Types.Vector3 offset) |
2536 | { | 2779 | { |
2780 | m_host.AddScriptLPS(1); | ||
2537 | NotImplemented("llSetCameraAtOffset"); | 2781 | NotImplemented("llSetCameraAtOffset"); |
2538 | } | 2782 | } |
2539 | 2783 | ||
2540 | public string llDumpList2String(LSL_Types.list src, string seperator) | 2784 | public string llDumpList2String(LSL_Types.list src, string seperator) |
2541 | { | 2785 | { |
2786 | m_host.AddScriptLPS(1); | ||
2542 | if (src.Length == 0) | 2787 | if (src.Length == 0) |
2543 | { | 2788 | { |
2544 | return String.Empty; | 2789 | return String.Empty; |
@@ -2554,11 +2799,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2554 | 2799 | ||
2555 | public void llScriptDanger(LSL_Types.Vector3 pos) | 2800 | public void llScriptDanger(LSL_Types.Vector3 pos) |
2556 | { | 2801 | { |
2802 | m_host.AddScriptLPS(1); | ||
2557 | NotImplemented("llScriptDanger"); | 2803 | NotImplemented("llScriptDanger"); |
2558 | } | 2804 | } |
2559 | 2805 | ||
2560 | public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) | 2806 | public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) |
2561 | { | 2807 | { |
2808 | m_host.AddScriptLPS(1); | ||
2562 | LLUUID av = new LLUUID(); | 2809 | LLUUID av = new LLUUID(); |
2563 | if (!LLUUID.TryParse(avatar,out av)) | 2810 | if (!LLUUID.TryParse(avatar,out av)) |
2564 | { | 2811 | { |
@@ -2576,32 +2823,38 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2576 | 2823 | ||
2577 | public void llVolumeDetect(int detect) | 2824 | public void llVolumeDetect(int detect) |
2578 | { | 2825 | { |
2826 | m_host.AddScriptLPS(1); | ||
2579 | NotImplemented("llVolumeDetect"); | 2827 | NotImplemented("llVolumeDetect"); |
2580 | } | 2828 | } |
2581 | 2829 | ||
2582 | public void llResetOtherScript(string name) | 2830 | public void llResetOtherScript(string name) |
2583 | { | 2831 | { |
2832 | m_host.AddScriptLPS(1); | ||
2584 | NotImplemented("llResetOtherScript"); | 2833 | NotImplemented("llResetOtherScript"); |
2585 | } | 2834 | } |
2586 | 2835 | ||
2587 | public int llGetScriptState(string name) | 2836 | public int llGetScriptState(string name) |
2588 | { | 2837 | { |
2838 | m_host.AddScriptLPS(1); | ||
2589 | NotImplemented("llGetScriptState"); | 2839 | NotImplemented("llGetScriptState"); |
2590 | return 0; | 2840 | return 0; |
2591 | } | 2841 | } |
2592 | 2842 | ||
2593 | public void llRemoteLoadScript() | 2843 | public void llRemoteLoadScript() |
2594 | { | 2844 | { |
2845 | m_host.AddScriptLPS(1); | ||
2595 | NotImplemented("llRemoteLoadScript"); | 2846 | NotImplemented("llRemoteLoadScript"); |
2596 | } | 2847 | } |
2597 | 2848 | ||
2598 | public void llSetRemoteScriptAccessPin(int pin) | 2849 | public void llSetRemoteScriptAccessPin(int pin) |
2599 | { | 2850 | { |
2851 | m_host.AddScriptLPS(1); | ||
2600 | NotImplemented("llSetRemoteScriptAccessPin"); | 2852 | NotImplemented("llSetRemoteScriptAccessPin"); |
2601 | } | 2853 | } |
2602 | 2854 | ||
2603 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | 2855 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) |
2604 | { | 2856 | { |
2857 | m_host.AddScriptLPS(1); | ||
2605 | NotImplemented("llRemoteLoadScriptPin"); | 2858 | NotImplemented("llRemoteLoadScriptPin"); |
2606 | } | 2859 | } |
2607 | 2860 | ||
@@ -2612,6 +2865,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2612 | // REMOTE_DATA_REPLY = 3 | 2865 | // REMOTE_DATA_REPLY = 3 |
2613 | public void llOpenRemoteDataChannel() | 2866 | public void llOpenRemoteDataChannel() |
2614 | { | 2867 | { |
2868 | m_host.AddScriptLPS(1); | ||
2615 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 2869 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
2616 | if (xmlrpcMod.IsEnabled()) | 2870 | if (xmlrpcMod.IsEnabled()) |
2617 | { | 2871 | { |
@@ -2623,34 +2877,40 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2623 | 2877 | ||
2624 | public string llSendRemoteData(string channel, string dest, int idata, string sdata) | 2878 | public string llSendRemoteData(string channel, string dest, int idata, string sdata) |
2625 | { | 2879 | { |
2880 | m_host.AddScriptLPS(1); | ||
2626 | NotImplemented("llSendRemoteData"); | 2881 | NotImplemented("llSendRemoteData"); |
2627 | return String.Empty; | 2882 | return String.Empty; |
2628 | } | 2883 | } |
2629 | 2884 | ||
2630 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) | 2885 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) |
2631 | { | 2886 | { |
2887 | m_host.AddScriptLPS(1); | ||
2632 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 2888 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
2633 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 2889 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); |
2634 | } | 2890 | } |
2635 | 2891 | ||
2636 | public void llCloseRemoteDataChannel(string channel) | 2892 | public void llCloseRemoteDataChannel(string channel) |
2637 | { | 2893 | { |
2894 | m_host.AddScriptLPS(1); | ||
2638 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 2895 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
2639 | xmlrpcMod.CloseXMLRPCChannel(channel); | 2896 | xmlrpcMod.CloseXMLRPCChannel(channel); |
2640 | } | 2897 | } |
2641 | 2898 | ||
2642 | public string llMD5String(string src, int nonce) | 2899 | public string llMD5String(string src, int nonce) |
2643 | { | 2900 | { |
2901 | m_host.AddScriptLPS(1); | ||
2644 | return Util.Md5Hash(src + ":" + nonce.ToString()); | 2902 | return Util.Md5Hash(src + ":" + nonce.ToString()); |
2645 | } | 2903 | } |
2646 | 2904 | ||
2647 | public void llSetPrimitiveParams(LSL_Types.list rules) | 2905 | public void llSetPrimitiveParams(LSL_Types.list rules) |
2648 | { | 2906 | { |
2907 | m_host.AddScriptLPS(1); | ||
2649 | NotImplemented("llSetPrimitiveParams"); | 2908 | NotImplemented("llSetPrimitiveParams"); |
2650 | } | 2909 | } |
2651 | 2910 | ||
2652 | public string llStringToBase64(string str) | 2911 | public string llStringToBase64(string str) |
2653 | { | 2912 | { |
2913 | m_host.AddScriptLPS(1); | ||
2654 | try | 2914 | try |
2655 | { | 2915 | { |
2656 | byte[] encData_byte = new byte[str.Length]; | 2916 | byte[] encData_byte = new byte[str.Length]; |
@@ -2666,6 +2926,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2666 | 2926 | ||
2667 | public string llBase64ToString(string str) | 2927 | public string llBase64ToString(string str) |
2668 | { | 2928 | { |
2929 | m_host.AddScriptLPS(1); | ||
2669 | UTF8Encoding encoder = new UTF8Encoding(); | 2930 | UTF8Encoding encoder = new UTF8Encoding(); |
2670 | Decoder utf8Decode = encoder.GetDecoder(); | 2931 | Decoder utf8Decode = encoder.GetDecoder(); |
2671 | try | 2932 | try |
@@ -2685,32 +2946,38 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2685 | 2946 | ||
2686 | public void llXorBase64Strings() | 2947 | public void llXorBase64Strings() |
2687 | { | 2948 | { |
2949 | m_host.AddScriptLPS(1); | ||
2688 | throw new Exception("Command deprecated! Use llXorBase64StringsCorrect instead."); | 2950 | throw new Exception("Command deprecated! Use llXorBase64StringsCorrect instead."); |
2689 | } | 2951 | } |
2690 | 2952 | ||
2691 | public void llRemoteDataSetRegion() | 2953 | public void llRemoteDataSetRegion() |
2692 | { | 2954 | { |
2955 | m_host.AddScriptLPS(1); | ||
2693 | NotImplemented("llRemoteDataSetRegion"); | 2956 | NotImplemented("llRemoteDataSetRegion"); |
2694 | } | 2957 | } |
2695 | 2958 | ||
2696 | public double llLog10(double val) | 2959 | public double llLog10(double val) |
2697 | { | 2960 | { |
2961 | m_host.AddScriptLPS(1); | ||
2698 | return (double)Math.Log10(val); | 2962 | return (double)Math.Log10(val); |
2699 | } | 2963 | } |
2700 | 2964 | ||
2701 | public double llLog(double val) | 2965 | public double llLog(double val) |
2702 | { | 2966 | { |
2967 | m_host.AddScriptLPS(1); | ||
2703 | return (double)Math.Log(val); | 2968 | return (double)Math.Log(val); |
2704 | } | 2969 | } |
2705 | 2970 | ||
2706 | public LSL_Types.list llGetAnimationList(string id) | 2971 | public LSL_Types.list llGetAnimationList(string id) |
2707 | { | 2972 | { |
2973 | m_host.AddScriptLPS(1); | ||
2708 | NotImplemented("llGetAnimationList"); | 2974 | NotImplemented("llGetAnimationList"); |
2709 | return new LSL_Types.list(); | 2975 | return new LSL_Types.list(); |
2710 | } | 2976 | } |
2711 | 2977 | ||
2712 | public void llSetParcelMusicURL(string url) | 2978 | public void llSetParcelMusicURL(string url) |
2713 | { | 2979 | { |
2980 | m_host.AddScriptLPS(1); | ||
2714 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 2981 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
2715 | if (landowner.Equals(null)) | 2982 | if (landowner.Equals(null)) |
2716 | { | 2983 | { |
@@ -2725,11 +2992,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2725 | 2992 | ||
2726 | public LSL_Types.Vector3 llGetRootPosition() | 2993 | public LSL_Types.Vector3 llGetRootPosition() |
2727 | { | 2994 | { |
2995 | m_host.AddScriptLPS(1); | ||
2728 | return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); | 2996 | return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); |
2729 | } | 2997 | } |
2730 | 2998 | ||
2731 | public LSL_Types.Quaternion llGetRootRotation() | 2999 | public LSL_Types.Quaternion llGetRootRotation() |
2732 | { | 3000 | { |
3001 | m_host.AddScriptLPS(1); | ||
2733 | return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); | 3002 | return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); |
2734 | } | 3003 | } |
2735 | 3004 | ||
@@ -2740,21 +3009,25 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2740 | 3009 | ||
2741 | public void llSetObjectDesc(string desc) | 3010 | public void llSetObjectDesc(string desc) |
2742 | { | 3011 | { |
3012 | m_host.AddScriptLPS(1); | ||
2743 | m_host.Description = desc; | 3013 | m_host.Description = desc; |
2744 | } | 3014 | } |
2745 | 3015 | ||
2746 | public string llGetCreator() | 3016 | public string llGetCreator() |
2747 | { | 3017 | { |
3018 | m_host.AddScriptLPS(1); | ||
2748 | return m_host.ObjectCreator.ToString(); | 3019 | return m_host.ObjectCreator.ToString(); |
2749 | } | 3020 | } |
2750 | 3021 | ||
2751 | public string llGetTimestamp() | 3022 | public string llGetTimestamp() |
2752 | { | 3023 | { |
3024 | m_host.AddScriptLPS(1); | ||
2753 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 3025 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
2754 | } | 3026 | } |
2755 | 3027 | ||
2756 | public void llSetLinkAlpha(int linknumber, double alpha, int face) | 3028 | public void llSetLinkAlpha(int linknumber, double alpha, int face) |
2757 | { | 3029 | { |
3030 | m_host.AddScriptLPS(1); | ||
2758 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); | 3031 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); |
2759 | if (linknumber > -1) | 3032 | if (linknumber > -1) |
2760 | { | 3033 | { |
@@ -2836,17 +3109,20 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2836 | 3109 | ||
2837 | public int llGetNumberOfPrims() | 3110 | public int llGetNumberOfPrims() |
2838 | { | 3111 | { |
3112 | m_host.AddScriptLPS(1); | ||
2839 | return m_host.ParentGroup.PrimCount; | 3113 | return m_host.ParentGroup.PrimCount; |
2840 | } | 3114 | } |
2841 | 3115 | ||
2842 | public string llGetNumberOfNotecardLines(string name) | 3116 | public string llGetNumberOfNotecardLines(string name) |
2843 | { | 3117 | { |
3118 | m_host.AddScriptLPS(1); | ||
2844 | NotImplemented("llGetNumberOfNotecardLines"); | 3119 | NotImplemented("llGetNumberOfNotecardLines"); |
2845 | return String.Empty; | 3120 | return String.Empty; |
2846 | } | 3121 | } |
2847 | 3122 | ||
2848 | public LSL_Types.list llGetBoundingBox(string obj) | 3123 | public LSL_Types.list llGetBoundingBox(string obj) |
2849 | { | 3124 | { |
3125 | m_host.AddScriptLPS(1); | ||
2850 | NotImplemented("llGetBoundingBox"); | 3126 | NotImplemented("llGetBoundingBox"); |
2851 | return new LSL_Types.list(); | 3127 | return new LSL_Types.list(); |
2852 | } | 3128 | } |
@@ -2858,38 +3134,45 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2858 | 3134 | ||
2859 | public void llGetPrimitiveParams() | 3135 | public void llGetPrimitiveParams() |
2860 | { | 3136 | { |
3137 | m_host.AddScriptLPS(1); | ||
2861 | NotImplemented("llGetPrimitiveParams"); | 3138 | NotImplemented("llGetPrimitiveParams"); |
2862 | } | 3139 | } |
2863 | 3140 | ||
2864 | public string llIntegerToBase64(int number) | 3141 | public string llIntegerToBase64(int number) |
2865 | { | 3142 | { |
3143 | m_host.AddScriptLPS(1); | ||
2866 | NotImplemented("llIntegerToBase64"); | 3144 | NotImplemented("llIntegerToBase64"); |
2867 | return String.Empty; | 3145 | return String.Empty; |
2868 | } | 3146 | } |
2869 | 3147 | ||
2870 | public int llBase64ToInteger(string str) | 3148 | public int llBase64ToInteger(string str) |
2871 | { | 3149 | { |
3150 | m_host.AddScriptLPS(1); | ||
2872 | NotImplemented("llBase64ToInteger"); | 3151 | NotImplemented("llBase64ToInteger"); |
2873 | return 0; | 3152 | return 0; |
2874 | } | 3153 | } |
2875 | 3154 | ||
2876 | public double llGetGMTclock() | 3155 | public double llGetGMTclock() |
2877 | { | 3156 | { |
3157 | m_host.AddScriptLPS(1); | ||
2878 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; | 3158 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; |
2879 | } | 3159 | } |
2880 | 3160 | ||
2881 | public string llGetSimulatorHostname() | 3161 | public string llGetSimulatorHostname() |
2882 | { | 3162 | { |
3163 | m_host.AddScriptLPS(1); | ||
2883 | return System.Environment.MachineName; | 3164 | return System.Environment.MachineName; |
2884 | } | 3165 | } |
2885 | 3166 | ||
2886 | public void llSetLocalRot(LSL_Types.Quaternion rot) | 3167 | public void llSetLocalRot(LSL_Types.Quaternion rot) |
2887 | { | 3168 | { |
3169 | m_host.AddScriptLPS(1); | ||
2888 | m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); | 3170 | m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); |
2889 | } | 3171 | } |
2890 | 3172 | ||
2891 | public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers) | 3173 | public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers) |
2892 | { | 3174 | { |
3175 | m_host.AddScriptLPS(1); | ||
2893 | NotImplemented("llParseStringKeepNulls"); | 3176 | NotImplemented("llParseStringKeepNulls"); |
2894 | return new LSL_Types.list(); | 3177 | return new LSL_Types.list(); |
2895 | } | 3178 | } |
@@ -2897,38 +3180,45 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2897 | public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, | 3180 | public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, |
2898 | LSL_Types.Quaternion rot, int param) | 3181 | LSL_Types.Quaternion rot, int param) |
2899 | { | 3182 | { |
3183 | m_host.AddScriptLPS(1); | ||
2900 | NotImplemented("llRezAtRoot"); | 3184 | NotImplemented("llRezAtRoot"); |
2901 | } | 3185 | } |
2902 | 3186 | ||
2903 | public int llGetObjectPermMask(int mask) | 3187 | public int llGetObjectPermMask(int mask) |
2904 | { | 3188 | { |
3189 | m_host.AddScriptLPS(1); | ||
2905 | NotImplemented("llGetObjectPermMask"); | 3190 | NotImplemented("llGetObjectPermMask"); |
2906 | return 0; | 3191 | return 0; |
2907 | } | 3192 | } |
2908 | 3193 | ||
2909 | public void llSetObjectPermMask(int mask, int value) | 3194 | public void llSetObjectPermMask(int mask, int value) |
2910 | { | 3195 | { |
3196 | m_host.AddScriptLPS(1); | ||
2911 | NotImplemented("llSetObjectPermMask"); | 3197 | NotImplemented("llSetObjectPermMask"); |
2912 | } | 3198 | } |
2913 | 3199 | ||
2914 | public void llGetInventoryPermMask(string item, int mask) | 3200 | public void llGetInventoryPermMask(string item, int mask) |
2915 | { | 3201 | { |
3202 | m_host.AddScriptLPS(1); | ||
2916 | NotImplemented("llGetInventoryPermMask"); | 3203 | NotImplemented("llGetInventoryPermMask"); |
2917 | } | 3204 | } |
2918 | 3205 | ||
2919 | public void llSetInventoryPermMask(string item, int mask, int value) | 3206 | public void llSetInventoryPermMask(string item, int mask, int value) |
2920 | { | 3207 | { |
3208 | m_host.AddScriptLPS(1); | ||
2921 | NotImplemented("llSetInventoryPermMask"); | 3209 | NotImplemented("llSetInventoryPermMask"); |
2922 | } | 3210 | } |
2923 | 3211 | ||
2924 | public string llGetInventoryCreator(string item) | 3212 | public string llGetInventoryCreator(string item) |
2925 | { | 3213 | { |
3214 | m_host.AddScriptLPS(1); | ||
2926 | NotImplemented("llGetInventoryCreator"); | 3215 | NotImplemented("llGetInventoryCreator"); |
2927 | return String.Empty; | 3216 | return String.Empty; |
2928 | } | 3217 | } |
2929 | 3218 | ||
2930 | public void llOwnerSay(string msg) | 3219 | public void llOwnerSay(string msg) |
2931 | { | 3220 | { |
3221 | m_host.AddScriptLPS(1); | ||
2932 | //temp fix so that lsl wiki examples aren't annoying to use to test other functions | 3222 | //temp fix so that lsl wiki examples aren't annoying to use to test other functions |
2933 | World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); | 3223 | World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); |
2934 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 3224 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -2937,27 +3227,32 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2937 | 3227 | ||
2938 | public void llRequestSimulatorData(string simulator, int data) | 3228 | public void llRequestSimulatorData(string simulator, int data) |
2939 | { | 3229 | { |
3230 | m_host.AddScriptLPS(1); | ||
2940 | NotImplemented("llRequestSimulatorData"); | 3231 | NotImplemented("llRequestSimulatorData"); |
2941 | } | 3232 | } |
2942 | 3233 | ||
2943 | public void llForceMouselook(int mouselook) | 3234 | public void llForceMouselook(int mouselook) |
2944 | { | 3235 | { |
3236 | m_host.AddScriptLPS(1); | ||
2945 | NotImplemented("llForceMouselook"); | 3237 | NotImplemented("llForceMouselook"); |
2946 | } | 3238 | } |
2947 | 3239 | ||
2948 | public double llGetObjectMass(string id) | 3240 | public double llGetObjectMass(string id) |
2949 | { | 3241 | { |
3242 | m_host.AddScriptLPS(1); | ||
2950 | NotImplemented("llGetObjectMass"); | 3243 | NotImplemented("llGetObjectMass"); |
2951 | return 0; | 3244 | return 0; |
2952 | } | 3245 | } |
2953 | 3246 | ||
2954 | public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) | 3247 | public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) |
2955 | { | 3248 | { |
3249 | m_host.AddScriptLPS(1); | ||
2956 | return dest.GetSublist(0, start - 1) + src + dest.GetSublist(end + 1, -1); | 3250 | return dest.GetSublist(0, start - 1) + src + dest.GetSublist(end + 1, -1); |
2957 | } | 3251 | } |
2958 | 3252 | ||
2959 | public void llLoadURL(string avatar_id, string message, string url) | 3253 | public void llLoadURL(string avatar_id, string message, string url) |
2960 | { | 3254 | { |
3255 | m_host.AddScriptLPS(1); | ||
2961 | LLUUID avatarId = new LLUUID(avatar_id); | 3256 | LLUUID avatarId = new LLUUID(avatar_id); |
2962 | m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, | 3257 | m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, |
2963 | url); | 3258 | url); |
@@ -2965,16 +3260,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2965 | 3260 | ||
2966 | public void llParcelMediaCommandList(LSL_Types.list commandList) | 3261 | public void llParcelMediaCommandList(LSL_Types.list commandList) |
2967 | { | 3262 | { |
3263 | m_host.AddScriptLPS(1); | ||
2968 | NotImplemented("llParcelMediaCommandList"); | 3264 | NotImplemented("llParcelMediaCommandList"); |
2969 | } | 3265 | } |
2970 | 3266 | ||
2971 | public void llParcelMediaQuery() | 3267 | public void llParcelMediaQuery() |
2972 | { | 3268 | { |
3269 | m_host.AddScriptLPS(1); | ||
2973 | NotImplemented("llParcelMediaQuery"); | 3270 | NotImplemented("llParcelMediaQuery"); |
2974 | } | 3271 | } |
2975 | 3272 | ||
2976 | public int llModPow(int a, int b, int c) | 3273 | public int llModPow(int a, int b, int c) |
2977 | { | 3274 | { |
3275 | m_host.AddScriptLPS(1); | ||
2978 | Int64 tmp = 0; | 3276 | Int64 tmp = 0; |
2979 | Int64 val = Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); | 3277 | Int64 val = Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); |
2980 | return Convert.ToInt32(tmp); | 3278 | return Convert.ToInt32(tmp); |
@@ -2982,39 +3280,46 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2982 | 3280 | ||
2983 | public int llGetInventoryType(string name) | 3281 | public int llGetInventoryType(string name) |
2984 | { | 3282 | { |
3283 | m_host.AddScriptLPS(1); | ||
2985 | NotImplemented("llGetInventoryType"); | 3284 | NotImplemented("llGetInventoryType"); |
2986 | return 0; | 3285 | return 0; |
2987 | } | 3286 | } |
2988 | 3287 | ||
2989 | public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) | 3288 | public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) |
2990 | { | 3289 | { |
3290 | m_host.AddScriptLPS(1); | ||
2991 | NotImplemented("llSetPayPrice"); | 3291 | NotImplemented("llSetPayPrice"); |
2992 | } | 3292 | } |
2993 | 3293 | ||
2994 | public LSL_Types.Vector3 llGetCameraPos() | 3294 | public LSL_Types.Vector3 llGetCameraPos() |
2995 | { | 3295 | { |
3296 | m_host.AddScriptLPS(1); | ||
2996 | NotImplemented("llGetCameraPos"); | 3297 | NotImplemented("llGetCameraPos"); |
2997 | return new LSL_Types.Vector3(); | 3298 | return new LSL_Types.Vector3(); |
2998 | } | 3299 | } |
2999 | 3300 | ||
3000 | public LSL_Types.Quaternion llGetCameraRot() | 3301 | public LSL_Types.Quaternion llGetCameraRot() |
3001 | { | 3302 | { |
3303 | m_host.AddScriptLPS(1); | ||
3002 | NotImplemented("llGetCameraRot"); | 3304 | NotImplemented("llGetCameraRot"); |
3003 | return new LSL_Types.Quaternion(); | 3305 | return new LSL_Types.Quaternion(); |
3004 | } | 3306 | } |
3005 | 3307 | ||
3006 | public void llSetPrimURL() | 3308 | public void llSetPrimURL() |
3007 | { | 3309 | { |
3310 | m_host.AddScriptLPS(1); | ||
3008 | NotImplemented("llSetPrimURL"); | 3311 | NotImplemented("llSetPrimURL"); |
3009 | } | 3312 | } |
3010 | 3313 | ||
3011 | public void llRefreshPrimURL() | 3314 | public void llRefreshPrimURL() |
3012 | { | 3315 | { |
3316 | m_host.AddScriptLPS(1); | ||
3013 | NotImplemented("llRefreshPrimURL"); | 3317 | NotImplemented("llRefreshPrimURL"); |
3014 | } | 3318 | } |
3015 | 3319 | ||
3016 | public string llEscapeURL(string url) | 3320 | public string llEscapeURL(string url) |
3017 | { | 3321 | { |
3322 | m_host.AddScriptLPS(1); | ||
3018 | try | 3323 | try |
3019 | { | 3324 | { |
3020 | return Uri.EscapeUriString(url); | 3325 | return Uri.EscapeUriString(url); |
@@ -3027,6 +3332,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3027 | 3332 | ||
3028 | public string llUnescapeURL(string url) | 3333 | public string llUnescapeURL(string url) |
3029 | { | 3334 | { |
3335 | m_host.AddScriptLPS(1); | ||
3030 | try | 3336 | try |
3031 | { | 3337 | { |
3032 | return Uri.UnescapeDataString(url); | 3338 | return Uri.UnescapeDataString(url); |
@@ -3039,59 +3345,70 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3039 | 3345 | ||
3040 | public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) | 3346 | public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) |
3041 | { | 3347 | { |
3348 | m_host.AddScriptLPS(1); | ||
3042 | NotImplemented("llMapDestination"); | 3349 | NotImplemented("llMapDestination"); |
3043 | } | 3350 | } |
3044 | 3351 | ||
3045 | public void llAddToLandBanList(string avatar, double hours) | 3352 | public void llAddToLandBanList(string avatar, double hours) |
3046 | { | 3353 | { |
3354 | m_host.AddScriptLPS(1); | ||
3047 | NotImplemented("llAddToLandBanList"); | 3355 | NotImplemented("llAddToLandBanList"); |
3048 | } | 3356 | } |
3049 | 3357 | ||
3050 | public void llRemoveFromLandPassList(string avatar) | 3358 | public void llRemoveFromLandPassList(string avatar) |
3051 | { | 3359 | { |
3360 | m_host.AddScriptLPS(1); | ||
3052 | NotImplemented("llRemoveFromLandPassList"); | 3361 | NotImplemented("llRemoveFromLandPassList"); |
3053 | } | 3362 | } |
3054 | 3363 | ||
3055 | public void llRemoveFromLandBanList(string avatar) | 3364 | public void llRemoveFromLandBanList(string avatar) |
3056 | { | 3365 | { |
3366 | m_host.AddScriptLPS(1); | ||
3057 | NotImplemented("llRemoveFromLandBanList"); | 3367 | NotImplemented("llRemoveFromLandBanList"); |
3058 | } | 3368 | } |
3059 | 3369 | ||
3060 | public void llSetCameraParams(LSL_Types.list rules) | 3370 | public void llSetCameraParams(LSL_Types.list rules) |
3061 | { | 3371 | { |
3372 | m_host.AddScriptLPS(1); | ||
3062 | NotImplemented("llSetCameraParams"); | 3373 | NotImplemented("llSetCameraParams"); |
3063 | } | 3374 | } |
3064 | 3375 | ||
3065 | public void llClearCameraParams() | 3376 | public void llClearCameraParams() |
3066 | { | 3377 | { |
3378 | m_host.AddScriptLPS(1); | ||
3067 | NotImplemented("llClearCameraParams"); | 3379 | NotImplemented("llClearCameraParams"); |
3068 | } | 3380 | } |
3069 | 3381 | ||
3070 | public double llListStatistics(int operation, LSL_Types.list src) | 3382 | public double llListStatistics(int operation, LSL_Types.list src) |
3071 | { | 3383 | { |
3384 | m_host.AddScriptLPS(1); | ||
3072 | NotImplemented("llListStatistics"); | 3385 | NotImplemented("llListStatistics"); |
3073 | return 0; | 3386 | return 0; |
3074 | } | 3387 | } |
3075 | 3388 | ||
3076 | public int llGetUnixTime() | 3389 | public int llGetUnixTime() |
3077 | { | 3390 | { |
3391 | m_host.AddScriptLPS(1); | ||
3078 | return Util.UnixTimeSinceEpoch(); | 3392 | return Util.UnixTimeSinceEpoch(); |
3079 | } | 3393 | } |
3080 | 3394 | ||
3081 | public int llGetParcelFlags(LSL_Types.Vector3 pos) | 3395 | public int llGetParcelFlags(LSL_Types.Vector3 pos) |
3082 | { | 3396 | { |
3397 | m_host.AddScriptLPS(1); | ||
3083 | NotImplemented("llGetParcelFlags"); | 3398 | NotImplemented("llGetParcelFlags"); |
3084 | return 0; | 3399 | return 0; |
3085 | } | 3400 | } |
3086 | 3401 | ||
3087 | public int llGetRegionFlags() | 3402 | public int llGetRegionFlags() |
3088 | { | 3403 | { |
3404 | m_host.AddScriptLPS(1); | ||
3089 | NotImplemented("llGetRegionFlags"); | 3405 | NotImplemented("llGetRegionFlags"); |
3090 | return 0; | 3406 | return 0; |
3091 | } | 3407 | } |
3092 | 3408 | ||
3093 | public string llXorBase64StringsCorrect(string str1, string str2) | 3409 | public string llXorBase64StringsCorrect(string str1, string str2) |
3094 | { | 3410 | { |
3411 | m_host.AddScriptLPS(1); | ||
3095 | string ret = String.Empty; | 3412 | string ret = String.Empty; |
3096 | string src1 = llBase64ToString(str1); | 3413 | string src1 = llBase64ToString(str1); |
3097 | string src2 = llBase64ToString(str2); | 3414 | string src2 = llBase64ToString(str2); |
@@ -3109,6 +3426,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3109 | 3426 | ||
3110 | public string llHTTPRequest(string url, LSL_Types.list parameters, string body) | 3427 | public string llHTTPRequest(string url, LSL_Types.list parameters, string body) |
3111 | { | 3428 | { |
3429 | m_host.AddScriptLPS(1); | ||
3112 | IHttpRequests httpScriptMod = | 3430 | IHttpRequests httpScriptMod = |
3113 | m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>(); | 3431 | m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>(); |
3114 | List<string> param = new List<string>(); | 3432 | List<string> param = new List<string>(); |
@@ -3127,28 +3445,33 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3127 | 3445 | ||
3128 | public void llResetLandBanList() | 3446 | public void llResetLandBanList() |
3129 | { | 3447 | { |
3448 | m_host.AddScriptLPS(1); | ||
3130 | NotImplemented("llResetLandBanList"); | 3449 | NotImplemented("llResetLandBanList"); |
3131 | } | 3450 | } |
3132 | 3451 | ||
3133 | public void llResetLandPassList() | 3452 | public void llResetLandPassList() |
3134 | { | 3453 | { |
3454 | m_host.AddScriptLPS(1); | ||
3135 | NotImplemented("llResetLandPassList"); | 3455 | NotImplemented("llResetLandPassList"); |
3136 | } | 3456 | } |
3137 | 3457 | ||
3138 | public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) | 3458 | public int llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) |
3139 | { | 3459 | { |
3460 | m_host.AddScriptLPS(1); | ||
3140 | NotImplemented("llGetParcelPrimCount"); | 3461 | NotImplemented("llGetParcelPrimCount"); |
3141 | return 0; | 3462 | return 0; |
3142 | } | 3463 | } |
3143 | 3464 | ||
3144 | public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) | 3465 | public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) |
3145 | { | 3466 | { |
3467 | m_host.AddScriptLPS(1); | ||
3146 | NotImplemented("llGetParcelPrimOwners"); | 3468 | NotImplemented("llGetParcelPrimOwners"); |
3147 | return new LSL_Types.list(); | 3469 | return new LSL_Types.list(); |
3148 | } | 3470 | } |
3149 | 3471 | ||
3150 | public int llGetObjectPrimCount(string object_id) | 3472 | public int llGetObjectPrimCount(string object_id) |
3151 | { | 3473 | { |
3474 | m_host.AddScriptLPS(1); | ||
3152 | SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); | 3475 | SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); |
3153 | if (part == null) | 3476 | if (part == null) |
3154 | { | 3477 | { |
@@ -3162,6 +3485,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3162 | 3485 | ||
3163 | public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) | 3486 | public int llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) |
3164 | { | 3487 | { |
3488 | m_host.AddScriptLPS(1); | ||
3165 | // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation | 3489 | // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation |
3166 | // Which probably will be irrelevent in OpenSim.... | 3490 | // Which probably will be irrelevent in OpenSim.... |
3167 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 3491 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); |
@@ -3185,6 +3509,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3185 | 3509 | ||
3186 | public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) | 3510 | public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) |
3187 | { | 3511 | { |
3512 | m_host.AddScriptLPS(1); | ||
3188 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); | 3513 | LandData land = World.GetLandData((float)pos.x, (float)pos.y); |
3189 | if (land == null) | 3514 | if (land == null) |
3190 | { | 3515 | { |
@@ -3219,7 +3544,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3219 | } | 3544 | } |
3220 | 3545 | ||
3221 | public string llStringTrim(string src, int type) | 3546 | public string llStringTrim(string src, int type) |
3222 | { | 3547 | { |
3548 | m_host.AddScriptLPS(1); | ||
3223 | if (type == (int)LSL_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } | 3549 | if (type == (int)LSL_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } |
3224 | if (type == (int)LSL_BaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } | 3550 | if (type == (int)LSL_BaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } |
3225 | if (type == (int)LSL_BaseClass.STRING_TRIM) { return src.Trim(); } | 3551 | if (type == (int)LSL_BaseClass.STRING_TRIM) { return src.Trim(); } |
@@ -3231,6 +3557,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3231 | // | 3557 | // |
3232 | public int osTerrainSetHeight(int x, int y, double val) | 3558 | public int osTerrainSetHeight(int x, int y, double val) |
3233 | { | 3559 | { |
3560 | m_host.AddScriptLPS(1); | ||
3234 | if (x > 255 || x < 0 || y > 255 || y < 0) | 3561 | if (x > 255 || x < 0 || y > 255 || y < 0) |
3235 | LSLError("osTerrainSetHeight: Coordinate out of bounds"); | 3562 | LSLError("osTerrainSetHeight: Coordinate out of bounds"); |
3236 | 3563 | ||
@@ -3247,6 +3574,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3247 | 3574 | ||
3248 | public double osTerrainGetHeight(int x, int y) | 3575 | public double osTerrainGetHeight(int x, int y) |
3249 | { | 3576 | { |
3577 | m_host.AddScriptLPS(1); | ||
3250 | if (x > 255 || x < 0 || y > 255 || y < 0) | 3578 | if (x > 255 || x < 0 || y > 255 || y < 0) |
3251 | LSLError("osTerrainGetHeight: Coordinate out of bounds"); | 3579 | LSLError("osTerrainGetHeight: Coordinate out of bounds"); |
3252 | 3580 | ||
@@ -3255,6 +3583,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3255 | 3583 | ||
3256 | public int osRegionRestart(double seconds) | 3584 | public int osRegionRestart(double seconds) |
3257 | { | 3585 | { |
3586 | m_host.AddScriptLPS(1); | ||
3258 | if (World.PermissionsMngr.CanRestartSim(m_host.OwnerID)) | 3587 | if (World.PermissionsMngr.CanRestartSim(m_host.OwnerID)) |
3259 | { | 3588 | { |
3260 | World.Restart((float)seconds); | 3589 | World.Restart((float)seconds); |
@@ -3268,11 +3597,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3268 | 3597 | ||
3269 | public void osRegionNotice(string msg) | 3598 | public void osRegionNotice(string msg) |
3270 | { | 3599 | { |
3600 | m_host.AddScriptLPS(1); | ||
3271 | World.SendGeneralAlert(msg); | 3601 | World.SendGeneralAlert(msg); |
3272 | } | 3602 | } |
3273 | 3603 | ||
3274 | public void osSetRot(LLUUID target, Quaternion rotation) | 3604 | public void osSetRot(LLUUID target, Quaternion rotation) |
3275 | { | 3605 | { |
3606 | m_host.AddScriptLPS(1); | ||
3276 | if (World.Entities.ContainsKey(target)) | 3607 | if (World.Entities.ContainsKey(target)) |
3277 | { | 3608 | { |
3278 | World.Entities[target].Rotation = rotation; | 3609 | World.Entities[target].Rotation = rotation; |
@@ -3286,6 +3617,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3286 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | 3617 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, |
3287 | int timer) | 3618 | int timer) |
3288 | { | 3619 | { |
3620 | m_host.AddScriptLPS(1); | ||
3289 | if (dynamicID == String.Empty) | 3621 | if (dynamicID == String.Empty) |
3290 | { | 3622 | { |
3291 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 3623 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
@@ -3304,12 +3636,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
3304 | 3636 | ||
3305 | private void NotImplemented(string Command) | 3637 | private void NotImplemented(string Command) |
3306 | { | 3638 | { |
3639 | m_host.AddScriptLPS(1); | ||
3307 | if (throwErrorOnNotImplemented) | 3640 | if (throwErrorOnNotImplemented) |
3308 | throw new NotImplementedException("Command not implemented: " + Command); | 3641 | throw new NotImplementedException("Command not implemented: " + Command); |
3309 | } | 3642 | } |
3310 | 3643 | ||
3311 | private void LSLError(string msg) | 3644 | private void LSLError(string msg) |
3312 | { | 3645 | { |
3646 | m_host.AddScriptLPS(1); | ||
3313 | throw new Exception("LSL Runtime Error: " + msg); | 3647 | throw new Exception("LSL Runtime Error: " + msg); |
3314 | } | 3648 | } |
3315 | } | 3649 | } |