diff options
author | Justin Clark-Casey (justincc) | 2011-11-03 21:16:24 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-11-03 21:16:24 +0000 |
commit | 66c60c56a0bac01e0f4f2a9d5c673a48ff94642b (patch) | |
tree | a76c17cdc4a65b46b1ba308e95d0b37d216fc68e /OpenSim/Tools/pCampBot/BotManager.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-66c60c56a0bac01e0f4f2a9d5c673a48ff94642b.zip opensim-SC-66c60c56a0bac01e0f4f2a9d5c673a48ff94642b.tar.gz opensim-SC-66c60c56a0bac01e0f4f2a9d5c673a48ff94642b.tar.bz2 opensim-SC-66c60c56a0bac01e0f4f2a9d5c673a48ff94642b.tar.xz |
Separate out physics testing actions into a separate PhysicsBehaviour class
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index b05bd6d..0505c97 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -37,6 +37,7 @@ using log4net.Repository; | |||
37 | using Nini.Config; | 37 | using Nini.Config; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Console; | 39 | using OpenSim.Framework.Console; |
40 | using pCampBot.Interfaces; | ||
40 | 41 | ||
41 | namespace pCampBot | 42 | namespace pCampBot |
42 | { | 43 | { |
@@ -119,10 +120,14 @@ namespace pCampBot | |||
119 | string password = cs.GetString("password"); | 120 | string password = cs.GetString("password"); |
120 | string loginUri = cs.GetString("loginuri"); | 121 | string loginUri = cs.GetString("loginuri"); |
121 | 122 | ||
123 | // Hardcoded for new | ||
124 | List<IBehaviour> behaviours = new List<IBehaviour>(); | ||
125 | behaviours.Add(new PhysicsBehaviour()); | ||
126 | |||
122 | for (int i = 0; i < botcount; i++) | 127 | for (int i = 0; i < botcount; i++) |
123 | { | 128 | { |
124 | string lastName = string.Format("{0}_{1}", lastNameStem, i); | 129 | string lastName = string.Format("{0}_{1}", lastNameStem, i); |
125 | startupBot(i, this, firstName, lastName, password, loginUri); | 130 | startupBot(i, this, behaviours, firstName, lastName, password, loginUri); |
126 | } | 131 | } |
127 | } | 132 | } |
128 | 133 | ||
@@ -150,14 +155,17 @@ namespace pCampBot | |||
150 | /// This starts up the bot and stores the thread for the bot in the thread array | 155 | /// This starts up the bot and stores the thread for the bot in the thread array |
151 | /// </summary> | 156 | /// </summary> |
152 | /// <param name="pos">The position in the thread array to stick the bot's thread</param> | 157 | /// <param name="pos">The position in the thread array to stick the bot's thread</param> |
153 | /// <param name="cs">Configuration of the bot</param> | 158 | /// <param name="bm"></param> |
159 | /// <param name="behaviours">Behaviours for this bot to perform.</param> | ||
154 | /// <param name="firstName">First name</param> | 160 | /// <param name="firstName">First name</param> |
155 | /// <param name="lastName">Last name</param> | 161 | /// <param name="lastName">Last name</param> |
156 | /// <param name="password">Password</param> | 162 | /// <param name="password">Password</param> |
157 | /// <param name="loginUri">Login URI</param> | 163 | /// <param name="loginUri">Login URI</param> |
158 | public void startupBot(int pos, BotManager bm, string firstName, string lastName, string password, string loginUri) | 164 | public void startupBot( |
165 | int pos, BotManager bm, List<IBehaviour> behaviours, | ||
166 | string firstName, string lastName, string password, string loginUri) | ||
159 | { | 167 | { |
160 | PhysicsBot pb = new PhysicsBot(bm, firstName, lastName, password, loginUri); | 168 | PhysicsBot pb = new PhysicsBot(bm, behaviours, firstName, lastName, password, loginUri); |
161 | 169 | ||
162 | pb.OnConnected += handlebotEvent; | 170 | pb.OnConnected += handlebotEvent; |
163 | pb.OnDisconnected += handlebotEvent; | 171 | pb.OnDisconnected += handlebotEvent; |