aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index a4b7f16..03bb820 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -53,13 +53,20 @@ namespace pCampBot
53 protected bool m_verbose = true; 53 protected bool m_verbose = true;
54 protected Random somthing = new Random(Environment.TickCount); 54 protected Random somthing = new Random(Environment.TickCount);
55 protected int numbots = 0; 55 protected int numbots = 0;
56 private IConfig Config; 56 public IConfig Config { get; private set; }
57
58 /// <summary>
59 /// Track the assets we have and have not received so we don't endlessly repeat requests.
60 /// </summary>
61 public Dictionary<UUID, bool> AssetsReceived { get; private set; }
57 62
58 /// <summary> 63 /// <summary>
59 /// Constructor Creates MainConsole.Instance to take commands and provide the place to write data 64 /// Constructor Creates MainConsole.Instance to take commands and provide the place to write data
60 /// </summary> 65 /// </summary>
61 public BotManager() 66 public BotManager()
62 { 67 {
68 AssetsReceived = new Dictionary<UUID, bool>();
69
63 m_console = CreateConsole(); 70 m_console = CreateConsole();
64 MainConsole.Instance = m_console; 71 MainConsole.Instance = m_console;
65 72
@@ -113,7 +120,7 @@ namespace pCampBot
113 for (int i = 0; i < botcount; i++) 120 for (int i = 0; i < botcount; i++)
114 { 121 {
115 string lastName = string.Format("{0}_{1}", lastNameStem, i); 122 string lastName = string.Format("{0}_{1}", lastNameStem, i);
116 startupBot(i, cs, firstName, lastName, password, loginUri); 123 startupBot(i, this, firstName, lastName, password, loginUri);
117 } 124 }
118 } 125 }
119 126
@@ -146,9 +153,9 @@ namespace pCampBot
146 /// <param name="lastName">Last name</param> 153 /// <param name="lastName">Last name</param>
147 /// <param name="password">Password</param> 154 /// <param name="password">Password</param>
148 /// <param name="loginUri">Login URI</param> 155 /// <param name="loginUri">Login URI</param>
149 public void startupBot(int pos, IConfig cs, string firstName, string lastName, string password, string loginUri) 156 public void startupBot(int pos, BotManager bm, string firstName, string lastName, string password, string loginUri)
150 { 157 {
151 PhysicsBot pb = new PhysicsBot(cs, firstName, lastName, password, loginUri); 158 PhysicsBot pb = new PhysicsBot(bm, firstName, lastName, password, loginUri);
152 159
153 pb.OnConnected += handlebotEvent; 160 pb.OnConnected += handlebotEvent;
154 pb.OnDisconnected += handlebotEvent; 161 pb.OnDisconnected += handlebotEvent;