diff options
author | Teravus Ovares | 2009-07-25 15:49:10 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-07-25 15:49:10 +0000 |
commit | 64bd9a335444379ebe1cad8e34d5b5953a76f671 (patch) | |
tree | 66b9ce07dbf95e4c118e3d639068e2c44fc52f58 /OpenSim/Tools | |
parent | * Apply http://opensimulator.org/mantis/view.php?id=3586 (diff) | |
download | opensim-SC_OLD-64bd9a335444379ebe1cad8e34d5b5953a76f671.zip opensim-SC_OLD-64bd9a335444379ebe1cad8e34d5b5953a76f671.tar.gz opensim-SC_OLD-64bd9a335444379ebe1cad8e34d5b5953a76f671.tar.bz2 opensim-SC_OLD-64bd9a335444379ebe1cad8e34d5b5953a76f671.tar.xz |
* Updates libOMV to version 0.7.0
* Uses mantis #3811 as a base (thanks jhuliman) with changes.
* E-mail regarding interface changes sent to the opensim-dev list
* Archive: https://lists.berlios.de/pipermail/opensim-dev/2009-July/007219.html
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r-- | OpenSim/Tools/pCampBot/PhysicsBot.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 36a5ef6..426ef29 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs | |||
@@ -32,6 +32,7 @@ using System.IO; | |||
32 | using System.Threading; | 32 | using System.Threading; |
33 | using System.Timers; | 33 | using System.Timers; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenMetaverse.Assets; | ||
35 | using Nini.Config; | 36 | using Nini.Config; |
36 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 38 | using OpenSim.Framework.Console; |
@@ -142,7 +143,7 @@ namespace pCampBot | |||
142 | client.Settings.SEND_AGENT_THROTTLE = true; | 143 | client.Settings.SEND_AGENT_THROTTLE = true; |
143 | client.Settings.SEND_PINGS = true; | 144 | client.Settings.SEND_PINGS = true; |
144 | client.Settings.STORE_LAND_PATCHES = false; | 145 | client.Settings.STORE_LAND_PATCHES = false; |
145 | client.Settings.USE_TEXTURE_CACHE = false; | 146 | client.Settings.USE_ASSET_CACHE = false; |
146 | client.Settings.MULTIPLE_SIMS = true; | 147 | client.Settings.MULTIPLE_SIMS = true; |
147 | client.Throttle.Asset = 100000; | 148 | client.Throttle.Asset = 100000; |
148 | client.Throttle.Land = 100000; | 149 | client.Throttle.Land = 100000; |
@@ -154,8 +155,7 @@ namespace pCampBot | |||
154 | client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); | 155 | client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); |
155 | client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); | 156 | client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); |
156 | client.Objects.OnNewPrim += Objects_NewPrim; | 157 | client.Objects.OnNewPrim += Objects_NewPrim; |
157 | client.Assets.OnImageReceived += Asset_TextureCallback; | 158 | //client.Assets.OnAssetReceived += Asset_ReceivedCallback; |
158 | client.Assets.OnAssetReceived += Asset_ReceivedCallback; | ||
159 | if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) | 159 | if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) |
160 | { | 160 | { |
161 | if (OnConnected != null) | 161 | if (OnConnected != null) |
@@ -202,8 +202,8 @@ namespace pCampBot | |||
202 | UUID wearable = client.Appearance.GetWearableAsset(wtype); | 202 | UUID wearable = client.Appearance.GetWearableAsset(wtype); |
203 | if (wearable != UUID.Zero) | 203 | if (wearable != UUID.Zero) |
204 | { | 204 | { |
205 | client.Assets.RequestAsset(wearable, AssetType.Clothing, false); | 205 | client.Assets.RequestAsset(wearable, AssetType.Clothing, false, Asset_ReceivedCallback); |
206 | client.Assets.RequestAsset(wearable, AssetType.Bodypart, false); | 206 | client.Assets.RequestAsset(wearable, AssetType.Bodypart, false, Asset_ReceivedCallback); |
207 | } | 207 | } |
208 | } | 208 | } |
209 | } | 209 | } |
@@ -377,7 +377,7 @@ namespace pCampBot | |||
377 | { | 377 | { |
378 | if (prim.Textures.DefaultTexture.TextureID != UUID.Zero) | 378 | if (prim.Textures.DefaultTexture.TextureID != UUID.Zero) |
379 | { | 379 | { |
380 | client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal); | 380 | client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal, Asset_TextureCallback_Texture); |
381 | } | 381 | } |
382 | for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) | 382 | for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) |
383 | { | 383 | { |
@@ -385,7 +385,7 @@ namespace pCampBot | |||
385 | { | 385 | { |
386 | if (prim.Textures.FaceTextures[i].TextureID != UUID.Zero) | 386 | if (prim.Textures.FaceTextures[i].TextureID != UUID.Zero) |
387 | { | 387 | { |
388 | client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal); | 388 | client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal, Asset_TextureCallback_Texture); |
389 | } | 389 | } |
390 | 390 | ||
391 | } | 391 | } |
@@ -393,16 +393,18 @@ namespace pCampBot | |||
393 | } | 393 | } |
394 | if (prim.Sculpt.SculptTexture != UUID.Zero) | 394 | if (prim.Sculpt.SculptTexture != UUID.Zero) |
395 | { | 395 | { |
396 | client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal); | 396 | client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); |
397 | } | 397 | } |
398 | } | 398 | } |
399 | 399 | ||
400 | } | 400 | } |
401 | public void Asset_TextureCallback(ImageDownload image, AssetTexture asset) | 401 | |
402 | |||
403 | public void Asset_TextureCallback_Texture(TextureRequestState state, AssetTexture assetTexture) | ||
402 | { | 404 | { |
403 | //TODO: Implement texture saving and applying | 405 | //TODO: Implement texture saving and applying |
404 | } | 406 | } |
405 | 407 | ||
406 | public void Asset_ReceivedCallback(AssetDownload transfer,Asset asset) | 408 | public void Asset_ReceivedCallback(AssetDownload transfer,Asset asset) |
407 | { | 409 | { |
408 | if (wear == "save") | 410 | if (wear == "save") |