aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-24 22:36:45 +0000
committerJustin Clark-Casey (justincc)2011-11-24 22:36:45 +0000
commit2ae5b40ca6bb3d33310f0f66569bf150548a2de6 (patch)
tree9c485fa9e2e9d1b2d976d3b6d9777457b836df36 /OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
parentminor: remove mono compiler warning (diff)
downloadopensim-SC-2ae5b40ca6bb3d33310f0f66569bf150548a2de6.zip
opensim-SC-2ae5b40ca6bb3d33310f0f66569bf150548a2de6.tar.gz
opensim-SC-2ae5b40ca6bb3d33310f0f66569bf150548a2de6.tar.bz2
opensim-SC-2ae5b40ca6bb3d33310f0f66569bf150548a2de6.tar.xz
On pCampBot, add bot as a property on behaviours instead of passing it in every time
Diffstat (limited to '')
-rw-r--r--OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
index 0a6d5d2..6ad02b2 100644
--- a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
+++ b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs
@@ -39,20 +39,20 @@ namespace pCampBot
39 /// <remarks> 39 /// <remarks>
40 /// The viewer itself does not give the option of grabbing objects that haven't been signalled as grabbable. 40 /// The viewer itself does not give the option of grabbing objects that haven't been signalled as grabbable.
41 /// </remarks> 41 /// </remarks>
42 public class GrabbingBehaviour : IBehaviour 42 public class GrabbingBehaviour : AbstractBehaviour
43 { 43 {
44 public string Name { get { return "Grabbing"; } } 44 public GrabbingBehaviour() { Name = "Grabbing"; }
45 45
46 public void Action(Bot bot) 46 public override void Action()
47 { 47 {
48 Dictionary<UUID, Primitive> objects = bot.Objects; 48 Dictionary<UUID, Primitive> objects = Bot.Objects;
49 49
50 Primitive prim = objects.ElementAt(bot.Random.Next(0, objects.Count)).Value; 50 Primitive prim = objects.ElementAt(Bot.Random.Next(0, objects.Count)).Value;
51 51
52 // This appears to be a typical message sent when a viewer user clicks a clickable object 52 // This appears to be a typical message sent when a viewer user clicks a clickable object
53 bot.Client.Self.Grab(prim.LocalID); 53 Bot.Client.Self.Grab(prim.LocalID);
54 bot.Client.Self.GrabUpdate(prim.ID, Vector3.Zero); 54 Bot.Client.Self.GrabUpdate(prim.ID, Vector3.Zero);
55 bot.Client.Self.DeGrab(prim.LocalID); 55 Bot.Client.Self.DeGrab(prim.LocalID);
56 } 56 }
57 } 57 }
58} \ No newline at end of file 58} \ No newline at end of file