aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/Behaviours
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-03 19:33:17 +0100
committerJustin Clark-Casey (justincc)2013-09-03 19:33:17 +0100
commit3dbe7313d1c3fc28f0642531fbb6e238a98ac821 (patch)
treefdb7503109ee947e5bb9fd7d6fbe31933a0aa2e1 /OpenSim/Tools/pCampBot/Behaviours
parentAdd pCampbot "remove behaviour" console command for removing bot behaviours d... (diff)
downloadopensim-SC_OLD-3dbe7313d1c3fc28f0642531fbb6e238a98ac821.zip
opensim-SC_OLD-3dbe7313d1c3fc28f0642531fbb6e238a98ac821.tar.gz
opensim-SC_OLD-3dbe7313d1c3fc28f0642531fbb6e238a98ac821.tar.bz2
opensim-SC_OLD-3dbe7313d1c3fc28f0642531fbb6e238a98ac821.tar.xz
Add Close() method to IBehaviour to allow behaviours to cleanup when removed or bot it disconnected.
In this case, it is used to turn off jump when physics testing behaviour is removed.
Diffstat (limited to 'OpenSim/Tools/pCampBot/Behaviours')
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs2
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs5
2 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
index 66d5542..9bc8512 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/AbstractBehaviour.cs
@@ -50,5 +50,7 @@ namespace pCampBot
50 { 50 {
51 Bot = bot; 51 Bot = bot;
52 } 52 }
53
54 public virtual void Close() {}
53 } 55 }
54} 56}
diff --git a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs
index 47b4d46..65a7c90 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs
@@ -78,6 +78,11 @@ namespace pCampBot
78 Bot.Client.Self.Chat(randomf, 0, ChatType.Normal); 78 Bot.Client.Self.Chat(randomf, 0, ChatType.Normal);
79 } 79 }
80 80
81 public override void Close()
82 {
83 Bot.Client.Self.Jump(false);
84 }
85
81 private string[] readexcuses() 86 private string[] readexcuses()
82 { 87 {
83 string allexcuses = ""; 88 string allexcuses = "";