aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/PhysicsBot.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/pCampBot/PhysicsBot.cs')
-rw-r--r--OpenSim/Tools/pCampBot/PhysicsBot.cs22
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;
32using System.Threading; 32using System.Threading;
33using System.Timers; 33using System.Timers;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenMetaverse.Assets;
35using Nini.Config; 36using Nini.Config;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using OpenSim.Framework.Console; 38using 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")