diff options
Diffstat (limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 0505c97..dac6e0e 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -120,13 +120,23 @@ namespace pCampBot | |||
120 | string password = cs.GetString("password"); | 120 | string password = cs.GetString("password"); |
121 | string loginUri = cs.GetString("loginuri"); | 121 | string loginUri = cs.GetString("loginuri"); |
122 | 122 | ||
123 | // Hardcoded for new | 123 | HashSet<string> behaviourSwitches = new HashSet<string>(); |
124 | List<IBehaviour> behaviours = new List<IBehaviour>(); | 124 | Array.ForEach<string>( |
125 | behaviours.Add(new PhysicsBehaviour()); | 125 | cs.GetString("behaviours", "p").Split(new char[] { ',' }), b => behaviourSwitches.Add(b)); |
126 | 126 | ||
127 | for (int i = 0; i < botcount; i++) | 127 | for (int i = 0; i < botcount; i++) |
128 | { | 128 | { |
129 | string lastName = string.Format("{0}_{1}", lastNameStem, i); | 129 | string lastName = string.Format("{0}_{1}", lastNameStem, i); |
130 | |||
131 | List<IBehaviour> behaviours = new List<IBehaviour>(); | ||
132 | |||
133 | // Hard-coded for now | ||
134 | if (behaviourSwitches.Contains("p")) | ||
135 | behaviours.Add(new PhysicsBehaviour()); | ||
136 | |||
137 | if (behaviourSwitches.Contains("g")) | ||
138 | behaviours.Add(new GrabbingBehaviour()); | ||
139 | |||
130 | startupBot(i, this, behaviours, firstName, lastName, password, loginUri); | 140 | startupBot(i, this, behaviours, firstName, lastName, password, loginUri); |
131 | } | 141 | } |
132 | } | 142 | } |