aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 03bb820..bfb664f 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -49,7 +49,6 @@ namespace pCampBot
49 49
50 protected CommandConsole m_console; 50 protected CommandConsole m_console;
51 protected List<PhysicsBot> m_lBot; 51 protected List<PhysicsBot> m_lBot;
52 protected Thread[] m_td;
53 protected bool m_verbose = true; 52 protected bool m_verbose = true;
54 protected Random somthing = new Random(Environment.TickCount); 53 protected Random somthing = new Random(Environment.TickCount);
55 protected int numbots = 0; 54 protected int numbots = 0;
@@ -110,7 +109,6 @@ namespace pCampBot
110 public void dobotStartup(int botcount, IConfig cs) 109 public void dobotStartup(int botcount, IConfig cs)
111 { 110 {
112 Config = cs; 111 Config = cs;
113 m_td = new Thread[botcount];
114 112
115 string firstName = cs.GetString("firstname"); 113 string firstName = cs.GetString("firstname");
116 string lastNameStem = cs.GetString("lastname"); 114 string lastNameStem = cs.GetString("lastname");
@@ -160,11 +158,12 @@ namespace pCampBot
160 pb.OnConnected += handlebotEvent; 158 pb.OnConnected += handlebotEvent;
161 pb.OnDisconnected += handlebotEvent; 159 pb.OnDisconnected += handlebotEvent;
162 160
163 m_td[pos] = new Thread(pb.startup);
164 m_td[pos].Name = pb.Name;
165 m_td[pos].IsBackground = true;
166 m_td[pos].Start();
167 m_lBot.Add(pb); 161 m_lBot.Add(pb);
162
163 Thread pbThread = new Thread(pb.startup);
164 pbThread.Name = pb.Name;
165 pbThread.IsBackground = true;
166 pbThread.Start();
168 } 167 }
169 168
170 /// <summary> 169 /// <summary>
@@ -183,7 +182,6 @@ namespace pCampBot
183 break; 182 break;
184 case EventType.DISCONNECTED: 183 case EventType.DISCONNECTED:
185 m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); 184 m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected");
186 m_td[m_lBot.IndexOf(callbot)].Abort();
187 numbots--; 185 numbots--;
188// m_log.InfoFormat("NUMBOTS {0}", numbots); 186// m_log.InfoFormat("NUMBOTS {0}", numbots);
189 if (numbots <= 0) 187 if (numbots <= 0)