aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools
diff options
context:
space:
mode:
authorTeravus Ovares2008-11-27 06:54:20 +0000
committerTeravus Ovares2008-11-27 06:54:20 +0000
commitf7beef328380d85c52fc05f6639a00999d1fa74d (patch)
treeb59ba40be30d571ff3a99841f365e9497bebe323 /OpenSim/Tools
parent* Fix some tests (diff)
downloadopensim-SC-f7beef328380d85c52fc05f6639a00999d1fa74d.zip
opensim-SC-f7beef328380d85c52fc05f6639a00999d1fa74d.tar.gz
opensim-SC-f7beef328380d85c52fc05f6639a00999d1fa74d.tar.bz2
opensim-SC-f7beef328380d85c52fc05f6639a00999d1fa74d.tar.xz
* Adds texture download requests to pcampbot to more accurately represent load.
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r--OpenSim/Tools/pCampBot/PhysicsBot.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs
index 862b4e8..8e43670 100644
--- a/OpenSim/Tools/pCampBot/PhysicsBot.cs
+++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
29using System.IO; 30using System.IO;
30using System.Threading; 31using System.Threading;
31using System.Timers; 32using System.Timers;
@@ -51,6 +52,8 @@ namespace pCampBot
51 public event AnEvent OnDisconnected; 52 public event AnEvent OnDisconnected;
52 53
53 protected Timer m_action; // Action Timer 54 protected Timer m_action; // Action Timer
55 protected List<uint> objectIDs = new List<uint>();
56
54 57
55 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here 58 protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here
56 59
@@ -130,9 +133,25 @@ namespace pCampBot
130 public void startup() 133 public void startup()
131 { 134 {
132 client.Settings.LOGIN_SERVER = loginURI; 135 client.Settings.LOGIN_SERVER = loginURI;
136 client.Settings.ALWAYS_DECODE_OBJECTS = false;
137 client.Settings.AVATAR_TRACKING = false;
138 client.Settings.OBJECT_TRACKING = false;
139 client.Settings.SEND_AGENT_THROTTLE = true;
140 client.Settings.SEND_PINGS = true;
141 client.Settings.STORE_LAND_PATCHES = false;
142 client.Settings.USE_TEXTURE_CACHE = false;
143 client.Settings.MULTIPLE_SIMS = true;
144 client.Throttle.Asset = 100000;
145 client.Throttle.Land = 100000;
146 client.Throttle.Task = 100000;
147 client.Throttle.Texture = 100000;
148 client.Throttle.Wind = 100000;
149 client.Throttle.Total = 400000;
133 client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected); 150 client.Network.OnConnected += new NetworkManager.ConnectedCallback(this.Network_OnConnected);
134 client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected); 151 client.Network.OnSimConnected += new NetworkManager.SimConnectedCallback(this.Network_OnConnected);
135 client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected); 152 client.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(this.Network_OnDisconnected);
153 client.Objects.OnNewPrim += Objects_NewPrim;
154 client.Assets.OnImageReceived += Asset_TextureCallback;
136 if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name")) 155 if (client.Network.Login(firstname, lastname, password, "pCampBot", "Your name"))
137 { 156 {
138 if (OnConnected != null) 157 if (OnConnected != null)
@@ -174,6 +193,39 @@ namespace pCampBot
174 } 193 }
175 } 194 }
176 195
196 public void Objects_NewPrim(Simulator simulator, Primitive prim, ulong regionHandle, ushort timeDilation)
197 {
198 if (prim != null)
199 {
200 if (prim.Textures != null)
201 {
202 if (prim.Textures.DefaultTexture.TextureID != UUID.Zero)
203 {
204 client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal);
205 }
206 for (int i = 0; i < prim.Textures.FaceTextures.Length; i++ )
207 {
208 if (prim.Textures.FaceTextures[i] != null)
209 {
210 if (prim.Textures.FaceTextures[i].TextureID != UUID.Zero)
211 {
212 client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal);
213 }
214
215 }
216 }
217 }
218 if (prim.Sculpt.SculptTexture != UUID.Zero)
219 {
220 client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal);
221 }
222 }
223
224 }
225 public void Asset_TextureCallback(ImageDownload image, AssetTexture asset)
226 {
227 }
228
177 public string[] readexcuses() 229 public string[] readexcuses()
178 { 230 {
179 string allexcuses = ""; 231 string allexcuses = "";