aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/Bot.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-03 19:05:54 +0100
committerJustin Clark-Casey (justincc)2013-09-03 19:05:54 +0100
commit1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4 (patch)
treee0909f8e5def5b46faefe6808b25cc7ff656a47f /OpenSim/Tools/pCampBot/Bot.cs
parentAdd ability to adjust pCampbot bot behaviours whilst running with "add behavi... (diff)
downloadopensim-SC_OLD-1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4.zip
opensim-SC_OLD-1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4.tar.gz
opensim-SC_OLD-1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4.tar.bz2
opensim-SC_OLD-1a2627031d8a80b1d5e21fd2d13e4dc2b123c0b4.tar.xz
Add pCampbot "remove behaviour" console command for removing bot behaviours during operation.
Doesn't currently work very well as stopping physics, for instance, can leave bot travelling in old direction
Diffstat (limited to 'OpenSim/Tools/pCampBot/Bot.cs')
-rw-r--r--OpenSim/Tools/pCampBot/Bot.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs
index 6037516..0bd8151 100644
--- a/OpenSim/Tools/pCampBot/Bot.cs
+++ b/OpenSim/Tools/pCampBot/Bot.cs
@@ -184,6 +184,12 @@ namespace pCampBot
184 CreateLibOmvClient(); 184 CreateLibOmvClient();
185 } 185 }
186 186
187 public bool TryGetBehaviour(string abbreviatedName, out IBehaviour behaviour)
188 {
189 lock (Behaviours)
190 return Behaviours.TryGetValue(abbreviatedName, out behaviour);
191 }
192
187 public bool AddBehaviour(IBehaviour behaviour) 193 public bool AddBehaviour(IBehaviour behaviour)
188 { 194 {
189 lock (Behaviours) 195 lock (Behaviours)
@@ -200,6 +206,12 @@ namespace pCampBot
200 return false; 206 return false;
201 } 207 }
202 208
209 public bool RemoveBehaviour(string abbreviatedName)
210 {
211 lock (Behaviours)
212 return Behaviours.Remove(abbreviatedName);
213 }
214
203 private void CreateLibOmvClient() 215 private void CreateLibOmvClient()
204 { 216 {
205 GridClient newClient = new GridClient(); 217 GridClient newClient = new GridClient();