diff options
author | Justin Clark-Casey (justincc) | 2011-10-31 23:10:10 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-31 23:10:10 +0000 |
commit | 210868a832439bb226dfcf153ca66563300dc2cf (patch) | |
tree | e74ba51bc117b8b35cf8fafb06f6e182c2b31cdc /OpenSim/Tools/pCampBot | |
parent | Stop individual bots attempting to download the same asset more than once (diff) | |
download | opensim-SC_OLD-210868a832439bb226dfcf153ca66563300dc2cf.zip opensim-SC_OLD-210868a832439bb226dfcf153ca66563300dc2cf.tar.gz opensim-SC_OLD-210868a832439bb226dfcf153ca66563300dc2cf.tar.bz2 opensim-SC_OLD-210868a832439bb226dfcf153ca66563300dc2cf.tar.xz |
Remove OpenSim.TestSuite
Hasn't been touched since 2009 and wasn't more than another copy of pCampBot
Diffstat (limited to 'OpenSim/Tools/pCampBot')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/PhysicsBot.cs | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 0aaa226..a4b7f16 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -165,18 +165,20 @@ namespace pCampBot | |||
165 | /// </summary> | 165 | /// </summary> |
166 | /// <param name="callbot"></param> | 166 | /// <param name="callbot"></param> |
167 | /// <param name="eventt"></param> | 167 | /// <param name="eventt"></param> |
168 | public void handlebotEvent(PhysicsBot callbot, EventType eventt) | 168 | private void handlebotEvent(PhysicsBot callbot, EventType eventt) |
169 | { | 169 | { |
170 | switch (eventt) | 170 | switch (eventt) |
171 | { | 171 | { |
172 | case EventType.CONNECTED: | 172 | case EventType.CONNECTED: |
173 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected"); | 173 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected"); |
174 | numbots++; | 174 | numbots++; |
175 | // m_log.InfoFormat("NUMBOTS {0}", numbots); | ||
175 | break; | 176 | break; |
176 | case EventType.DISCONNECTED: | 177 | case EventType.DISCONNECTED: |
177 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); | 178 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); |
178 | m_td[m_lBot.IndexOf(callbot)].Abort(); | 179 | m_td[m_lBot.IndexOf(callbot)].Abort(); |
179 | numbots--; | 180 | numbots--; |
181 | // m_log.InfoFormat("NUMBOTS {0}", numbots); | ||
180 | if (numbots <= 0) | 182 | if (numbots <= 0) |
181 | Environment.Exit(0); | 183 | Environment.Exit(0); |
182 | break; | 184 | break; |
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 0344a82..0c399e3 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs | |||
@@ -29,19 +29,23 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | ||
32 | using System.Threading; | 33 | using System.Threading; |
33 | using System.Timers; | 34 | using System.Timers; |
35 | using log4net; | ||
34 | using OpenMetaverse; | 36 | using OpenMetaverse; |
35 | using OpenMetaverse.Assets; | 37 | using OpenMetaverse.Assets; |
36 | using Nini.Config; | 38 | using Nini.Config; |
37 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
39 | using Timer=System.Timers.Timer; | 41 | using Timer = System.Timers.Timer; |
40 | 42 | ||
41 | namespace pCampBot | 43 | namespace pCampBot |
42 | { | 44 | { |
43 | public class PhysicsBot | 45 | public class PhysicsBot |
44 | { | 46 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
45 | public delegate void AnEvent(PhysicsBot callbot, EventType someevent); // event delegate for bot events | 49 | public delegate void AnEvent(PhysicsBot callbot, EventType someevent); // event delegate for bot events |
46 | public IConfig startupConfig; // bot config, passed from BotManager | 50 | public IConfig startupConfig; // bot config, passed from BotManager |
47 | 51 | ||
@@ -384,6 +388,7 @@ namespace pCampBot | |||
384 | 388 | ||
385 | public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) | 389 | public void Network_OnDisconnected(object sender, DisconnectedEventArgs args) |
386 | { | 390 | { |
391 | // m_log.ErrorFormat("Fired Network_OnDisconnected"); | ||
387 | if (OnDisconnected != null) | 392 | if (OnDisconnected != null) |
388 | { | 393 | { |
389 | OnDisconnected(this, EventType.DISCONNECTED); | 394 | OnDisconnected(this, EventType.DISCONNECTED); |