diff options
author | diva | 2009-05-15 05:00:25 +0000 |
---|---|---|
committer | diva | 2009-05-15 05:00:25 +0000 |
commit | 5e4fc6e91e5edffd1dc23af4f583d6294f394a3d (patch) | |
tree | 497076db68193be2d14fc3788c1d80c74d8c977d /OpenSim/Region/ScriptEngine | |
parent | some sculpted prim geometry accuracy and meshing speed improvements (diff) | |
download | opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.zip opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.gz opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.bz2 opensim-SC-5e4fc6e91e5edffd1dc23af4f583d6294f394a3d.tar.xz |
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing.
Known problems:
* HG asset transfers are borked for now
* missing texture is missing
* 3 unit tests commented out for now
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9020ff9..d4fc2d1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3782,8 +3782,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3782 | World.RegionInfo.RegionLocY * Constants.RegionSize, | 3782 | World.RegionInfo.RegionLocY * Constants.RegionSize, |
3783 | 0); | 3783 | 0); |
3784 | 3784 | ||
3785 | World.CommsManager.AssetCache.GetAsset(item.AssetID, | 3785 | World.AssetService.Get(item.AssetID.ToString(), this, |
3786 | delegate(UUID i, AssetBase a) | 3786 | delegate(string i, object sender, AssetBase a) |
3787 | { | 3787 | { |
3788 | AssetLandmark lm = new AssetLandmark(a); | 3788 | AssetLandmark lm = new AssetLandmark(a); |
3789 | 3789 | ||
@@ -3795,7 +3795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3795 | AsyncCommands. | 3795 | AsyncCommands. |
3796 | DataserverPlugin.DataserverReply(i.ToString(), | 3796 | DataserverPlugin.DataserverReply(i.ToString(), |
3797 | reply); | 3797 | reply); |
3798 | }, false); | 3798 | }); |
3799 | 3799 | ||
3800 | // ScriptSleep(1000); | 3800 | // ScriptSleep(1000); |
3801 | return tid.ToString(); | 3801 | return tid.ToString(); |
@@ -9311,7 +9311,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9311 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); | 9311 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); |
9312 | private void WithNotecard(UUID assetID, AssetRequestCallback cb) | 9312 | private void WithNotecard(UUID assetID, AssetRequestCallback cb) |
9313 | { | 9313 | { |
9314 | World.CommsManager.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false); | 9314 | World.AssetService.Get(assetID.ToString(), this, |
9315 | delegate(string i, object sender, AssetBase a) | ||
9316 | { | ||
9317 | UUID uuid = UUID.Zero; | ||
9318 | UUID.TryParse(i, out uuid); | ||
9319 | cb(uuid, a); | ||
9320 | }); | ||
9315 | } | 9321 | } |
9316 | 9322 | ||
9317 | public LSL_String llGetNumberOfNotecardLines(string name) | 9323 | public LSL_String llGetNumberOfNotecardLines(string name) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e5c59aa..fbae9c8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1341,7 +1341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1341 | + textLength.ToString() + "\n" + notecardData + "}\n"; | 1341 | + textLength.ToString() + "\n" + notecardData + "}\n"; |
1342 | 1342 | ||
1343 | asset.Data = Encoding.ASCII.GetBytes(notecardData); | 1343 | asset.Data = Encoding.ASCII.GetBytes(notecardData); |
1344 | World.CommsManager.AssetCache.AddAsset(asset); | 1344 | World.AssetService.Store(asset); |
1345 | 1345 | ||
1346 | // Create Task Entry | 1346 | // Create Task Entry |
1347 | TaskInventoryItem taskItem=new TaskInventoryItem(); | 1347 | TaskInventoryItem taskItem=new TaskInventoryItem(); |
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1402 | 1402 | ||
1403 | if (!NotecardCache.IsCached(assetID)) | 1403 | if (!NotecardCache.IsCached(assetID)) |
1404 | { | 1404 | { |
1405 | AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false); | 1405 | AssetBase a = World.AssetService.Get(assetID.ToString()); |
1406 | if (a != null) | 1406 | if (a != null) |
1407 | { | 1407 | { |
1408 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 1408 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1455 | 1455 | ||
1456 | if (!NotecardCache.IsCached(assetID)) | 1456 | if (!NotecardCache.IsCached(assetID)) |
1457 | { | 1457 | { |
1458 | AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false); | 1458 | AssetBase a = World.AssetService.Get(assetID.ToString()); |
1459 | if (a != null) | 1459 | if (a != null) |
1460 | { | 1460 | { |
1461 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 1461 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
@@ -1512,7 +1512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1512 | 1512 | ||
1513 | if (!NotecardCache.IsCached(assetID)) | 1513 | if (!NotecardCache.IsCached(assetID)) |
1514 | { | 1514 | { |
1515 | AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false); | 1515 | AssetBase a = World.AssetService.Get(assetID.ToString()); |
1516 | if (a != null) | 1516 | if (a != null) |
1517 | { | 1517 | { |
1518 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 1518 | System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |