diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 257b17b..0f598ea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -26,8 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Runtime.Remoting.Lifetime; | 28 | using System.Runtime.Remoting.Lifetime; |
29 | using Axiom.Math; | 29 | using OpenMetaverse; |
30 | using libsecondlife; | ||
31 | using Nini.Config; | 30 | using Nini.Config; |
32 | using OpenSim.Framework.Console; | 31 | using OpenSim.Framework.Console; |
33 | using OpenSim.Region.Environment.Interfaces; | 32 | using OpenSim.Region.Environment.Interfaces; |
@@ -46,9 +45,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
46 | internal IScriptEngine m_ScriptEngine; | 45 | internal IScriptEngine m_ScriptEngine; |
47 | internal SceneObjectPart m_host; | 46 | internal SceneObjectPart m_host; |
48 | internal uint m_localID; | 47 | internal uint m_localID; |
49 | internal LLUUID m_itemID; | 48 | internal UUID m_itemID; |
50 | 49 | ||
51 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) | 50 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) |
52 | { | 51 | { |
53 | m_ScriptEngine = ScriptEngine; | 52 | m_ScriptEngine = ScriptEngine; |
54 | m_host = host; | 53 | m_host = host; |
@@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
86 | if (x > 255 || x < 0 || y > 255 || y < 0) | 85 | if (x > 255 || x < 0 || y > 255 || y < 0) |
87 | OSSLError("osTerrainSetHeight: Coordinate out of bounds"); | 86 | OSSLError("osTerrainSetHeight: Coordinate out of bounds"); |
88 | 87 | ||
89 | if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) | 88 | if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) |
90 | { | 89 | { |
91 | World.Heightmap[x, y] = val; | 90 | World.Heightmap[x, y] = val; |
92 | return 1; | 91 | return 1; |
@@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
144 | World.SendGeneralAlert(msg); | 143 | World.SendGeneralAlert(msg); |
145 | } | 144 | } |
146 | 145 | ||
147 | public void osSetRot(LLUUID target, Quaternion rotation) | 146 | public void osSetRot(UUID target, Quaternion rotation) |
148 | { | 147 | { |
149 | if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) | 148 | if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) |
150 | { | 149 | { |
@@ -176,7 +175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
176 | if (dynamicID == String.Empty) | 175 | if (dynamicID == String.Empty) |
177 | { | 176 | { |
178 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 177 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
179 | LLUUID createdTexture = | 178 | UUID createdTexture = |
180 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, | 179 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, |
181 | extraParams, timer); | 180 | extraParams, timer); |
182 | return createdTexture.ToString(); | 181 | return createdTexture.ToString(); |
@@ -186,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
186 | //TODO update existing dynamic textures | 185 | //TODO update existing dynamic textures |
187 | } | 186 | } |
188 | 187 | ||
189 | return LLUUID.Zero.ToString(); | 188 | return UUID.Zero.ToString(); |
190 | } | 189 | } |
191 | 190 | ||
192 | public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | 191 | public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, |
@@ -202,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
202 | if (dynamicID == String.Empty) | 201 | if (dynamicID == String.Empty) |
203 | { | 202 | { |
204 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 203 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
205 | LLUUID createdTexture = | 204 | UUID createdTexture = |
206 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, | 205 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, |
207 | extraParams, timer, true, (byte) alpha); | 206 | extraParams, timer, true, (byte) alpha); |
208 | return createdTexture.ToString(); | 207 | return createdTexture.ToString(); |
@@ -212,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
212 | //TODO update existing dynamic textures | 211 | //TODO update existing dynamic textures |
213 | } | 212 | } |
214 | 213 | ||
215 | return LLUUID.Zero.ToString(); | 214 | return UUID.Zero.ToString(); |
216 | } | 215 | } |
217 | 216 | ||
218 | public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, | 217 | public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, |
@@ -230,7 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
230 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 229 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
231 | if (textureManager != null) | 230 | if (textureManager != null) |
232 | { | 231 | { |
233 | LLUUID createdTexture = | 232 | UUID createdTexture = |
234 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, | 233 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, |
235 | extraParams, timer); | 234 | extraParams, timer); |
236 | return createdTexture.ToString(); | 235 | return createdTexture.ToString(); |
@@ -241,7 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
241 | //TODO update existing dynamic textures | 240 | //TODO update existing dynamic textures |
242 | } | 241 | } |
243 | 242 | ||
244 | return LLUUID.Zero.ToString(); | 243 | return UUID.Zero.ToString(); |
245 | } | 244 | } |
246 | 245 | ||
247 | public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | 246 | public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, |
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
259 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 258 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
260 | if (textureManager != null) | 259 | if (textureManager != null) |
261 | { | 260 | { |
262 | LLUUID createdTexture = | 261 | UUID createdTexture = |
263 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, | 262 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, |
264 | extraParams, timer, true, (byte) alpha); | 263 | extraParams, timer, true, (byte) alpha); |
265 | return createdTexture.ToString(); | 264 | return createdTexture.ToString(); |
@@ -270,7 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
270 | //TODO update existing dynamic textures | 269 | //TODO update existing dynamic textures |
271 | } | 270 | } |
272 | 271 | ||
273 | return LLUUID.Zero.ToString(); | 272 | return UUID.Zero.ToString(); |
274 | } | 273 | } |
275 | 274 | ||
276 | public bool osConsoleCommand(string command) | 275 | public bool osConsoleCommand(string command) |
@@ -539,9 +538,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
539 | } | 538 | } |
540 | 539 | ||
541 | m_host.AddScriptLPS(1); | 540 | m_host.AddScriptLPS(1); |
542 | LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); | 541 | UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); |
543 | 542 | ||
544 | if (landowner == LLUUID.Zero) | 543 | if (landowner == UUID.Zero) |
545 | { | 544 | { |
546 | return; | 545 | return; |
547 | } | 546 | } |