diff options
author | Justin Clark-Casey (justincc) | 2013-09-03 19:41:12 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-09-03 19:41:12 +0100 |
commit | 76bd2e2d727a15e5d3bc9045bdef6faaeca4a08f (patch) | |
tree | 62cbb335ba86afce165fdf5bc5e73805c3b3ed20 /OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs | |
parent | Add Close() method to IBehaviour to allow behaviours to cleanup when removed ... (diff) | |
download | opensim-SC-76bd2e2d727a15e5d3bc9045bdef6faaeca4a08f.zip opensim-SC-76bd2e2d727a15e5d3bc9045bdef6faaeca4a08f.tar.gz opensim-SC-76bd2e2d727a15e5d3bc9045bdef6faaeca4a08f.tar.bz2 opensim-SC-76bd2e2d727a15e5d3bc9045bdef6faaeca4a08f.tar.xz |
Consistently give responsibility for thread sleeping to behaviours rather than controlling from the main action loop
This is to avoid excessive and inconsistent delays between behaviours that currently need to embed sleeps in other actions (e.g. physics) and other behaviours.
Might need a more sophisticated approach in the long term.
Diffstat (limited to 'OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs')
-rw-r--r-- | OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs index 5f7edda..81f250d 100644 --- a/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/TeleportBehaviour.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Linq; | 30 | using System.Linq; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
32 | using log4net; | 33 | using log4net; |
33 | using OpenMetaverse; | 34 | using OpenMetaverse; |
34 | using pCampBot.Interfaces; | 35 | using pCampBot.Interfaces; |
@@ -74,6 +75,8 @@ namespace pCampBot | |||
74 | Bot.Name, sourceRegion.Name, Bot.Client.Self.SimPosition, destRegion.Name, destPosition); | 75 | Bot.Name, sourceRegion.Name, Bot.Client.Self.SimPosition, destRegion.Name, destPosition); |
75 | 76 | ||
76 | Bot.Client.Self.Teleport(destRegion.RegionHandle, destPosition); | 77 | Bot.Client.Self.Teleport(destRegion.RegionHandle, destPosition); |
78 | |||
79 | Thread.Sleep(Bot.Random.Next(3000, 10000)); | ||
77 | } | 80 | } |
78 | } | 81 | } |
79 | } \ No newline at end of file | 82 | } \ No newline at end of file |