diff options
author | Justin Clark-Casey (justincc) | 2011-11-01 21:15:47 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-01 21:15:47 +0000 |
commit | 12bd0ebd3416a60faeec77bfcd3cb48c33ed5cce (patch) | |
tree | ebe74214c51113d8cd10bf3398adc5bddd051caf /OpenSim/Tools | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-12bd0ebd3416a60faeec77bfcd3cb48c33ed5cce.zip opensim-SC-12bd0ebd3416a60faeec77bfcd3cb48c33ed5cce.tar.gz opensim-SC-12bd0ebd3416a60faeec77bfcd3cb48c33ed5cce.tar.bz2 opensim-SC-12bd0ebd3416a60faeec77bfcd3cb48c33ed5cce.tar.xz |
stop recording the threads on which we happen to start bots. These are pointless since they terminate quickly
Diffstat (limited to 'OpenSim/Tools')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 12 |
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) |