From 9c652079361f496c46640ed67e964ee6164ce06e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Sep 2013 17:07:57 +0100 Subject: Show behaviours of pCampbot bots in "show bots" and "show bot" console commands --- OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs') diff --git a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs index daa7485..47b4d46 100644 --- a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs @@ -46,6 +46,7 @@ namespace pCampBot public PhysicsBehaviour() { + AbbreviatedName = "p"; Name = "Physics"; talkarray = readexcuses(); } -- cgit v1.1 From 3dbe7313d1c3fc28f0642531fbb6e238a98ac821 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Sep 2013 19:33:17 +0100 Subject: 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. --- OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs') 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 Bot.Client.Self.Chat(randomf, 0, ChatType.Normal); } + public override void Close() + { + Bot.Client.Self.Jump(false); + } + private string[] readexcuses() { string allexcuses = ""; -- cgit v1.1 From b781a23c445bea0fd199eb756ebf6143959256a6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 3 Sep 2013 19:58:27 +0100 Subject: In pCampbot PhysicsBehaviour.Close(), only cancel jumping if bot is connected --- OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs') diff --git a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs index 65a7c90..6fd2b7c 100644 --- a/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/PhysicsBehaviour.cs @@ -80,7 +80,8 @@ namespace pCampBot public override void Close() { - Bot.Client.Self.Jump(false); + if (Bot.ConnectionState == ConnectionState.Connected) + Bot.Client.Self.Jump(false); } private string[] readexcuses() -- cgit v1.1